1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-09 01:32:59 +08:00

Revert "Use appropriate SDL_ShowSimpleMessageBox"

This reverts commit ccf8473aae.
This commit is contained in:
Susko3 2024-05-23 14:24:42 +02:00
parent ccf8473aae
commit abca62d5f0

View File

@ -28,14 +28,6 @@ namespace osu.Desktop
private static LegacyTcpIpcProvider? legacyIpc; private static LegacyTcpIpcProvider? legacyIpc;
private static unsafe void showMessageBox(string title, string message)
{
if (FrameworkEnvironment.UseSDL3)
SDL3.SDL_ShowSimpleMessageBox(SDL_MessageBoxFlags.SDL_MESSAGEBOX_ERROR, title, message, null);
else
SDL2.SDL.SDL_ShowSimpleMessageBox(SDL2.SDL.SDL_MessageBoxFlags.SDL_MESSAGEBOX_ERROR, title, message, IntPtr.Zero);
}
[STAThread] [STAThread]
public static void Main(string[] args) public static void Main(string[] args)
{ {
@ -60,15 +52,19 @@ namespace osu.Desktop
// See https://www.mongodb.com/docs/realm/sdk/dotnet/compatibility/ // See https://www.mongodb.com/docs/realm/sdk/dotnet/compatibility/
if (windowsVersion.Major < 6 || (windowsVersion.Major == 6 && windowsVersion.Minor <= 2)) if (windowsVersion.Major < 6 || (windowsVersion.Major == 6 && windowsVersion.Minor <= 2))
{ {
// If users running in compatibility mode becomes more of a common thing, we may want to provide better guidance or even consider unsafe
// disabling it ourselves. {
// We could also better detect compatibility mode if required: // If users running in compatibility mode becomes more of a common thing, we may want to provide better guidance or even consider
// https://stackoverflow.com/questions/10744651/how-i-can-detect-if-my-application-is-running-under-compatibility-mode#comment58183249_10744730 // disabling it ourselves.
showMessageBox("Your operating system is too old to run osu!", // We could also better detect compatibility mode if required:
"This version of osu! requires at least Windows 8.1 to run.\n" // https://stackoverflow.com/questions/10744651/how-i-can-detect-if-my-application-is-running-under-compatibility-mode#comment58183249_10744730
+ "Please upgrade your operating system or consider using an older version of osu!.\n\n" SDL3.SDL_ShowSimpleMessageBox(SDL_MessageBoxFlags.SDL_MESSAGEBOX_ERROR,
+ "If you are running a newer version of windows, please check you don't have \"Compatibility mode\" turned on for osu!"); "Your operating system is too old to run osu!"u8,
return; "This version of osu! requires at least Windows 8.1 to run.\n"u8
+ "Please upgrade your operating system or consider using an older version of osu!.\n\n"u8
+ "If you are running a newer version of windows, please check you don't have \"Compatibility mode\" turned on for osu!"u8, null);
return;
}
} }
setupSquirrel(); setupSquirrel();