1
0
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:
Richard Jenkins
2017-07-29 15:21:33 +01:00
committed by Ted John
parent 4ed970afef
commit 06d1f49d61
4 changed files with 37 additions and 0 deletions

View File

@@ -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;