mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Display a warning dialog if user runs program elevated (#6063)
This commit is contained in:
committed by
Ted John
parent
4ed970afef
commit
06d1f49d61
@@ -199,6 +199,19 @@ namespace OpenRCT2
|
||||
config_save_default();
|
||||
}
|
||||
|
||||
if (platform_process_is_elevated())
|
||||
{
|
||||
std::string elevationWarning = "It is not recommended to run OpenRCT2 with elevated permissions.";
|
||||
if (gOpenRCT2Headless)
|
||||
{
|
||||
Console::Error::WriteLine(elevationWarning.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
_uiContext->ShowMessageBox(elevationWarning);
|
||||
}
|
||||
}
|
||||
|
||||
if (!rct2_init_directories())
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user