mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 05:23:04 +01:00
This commit is contained in:
@@ -52,6 +52,7 @@
|
||||
#include "object/ObjectRepository.h"
|
||||
#include "paint/Painter.h"
|
||||
#include "platform/Crash.h"
|
||||
#include "platform/Platform2.h"
|
||||
#include "platform/platform.h"
|
||||
#include "ride/TrackDesignRepository.h"
|
||||
#include "scenario/Scenario.h"
|
||||
@@ -389,6 +390,19 @@ namespace OpenRCT2
|
||||
}
|
||||
}
|
||||
|
||||
if (Platform::IsRunningInWine())
|
||||
{
|
||||
std::string wineWarning = _localisationService->GetString(STR_WINE_NOT_RECOMMENDED);
|
||||
if (gOpenRCT2Headless)
|
||||
{
|
||||
Console::Error::WriteLine(wineWarning.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
_uiContext->ShowMessageBox(wineWarning);
|
||||
}
|
||||
}
|
||||
|
||||
if (!gOpenRCT2Headless)
|
||||
{
|
||||
_uiContext->CreateWindow();
|
||||
|
||||
@@ -3918,6 +3918,8 @@ enum
|
||||
|
||||
STR_TILE_INSPECTOR_WALL_ANIMATION_FRAME = 6367,
|
||||
|
||||
STR_WINE_NOT_RECOMMENDED = 6368,
|
||||
|
||||
// Have to include resource strings (from scenarios and objects) for the time being now that language is partially working
|
||||
/* MAX_STR_COUNT = 32768 */ // MAX_STR_COUNT - upper limit for number of strings, not the current count strings
|
||||
};
|
||||
|
||||
@@ -99,6 +99,11 @@ namespace Platform
|
||||
}
|
||||
return isSupported;
|
||||
}
|
||||
|
||||
bool IsRunningInWine()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
} // namespace Platform
|
||||
|
||||
#endif
|
||||
|
||||
@@ -241,6 +241,17 @@ namespace Platform
|
||||
return result;
|
||||
}
|
||||
|
||||
bool IsRunningInWine()
|
||||
{
|
||||
HMODULE ntdllMod = GetModuleHandleW(L"ntdll.dll");
|
||||
|
||||
if (ntdllMod && GetProcAddress(ntdllMod, "wine_get_version"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the current version of Windows supports ANSI colour codes.
|
||||
* From Windows 10, build 10586 ANSI escape colour codes can be used on stdout.
|
||||
|
||||
@@ -45,6 +45,7 @@ namespace Platform
|
||||
bool IsOSVersionAtLeast(uint32_t major, uint32_t minor, uint32_t build);
|
||||
#endif
|
||||
|
||||
bool IsRunningInWine();
|
||||
bool IsColourTerminalSupported();
|
||||
bool HandleSpecialCommandLineArgument(const char* argument);
|
||||
uintptr_t StrDecompToPrecomp(utf8* input);
|
||||
|
||||
Reference in New Issue
Block a user