mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-25 14:39:15 +00:00
- 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
31 lines
1022 B
C#
31 lines
1022 B
C#
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;
|
|
}
|
|
}
|
|
}
|