feat: Add a native error message when glfw window creation fails (#1104)

Draft because I want to test it again tomorrow with all OSes, first

---------

Co-authored-by: Nik <werwolv98@gmail.com>
This commit is contained in:
iTrooz
2023-05-27 17:45:41 +02:00
committed by GitHub
parent e578127f67
commit 0ba011dbe1
7 changed files with 76 additions and 3 deletions

View File

@@ -37,6 +37,11 @@ namespace hex {
static float g_titleBarHeight;
static Microsoft::WRL::ComPtr<ITaskbarList4> g_taskbarList;
void nativeErrorMessage(const std::string &message) {
log::fatal(message);
MessageBox(NULL, message.c_str(), "Error", MB_ICONERROR | MB_OK);
}
// Custom Window procedure for receiving OS events
static LRESULT commonWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
switch (uMsg) {