diff --git a/src/client/component/steam_proxy.cpp b/src/client/component/steam_proxy.cpp index dd6253b8..1e8fba81 100644 --- a/src/client/component/steam_proxy.cpp +++ b/src/client/component/steam_proxy.cpp @@ -215,7 +215,7 @@ namespace steam_proxy catch (std::exception& e) { printf("Steam: %s\n", e.what()); - MessageBoxA(GetForegroundWindow(), e.what(), "BOIII Error", MB_ICONERROR); + MessageBoxA(nullptr, e.what(), "BOIII Error", MB_ICONERROR | MB_SETFOREGROUND | MB_TOPMOST); TerminateProcess(GetCurrentProcess(), 1234); } diff --git a/src/client/loader/loader.cpp b/src/client/loader/loader.cpp index 7d26f253..b6d55056 100644 --- a/src/client/loader/loader.cpp +++ b/src/client/loader/loader.cpp @@ -107,7 +107,7 @@ namespace loader const auto target = utils::nt::library::load(filename); if (!target) { - throw std::runtime_error{"Failed to map binary!"}; + throw std::runtime_error{"Failed to map: " + filename}; } load_imports(target); diff --git a/src/client/main.cpp b/src/client/main.cpp index eaffb08f..b5838de9 100644 --- a/src/client/main.cpp +++ b/src/client/main.cpp @@ -179,7 +179,7 @@ namespace } catch (std::exception& e) { - MessageBoxA(GetForegroundWindow(), e.what(), "ERROR", MB_ICONERROR); + MessageBoxA(nullptr, e.what(), "ERROR", MB_ICONERROR | MB_SETFOREGROUND | MB_TOPMOST); return 1; } }