From a128053742febd808d69763bccd5d266586810b8 Mon Sep 17 00:00:00 2001 From: Takumi Sueda Date: Tue, 19 Apr 2022 01:22:15 +0900 Subject: [PATCH] Don't call MessageBox in WinMain to prevent freezing --- bootloader.cpp | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/bootloader.cpp b/bootloader.cpp index f80269f..6c24ca7 100644 --- a/bootloader.cpp +++ b/bootloader.cpp @@ -48,12 +48,6 @@ int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPTSTR lpCmd, int nShow) HINSTANCE lib = LoadLibrary(L"BrainLILO"); if (!lib) { - wchar_t buf[256]; - swprintf(buf, - L"Cannot perform a soft reset.\n" - L"BrainLILO was not loaded (0x%08x).", - GetLastError()); - showAlertWarning(buf, L"Error"); return 1; } @@ -61,23 +55,11 @@ int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPTSTR lpCmd, int nShow) RKDoSoftResetProc RKDoSoftReset = (RKDoSoftResetProc)GetProcAddress(lib, L"RKDoSoftReset"); if (!RKDoSoftReset) { - wchar_t buf[256]; - swprintf(buf, - L"Cannot perform a soft reset.\n" - L"RKDoSoftReset not found (0x%08x).", - GetLastError()); - showAlertWarning(buf, L"Error"); return 1; } if (!RKDoSoftReset()) { - wchar_t buf[256]; - swprintf(buf, - L"Cannot perform a soft reset.\n" - L"Operation failed (0x%08x).", - GetLastError()); - showAlertWarning(buf, L"Error"); return 1; } return 0;