Updated JitStreamer Implementation, Reimplemented Texture Chunks, Reworked Alerts and more

This commit is contained in:
Stossy11 2025-03-20 21:33:28 +11:00
parent ceab2f0ac8
commit 54cb7eb953
30 changed files with 1074 additions and 486 deletions

View file

@ -251,15 +251,16 @@ namespace Ryujinx.Headless.SDL2
[UnmanagedCallersOnly(EntryPoint = "get_current_fps")]
public static unsafe int GetFPS()
{
if (_window != null) {
Switch Device = _window.Device;
if (_window == null || _window.Device == null)
{
return 0;
}
int intValue = (int)Device.Statistics.GetGameFrameRate();
Switch Device = _window.Device;
return intValue;
}
return 0;
int intValue = (int)Device.Statistics.GetGameFrameRate();
return intValue;
}
[UnmanagedCallersOnly(EntryPoint = "initialize")]

View file

@ -486,7 +486,12 @@ namespace Ryujinx.Headless.SDL2
public bool DisplayMessageDialog(string title, string message)
{
SDL_ShowSimpleMessageBox(SDL_MessageBoxFlags.SDL_MESSAGEBOX_INFORMATION, title, message, WindowHandle);
if (OperatingSystem.IsIOS())
{
AlertHelper.ShowAlert(title, message, false);
} else {
SDL_ShowSimpleMessageBox(SDL_MessageBoxFlags.SDL_MESSAGEBOX_INFORMATION, title, message, WindowHandle);
}
return true;
}

View file

@ -7,13 +7,16 @@ namespace Ryujinx.Headless.SDL2
{
public static class AlertHelper
{
[DllImport("RyujinxKeyboard.framework/RyujinxKeyboard", CallingConvention = CallingConvention.Cdecl)]
[DllImport("RyujinxHelper.framework/RyujinxHelper", CallingConvention = CallingConvention.Cdecl)]
public static extern void showKeyboardAlert(string title, string message, string placeholder);
[DllImport("RyujinxKeyboard.framework/RyujinxKeyboard", CallingConvention = CallingConvention.Cdecl)]
[DllImport("RyujinxHelper.framework/RyujinxHelper", CallingConvention = CallingConvention.Cdecl)]
public static extern void showAlert(string title, string message, bool showCancel);
[DllImport("RyujinxHelper.framework/RyujinxHelper", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr getKeyboardInput();
[DllImport("RyujinxKeyboard.framework/RyujinxKeyboard", CallingConvention = CallingConvention.Cdecl)]
[DllImport("RyujinxHelper.framework/RyujinxHelper", CallingConvention = CallingConvention.Cdecl)]
private static extern void clearKeyboardInput();
public static void ShowAlertWithTextInput(string title, string message, string placeholder, Action<string> onTextEntered)
@ -38,5 +41,10 @@ namespace Ryujinx.Headless.SDL2
}
});
}
public static void ShowAlert(string title, string message, bool cancel) {
showAlert(title, message, cancel);
}
}
}