From a10200cbce667a780fdc8d54c566e26557582332 Mon Sep 17 00:00:00 2001 From: cxd4 Date: Mon, 25 Jan 2016 15:31:04 -0500 Subject: [PATCH 1/2] [Glide64] NULL MessageBox title instead of "Error" According to MSDN, a MessageBox whose title param is a null pointer defaults to the text "Error". So instead of allocating extra bytes to pass a pointer to the string `"Error"`, why not pass NULL? Actually the real reason why I made this PR was me having OCD against a cosmetic spacing inconsistency introduced in this commit: https://github.com/project64/project64/commit/aefe8e603c04d543e2071174fab2f32e1c951476 . So if you prefer "Error" over NULL I'll just undo that part of this PR and keep the line break change in instead. :P --- Source/Glide64/rdp.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Glide64/rdp.cpp b/Source/Glide64/rdp.cpp index 7ab85ca43..f692f5bed 100644 --- a/Source/Glide64/rdp.cpp +++ b/Source/Glide64/rdp.cpp @@ -336,9 +336,9 @@ void microcheck() ReleaseGfx(); #ifdef _WIN32 - MessageBox(gfx.hWnd, stdstr_f("Error: uCode crc not found in INI, using currently selected uCode\n\n%08lx", uc_crc).c_str(), "Error", MB_OK | MB_ICONEXCLAMATION); - + MessageBox(gfx.hWnd, stdstr_f("Error: uCode crc not found in INI, using currently selected uCode\n\n%08lx", uc_crc).c_str(), NULL, MB_OK | MB_ICONEXCLAMATION); #endif + ucode_error_report = FALSE; // don't report any more ucode errors from this game } else if (uc == -1 && ucode_error_report) @@ -347,7 +347,7 @@ void microcheck() ReleaseGfx(); #ifdef _WIN32 - MessageBox(gfx.hWnd, stdstr_f("Error: Unsupported uCode!\n\ncrc: %08lx", uc_crc).c_str(), "Error", MB_OK | MB_ICONEXCLAMATION); + MessageBox(gfx.hWnd, stdstr_f("Error: Unsupported uCode!\n\ncrc: %08lx", uc_crc).c_str(), NULL, MB_OK | MB_ICONEXCLAMATION); #endif ucode_error_report = FALSE; // don't report any more ucode errors from this game @@ -4174,4 +4174,4 @@ void CALL ProcessRDPList(void) dp_status &= ~0x0002; //} -} \ No newline at end of file +} From 5952632d764dfda69e2f14041a0fcca330548c8b Mon Sep 17 00:00:00 2001 From: cxd4 Date: Mon, 25 Jan 2016 17:13:27 -0500 Subject: [PATCH 2/2] [Glide64] restored the explicit "Error" box titles --- Source/Glide64/rdp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Glide64/rdp.cpp b/Source/Glide64/rdp.cpp index f692f5bed..ada376522 100644 --- a/Source/Glide64/rdp.cpp +++ b/Source/Glide64/rdp.cpp @@ -336,7 +336,7 @@ void microcheck() ReleaseGfx(); #ifdef _WIN32 - MessageBox(gfx.hWnd, stdstr_f("Error: uCode crc not found in INI, using currently selected uCode\n\n%08lx", uc_crc).c_str(), NULL, MB_OK | MB_ICONEXCLAMATION); + MessageBox(gfx.hWnd, stdstr_f("Error: uCode crc not found in INI, using currently selected uCode\n\n%08lx", uc_crc).c_str(), "Error", MB_OK | MB_ICONEXCLAMATION); #endif ucode_error_report = FALSE; // don't report any more ucode errors from this game @@ -347,7 +347,7 @@ void microcheck() ReleaseGfx(); #ifdef _WIN32 - MessageBox(gfx.hWnd, stdstr_f("Error: Unsupported uCode!\n\ncrc: %08lx", uc_crc).c_str(), NULL, MB_OK | MB_ICONEXCLAMATION); + MessageBox(gfx.hWnd, stdstr_f("Error: Unsupported uCode!\n\ncrc: %08lx", uc_crc).c_str(), "Error", MB_OK | MB_ICONEXCLAMATION); #endif ucode_error_report = FALSE; // don't report any more ucode errors from this game