mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-07-19 17:34:18 +00:00
UI: Included more launch checks (#4)
- Added Onedrive folder check for Windows. - Added iCloud and Downloads folder checks for macOS. - Added sudo checks for macOS/Linux. - Added dialogue prompts for macOS/Linux. - Added unofficial build warning for detected Flatpak install. These checks have console fallbacks in case the GUI decides it doesn't want to work that day. Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/4
This commit is contained in:
30
src/Ryujinx/UI/Helpers/LinuxSDLInterop.cs
Normal file
30
src/Ryujinx/UI/Helpers/LinuxSDLInterop.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Helpers
|
||||
{
|
||||
public class LinuxSDLInterop
|
||||
{
|
||||
// TODO: add a parameter for prompt style
|
||||
// TODO: look into adding text for the button
|
||||
// TODO: check success of prompt box
|
||||
public static int SimpleMessageBox(string caption, string text)
|
||||
{
|
||||
const string sdl = "SDL2";
|
||||
|
||||
[DllImport(sdl)]
|
||||
static extern int SDL_Init(uint flags);
|
||||
|
||||
[DllImport(sdl, CallingConvention = CallingConvention.Cdecl)]
|
||||
static extern int SDL_ShowSimpleMessageBox(uint flags, string title, string message, IntPtr window);
|
||||
|
||||
[DllImport(sdl)]
|
||||
static extern void SDL_Quit();
|
||||
|
||||
SDL_Init(0);
|
||||
SDL_ShowSimpleMessageBox(32 /* 32 = warning style */, caption, text, IntPtr.Zero);
|
||||
SDL_Quit();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user