| 23 | BOOL DebugMode = FALSE; |
| 24 | |
| 25 | int ExitWithWarning(int cmdShow, const wchar_t *msg) { |
| 26 | std::wstring finalMsg = std::wstring(msg) + INSOMNIA_ISSUE_REPORT_PREFIX + INSOMNIA_ISSUE_URL + |
| 27 | INSOMNIA_ISSUE_REPORT_POSTFIX; |
| 28 | if (::MessageBoxW(NULL, finalMsg.c_str(), L"Insomnia was unable to start up properly", |
| 29 | MB_YESNO | MB_ICONERROR) == IDYES) { |
| 30 | // Open the issue report URL in the default browser |
| 31 | ::ShellExecuteW(0, 0, INSOMNIA_ISSUE_URL, NULL, NULL, cmdShow); |
| 32 | } |
| 33 | return 1; |
| 34 | } |
| 35 | |
| 36 | std::wstring GetTimestamp() { |
| 37 | SYSTEMTIME st; |