mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-20 17:51:13 +02:00
misc: chore: Use explicit types & fix object creation
This commit is contained in:
@@ -59,7 +59,7 @@ namespace LibKenjinx
|
||||
|
||||
public static string GetInstalledFirmwareVersion()
|
||||
{
|
||||
var version = SwitchDevice?.ContentManager?.GetCurrentFirmwareVersion();
|
||||
SystemVersion? version = SwitchDevice?.ContentManager?.GetCurrentFirmwareVersion();
|
||||
|
||||
if (version != null)
|
||||
{
|
||||
@@ -76,7 +76,7 @@ namespace LibKenjinx
|
||||
|
||||
public static bool LoadApplication(Stream stream, FileType type, Stream? updateStream = null)
|
||||
{
|
||||
var emulationContext = SwitchDevice?.EmulationContext;
|
||||
Switch? emulationContext = SwitchDevice?.EmulationContext;
|
||||
|
||||
return type switch
|
||||
{
|
||||
@@ -97,7 +97,7 @@ namespace LibKenjinx
|
||||
|
||||
public static bool LoadApplication(string? path)
|
||||
{
|
||||
var emulationContext = SwitchDevice?.EmulationContext;
|
||||
Switch? emulationContext = SwitchDevice?.EmulationContext;
|
||||
|
||||
if (Directory.Exists(path))
|
||||
{
|
||||
@@ -249,7 +249,7 @@ namespace LibKenjinx
|
||||
|
||||
private static FileStream OpenFile(int descriptor)
|
||||
{
|
||||
var safeHandle = new SafeFileHandle(descriptor, false);
|
||||
SafeFileHandle safeHandle = new(descriptor, false);
|
||||
|
||||
return new FileStream(safeHandle, FileAccess.ReadWrite);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user