mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-06-04 19:39:15 +00:00
Merge branch ryujinx:master into master
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
|
using Ryujinx.HLE.Exceptions;
|
||||||
using Ryujinx.HLE.HOS.Applets;
|
using Ryujinx.HLE.HOS.Applets;
|
||||||
using Ryujinx.HLE.HOS.Ipc;
|
using Ryujinx.HLE.HOS.Ipc;
|
||||||
using Ryujinx.HLE.HOS.Kernel;
|
using Ryujinx.HLE.HOS.Kernel;
|
||||||
@@ -119,12 +120,19 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Lib
|
|||||||
}
|
}
|
||||||
|
|
||||||
[CommandCmif(90)]
|
[CommandCmif(90)]
|
||||||
// ILibraryAppletAccessor:90
|
// Unknown90(ulong[4])
|
||||||
public ResultCode Unknown90(ServiceCtx context)
|
public ResultCode Unknown90(ServiceCtx context)
|
||||||
{
|
{
|
||||||
// NOTE: This call is performed on SDK 20+ when applet is called.
|
// NOTE: This call is performed on SDK 20+ when applet is called.
|
||||||
// Since we don't support applets for now, it's fine to stub it.
|
// Since we don't support most applets for now, it's fine to stub it.
|
||||||
|
// Throw if values are not 0 to learn more about what this function does.
|
||||||
|
|
||||||
|
if (context.RequestData.ReadUInt64() != 0 || context.RequestData.ReadUInt64() != 0 ||
|
||||||
|
context.RequestData.ReadUInt64() != 0 || context.RequestData.ReadUInt64() != 0)
|
||||||
|
{
|
||||||
|
throw new ServiceNotImplementedException(this, context, $"{GetType().FullName}: 90");
|
||||||
|
}
|
||||||
|
|
||||||
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,11 +24,12 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Security.Principal;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Ryujinx.Ava
|
namespace Ryujinx.Ava
|
||||||
{
|
{
|
||||||
internal partial class Program
|
internal static class Program
|
||||||
{
|
{
|
||||||
public static double WindowScaleFactor { get; set; }
|
public static double WindowScaleFactor { get; set; }
|
||||||
public static double DesktopScaleFactor { get; set; } = 1.0;
|
public static double DesktopScaleFactor { get; set; } = 1.0;
|
||||||
@@ -40,19 +41,36 @@ namespace Ryujinx.Ava
|
|||||||
public static bool UseHardwareAcceleration { get; private set; }
|
public static bool UseHardwareAcceleration { get; private set; }
|
||||||
public static string BackendThreadingArg { get; private set; }
|
public static string BackendThreadingArg { get; private set; }
|
||||||
|
|
||||||
[LibraryImport("user32.dll", SetLastError = true)]
|
|
||||||
public static partial int MessageBoxA(nint hWnd, [MarshalAs(UnmanagedType.LPStr)] string text, [MarshalAs(UnmanagedType.LPStr)] string caption, uint type);
|
|
||||||
|
|
||||||
private const uint MbIconwarning = 0x30;
|
private const uint MbIconwarning = 0x30;
|
||||||
|
|
||||||
public static int Main(string[] args)
|
public static int Main(string[] args)
|
||||||
{
|
{
|
||||||
Version = ReleaseInformation.Version;
|
Version = ReleaseInformation.Version;
|
||||||
|
|
||||||
if (OperatingSystem.IsWindows() && !OperatingSystem.IsWindowsVersionAtLeast(10, 0, 19041))
|
if (OperatingSystem.IsWindows())
|
||||||
{
|
{
|
||||||
_ = MessageBoxA(nint.Zero, "You are running an outdated version of Windows.\n\nRyujinx supports Windows 10 version 20H1 and newer.\n", $"Ryujinx {Version}", MbIconwarning);
|
if (!OperatingSystem.IsWindowsVersionAtLeast(10, 0, 19041))
|
||||||
return 0;
|
{
|
||||||
|
_ = Win32NativeInterop.MessageBoxA(nint.Zero, "You are running an outdated version of Windows.\n\nRyujinx supports Windows 10 version 20H1 and newer.\n", $"Ryujinx {Version}", MbIconwarning);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Environment.CurrentDirectory.StartsWithIgnoreCase("C:\\Program Files") ||
|
||||||
|
Environment.CurrentDirectory.StartsWithIgnoreCase("C:\\Program Files (x86)"))
|
||||||
|
{
|
||||||
|
_ = Win32NativeInterop.MessageBoxA(nint.Zero, "Ryujinx is not intended to be run from the Program Files folder. Please move it out and relaunch.", $"Ryujinx {Version}", MbIconwarning);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The names of everything here makes no sense for what this actually checks for. Thanks, Microsoft.
|
||||||
|
// If you can't tell by the error string,
|
||||||
|
// this actually checks if the current process was run with "Run as Administrator"
|
||||||
|
// ...but this reads like it checks if the current is in/has the Windows admin role? lol
|
||||||
|
if (new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator))
|
||||||
|
{
|
||||||
|
_ = Win32NativeInterop.MessageBoxA(nint.Zero, "Ryujinx is not intended to be run as administrator.", $"Ryujinx {Version}", MbIconwarning);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PreviewerDetached = true;
|
PreviewerDetached = true;
|
||||||
|
|||||||
@@ -112,5 +112,8 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||||||
|
|
||||||
[LibraryImport("user32.dll", SetLastError = true)]
|
[LibraryImport("user32.dll", SetLastError = true)]
|
||||||
public static partial ushort GetAsyncKeyState(int nVirtKey);
|
public static partial ushort GetAsyncKeyState(int nVirtKey);
|
||||||
|
|
||||||
|
[LibraryImport("user32.dll", SetLastError = true)]
|
||||||
|
public static partial int MessageBoxA(nint hWnd, [MarshalAs(UnmanagedType.LPStr)] string text, [MarshalAs(UnmanagedType.LPStr)] string caption, uint type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user