Windows: Don't call abort, use RaiseException directly

This commit is contained in:
Jonathan G Rennison
2023-06-11 16:46:12 +01:00
parent cb6f6f94e6
commit cca7c0ef0a
5 changed files with 23 additions and 2 deletions

View File

@@ -86,6 +86,11 @@ void ShowOSErrorBox(const char *buf, bool system)
MessageBox(GetActiveWindow(), OTTD2FS(buf).c_str(), L"Error!", MB_ICONSTOP | MB_TASKMODAL);
}
void NORETURN DoOSAbort()
{
RaiseException(0xE1212012, 0, 0, nullptr);
}
void OSOpenBrowser(const char *url)
{
ShellExecute(GetActiveWindow(), L"open", OTTD2FS(url).c_str(), nullptr, nullptr, SW_SHOWNORMAL);