transfer GUI popups to CxbxPopupMsg variant

This commit is contained in:
RadWolfie 2020-06-11 11:29:39 -05:00
parent ce3626eb9d
commit 5bc4eee10b
6 changed files with 74 additions and 66 deletions

View File

@ -25,10 +25,13 @@
// *
// ******************************************************************
#define LOG_PREFIX CXBXR_MODULE::GUI
#include "InputWindow.h"
#include "gui/resource/ResCxbx.h"
#include "common\IPCHybrid.hpp"
#include "EmuShared.h"
#include "Logging.h"
#include <future>
#define INPUT_TIMEOUT 5000
@ -108,10 +111,10 @@ InputWindow::~InputWindow()
bool InputWindow::IsProfileSaved()
{
if (m_bHasChanges) {
int ret = MessageBox(m_hwnd_window, "Current configuration is not saved. Save before closing?", "Cxbx-Reloaded", MB_YESNOCANCEL | MB_ICONWARNING | MB_APPLMODAL);
MsgDlgRet ret = CxbxPopupMsgQuestionSimple(m_hwnd_window, "Current configuration is not saved. Save before closing?");
switch (ret)
{
case IDYES: {
case MsgDlgRet::RET_YES: {
char name[50];
SendMessage(m_hwnd_profile_list, WM_GETTEXT, sizeof(name), reinterpret_cast<LPARAM>(name));
if (SaveProfile(std::string(name))) {
@ -120,11 +123,11 @@ bool InputWindow::IsProfileSaved()
return false;
}
case IDNO: {
case MsgDlgRet::RET_NO: {
return true;
}
case IDCANCEL:
case MsgDlgRet::RET_CANCEL:
default: {
return false;
}
@ -342,11 +345,11 @@ void InputWindow::LoadProfile(const std::string& name)
bool InputWindow::SaveProfile(const std::string& name)
{
if (name == std::string()) {
MessageBox(m_hwnd_window, "Cannot save. Profile name must not be empty", "Cxbx-Reloaded", MB_OK | MB_ICONSTOP | MB_APPLMODAL);
(void)CxbxPopupMsgErrorSimple(m_hwnd_window, "Cannot save. Profile name must not be empty.");
return false;
}
if (m_host_dev == std::string()) {
MessageBox(m_hwnd_window, "Cannot save. No input devices detected", "Cxbx-Reloaded", MB_OK | MB_ICONSTOP | MB_APPLMODAL);
(void)CxbxPopupMsgErrorSimple(m_hwnd_window, "Cannot save. No input devices detected", "Cxbx-Reloaded");
return false;
}
OverwriteProfile(name);

View File

@ -25,7 +25,10 @@
// *
// ******************************************************************
#define LOG_PREFIX CXBXR_MODULE::GUI
#include "common\Settings.hpp" // for g_Settings
#include "common/Logging.h"
#include "DlgAudioConfig.h"
#include "resource/ResCxbx.h"
@ -123,14 +126,14 @@ INT_PTR CALLBACK DlgAudioConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPAR
/*! if changes have been made, check if the user wants to save them */
if(g_bHasChanges)
{
int ret = MessageBox(hWndDlg, "Do you wish to apply your changes?", "Cxbx-Reloaded", MB_ICONQUESTION | MB_YESNOCANCEL);
MsgDlgRet ret = CxbxPopupMsgQuestionSimple(hWndDlg, "Do you wish to apply your changes?");
switch(ret)
{
case IDYES:
case MsgDlgRet::RET_YES:
PostMessage(hWndDlg, WM_COMMAND, IDC_AC_ACCEPT, 0);
break;
case IDNO:
case MsgDlgRet::RET_NO:
PostMessage(hWndDlg, WM_COMMAND, IDC_AC_CANCEL, 0);
break;
}
@ -226,8 +229,7 @@ VOID RefreshAudioAdapter()
if (pGUID == (LPGUID)CB_ERR) {
SendMessage(g_hAudioAdapter, CB_SETCURSEL, 0, 0);
g_Settings->m_audio = g_XBAudio;
MessageBox(nullptr, "Your selected audio adapter is invalid,\n"
"reverting to default audio adapter.", "Cxbx-Reloaded", MB_OK | MB_ICONEXCLAMATION);
(void)CxbxPopupMsgWarnSimple(nullptr, "Your selected audio adapter is invalid,\nreverting to default audio adapter.");
}
}
}

View File

@ -25,10 +25,13 @@
// *
// ******************************************************************
#define LOG_PREFIX CXBXR_MODULE::GUI
#include "Windows.h"
#include "resource/ResCxbx.h"
#include "input\InputWindow.h"
#include "gui\DlgInputConfig.h"
#include "common/Logging.h"
static INT_PTR CALLBACK DlgRumbleConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
@ -108,7 +111,7 @@ INT_PTR CALLBACK DlgXidControllerConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wPar
case IDC_XID_CLEAR: {
if (HIWORD(wParam) == BN_CLICKED) {
if (MessageBox(hWndDlg, "Remove all button bindings. Ok?", "Cxbx-Reloaded", MB_OKCANCEL | MB_ICONINFORMATION | MB_APPLMODAL) == IDOK) {
if (CxbxPopupMsgQuestion(hWndDlg, LOG_LEVEL::WARNING, MsgDlgButtons::YES_NO, MsgDlgRet::RET_NO, "Are you sure you want to remove all button bindings?") == MsgDlgRet::RET_YES) {
g_InputWindow->ClearBindings();
}
}

View File

@ -25,12 +25,15 @@
// *
// ******************************************************************
#define LOG_PREFIX CXBXR_MODULE::GUI
#include <fstream>
#include <cstring> // For memcpy
#include "EmuEEPROM.h" // For EEPROMInfo, EEPROMInfos
#include "core\kernel\init\CxbxKrnl.h"
#include "DlgEepromConfig.h"
#include "resource/ResCxbx.h"
#include "common/Logging.h"
#include <Commctrl.h>
@ -208,7 +211,7 @@ void ShowEepromConfig(HWND hwnd)
EepromFile.close();
}
else {
MessageBox(hwnd, "Couldn't open eeprom file!", "Cxbx-Reloaded", MB_ICONEXCLAMATION | MB_OK);
(void)CxbxPopupMsgWarnSimple(hwnd, "Couldn't open eeprom file!");
return;
}
}
@ -456,7 +459,7 @@ INT_PTR CALLBACK DlgEepromConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPA
EepromFile.close();
}
else {
MessageBox(hWndDlg, "Couldn't write eeprom file to disk!", "Cxbx-Reloaded", MB_ICONEXCLAMATION | MB_OK);
(void)CxbxPopupMsgWarnSimple(hWndDlg, "Couldn't write eeprom file to disk!");
}
}
PostMessage(hWndDlg, WM_COMMAND, IDC_EE_CANCEL, 0);

View File

@ -25,6 +25,8 @@
// *
// ******************************************************************
#define LOG_PREFIX CXBXR_MODULE::GUI
// Without this, you'll get a ton of errors from the std library for some unknown reason...
#include "Logging.h"
@ -159,14 +161,14 @@ INT_PTR CALLBACK DlgVideoConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPAR
/*! if changes have been made, check if the user wants to save them */
if(g_bHasChanges)
{
int ret = MessageBox(hWndDlg, "Do you wish to apply your changes?", "Cxbx-Reloaded", MB_ICONQUESTION | MB_YESNOCANCEL);
MsgDlgRet ret = CxbxPopupMsgQuestionSimple(hWndDlg, "Do you wish to apply your changes?");
switch(ret)
{
case IDYES:
case MsgDlgRet::RET_YES:
PostMessage(hWndDlg, WM_COMMAND, IDC_VC_ACCEPT, 0);
break;
case IDNO:
case MsgDlgRet::RET_NO:
PostMessage(hWndDlg, WM_COMMAND, IDC_VC_CANCEL, 0);
break;
}

View File

@ -647,7 +647,8 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
// ask permission to overwrite if file already exists
if (_access(ofn.lpstrFile, 0) != -1)
{
if (MessageBox(m_hwnd, "Overwrite existing file?", "Cxbx-Reloaded", MB_ICONQUESTION | MB_YESNO) != IDYES)
if (CxbxPopupMsgQuestion(m_hwnd, LOG_LEVEL::WARNING, MsgDlgButtons::YES_NO, MsgDlgRet::RET_NO,
"Overwrite existing file?") != MsgDlgRet::RET_YES)
return TRUE;
}
@ -718,16 +719,14 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
}
if (m_Xbe->HasError())
MessageBox(m_hwnd, m_Xbe->GetError().c_str(), "Cxbx-Reloaded", MB_ICONSTOP | MB_OK);
(void)CxbxPopupMsgErrorSimple(m_hwnd, m_Xbe->GetError().c_str());
else
{
char buffer[255];
sprintf(buffer, "%s's logo bitmap was successfully exported.", m_Xbe->m_szAsciiTitle);
MessageBox(m_hwnd, buffer, "Cxbx-Reloaded", MB_ICONINFORMATION | MB_OK);
printf("WndMain: %s\n", buffer);
(void)CxbxPopupMsgInfoSimple(m_hwnd, buffer);
}
}
}
@ -804,7 +803,7 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
if (bmp_err != 0)
{
MessageBox(m_hwnd, bmp_err, "Cxbx-Reloaded", MB_OK | MB_ICONEXCLAMATION);
(void)CxbxPopupMsgErrorSimple(m_hwnd, bmp_err);
break;
}
}
@ -813,7 +812,7 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
if (m_Xbe->HasError())
{
MessageBox(m_hwnd, m_Xbe->GetError().c_str(), "Cxbx-Reloaded", MB_ICONSTOP | MB_OK);
(void)CxbxPopupMsgErrorSimple(m_hwnd, m_Xbe->GetError().c_str());
if (m_Xbe->HasFatalError())
{
@ -835,9 +834,7 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
sprintf(buffer, "%s's logo bitmap was successfully updated.", m_Xbe->m_szAsciiTitle);
printf("WndMain: %s\n", buffer);
MessageBox(m_hwnd, buffer, "Cxbx-Reloaded", MB_ICONINFORMATION | MB_OK);
(void)CxbxPopupMsgInfoSimple(m_hwnd, buffer);
}
}
}
@ -917,7 +914,7 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
// ask permission to overwrite if file exists
if (_access(ofn.lpstrFile, 0) != -1)
{
if (MessageBox(m_hwnd, "Overwrite existing file?", "Cxbx-Reloaded", MB_ICONQUESTION | MB_YESNO) != IDYES)
if (CxbxPopupMsgQuestionSimple(m_hwnd, "Overwrite existing file?") != MsgDlgRet::RET_YES)
return TRUE;
}
@ -925,7 +922,7 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
{
std::string Xbe_info = DumpInformation(m_Xbe);
if (m_Xbe->HasError()) {
MessageBox(m_hwnd, m_Xbe->GetError().c_str(), "Cxbx-Reloaded", MB_ICONSTOP | MB_OK);
(void)CxbxPopupMsgErrorSimple(m_hwnd, m_Xbe->GetError().c_str());
}
else {
std::ofstream Xbe_dump_file(ofn.lpstrFile);
@ -934,11 +931,10 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
Xbe_dump_file.close();
char buffer[255];
sprintf(buffer, "%s's .xbe info was successfully dumped.", m_Xbe->m_szAsciiTitle);
printf("WndMain: %s\n", buffer);
MessageBox(m_hwnd, buffer, "Cxbx-Reloaded", MB_ICONINFORMATION | MB_OK);
(void)CxbxPopupMsgInfoSimple(m_hwnd, buffer);
}
else {
MessageBox(m_hwnd, "Could not open Xbe text file.", "Cxbx-Reloaded", MB_ICONSTOP | MB_OK);
(void)CxbxPopupMsgErrorSimple(m_hwnd, "Could not open Xbe text file.");
}
}
}
@ -950,7 +946,7 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
{
std::string Xbe_info = DumpInformation(m_Xbe);
if (m_Xbe->HasError()) {
MessageBox(m_hwnd, m_Xbe->GetError().c_str(), "Cxbx-Reloaded", MB_ICONSTOP | MB_OK);
(void)CxbxPopupMsgErrorSimple(m_hwnd, m_Xbe->GetError().c_str());
}
else {
std::cout << Xbe_info;
@ -982,7 +978,7 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
if (m_bIsStarted) {
// We don't allow changing the contents of the eeprom while a game is running, mostly because we lack a "pause emulation"
// function necessary to modify the contents safely (the game itself can modify the eeprom)
MessageBox(hwnd, "Cannot modify eeprom file while a title is running", "Cxbx-Reloaded", MB_ICONEXCLAMATION | MB_OK);
(void)CxbxPopupMsgErrorSimple(hwnd, "Cannot modify eeprom file while a title is running");
break;
}
ShowEepromConfig(hwnd);
@ -1018,24 +1014,24 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
// -14 is for \\Cxbx-Reloaded string to be include later down below.
size_t szLen = strnlen(szDir, MAX_PATH - 14);
if (szLen == 0) {
MessageBox(hwnd, "You've selected an invalid folder... Go back and try again.", "Cxbx-Reloaded", MB_ICONEXCLAMATION | MB_OK);
(void)CxbxPopupMsgErrorSimple(hwnd, "You've selected an invalid folder... Go back and try again.");
break;
}
else if (szLen == MAX_PATH - 14) {
MessageBox(hwnd, "You've selected a folder path which is too long... Go back and try again.", "Cxbx-Reloaded", MB_ICONEXCLAMATION | MB_OK);
(void)CxbxPopupMsgErrorSimple(hwnd, "You've selected a folder path which is too long... Go back and try again.");
break;
}
std::string szDirTemp = std::string(szDir) + std::string("\\Cxbx-Reloaded");
if (szDirTemp.size() > MAX_PATH) {
MessageBox(hwnd, "Directory path is too long. Go back and choose a shorter path.", "Cxbx-Reloaded", MB_ICONEXCLAMATION | MB_OK);
(void)CxbxPopupMsgErrorSimple(hwnd, "Directory path is too long. Go back and choose a shorter path.");
break;
}
int result = SHCreateDirectoryEx(nullptr, szDirTemp.c_str(), nullptr);
if ((result != ERROR_SUCCESS) && (result != ERROR_ALREADY_EXISTS)) {
MessageBox(hwnd, "You don't have write permissions on that directory...", "Cxbx-Reloaded", MB_ICONEXCLAMATION | MB_OK);
(void)CxbxPopupMsgErrorSimple(hwnd, "You don't have write permissions on that directory...");
break;
}
@ -1063,7 +1059,7 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
case ID_CACHE_CLEARHLECACHE_ALL:
{
ClearSymbolCache(g_Settings->GetDataLocation().c_str());
MessageBox(m_hwnd, "The entire Symbol Cache has been cleared.", "Cxbx-Reloaded", MB_OK);
(void)CxbxPopupMsgInfoSimple(m_hwnd, "The entire Symbol Cache has been cleared.");
}
break;
@ -1080,19 +1076,19 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
std::string fullpath = sstream.str();
if (std::filesystem::remove(fullpath)) {
MessageBox(m_hwnd, "This title's Symbol Cache entry has been cleared.", "Cxbx-Reloaded", MB_OK);
(void)CxbxPopupMsgInfoSimple(m_hwnd, "This title's Symbol Cache entry has been cleared.");
}
}
break;
case ID_SETTINGS_INITIALIZE:
{
int ret = MessageBox(m_hwnd, "Warning: This will reset all Cxbx-Reloaded settings to their default values."
"\nAre you sure you want to proceed?", "Cxbx-Reloaded", MB_ICONEXCLAMATION | MB_YESNO);
MsgDlgRet ret = CxbxPopupMsgWarn(m_hwnd, MsgDlgButtons::YES_NO, MsgDlgRet::RET_NO,
"Warning: This will reset all Cxbx-Reloaded settings to their default values.\nAre you sure you want to proceed?", "Cxbx-Reloaded");
if (ret == IDYES) {
if (ret == MsgDlgRet::RET_YES) {
InitializeSettings();
MessageBox(m_hwnd, "Cxbx-Reloaded has been initialized and will now close.", "Cxbx-Reloaded", MB_ICONINFORMATION | MB_OK);
(void)CxbxPopupMsgInfoSimple(m_hwnd, "Cxbx-Reloaded has been initialized and will now close.");
SendMessage(hwnd, WM_CLOSE, 0, 0);
}
}
@ -1106,7 +1102,7 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
else {
g_Settings->m_core.KrnlDebugMode = DM_NONE;
}
MessageBox(m_hwnd, "This will not take effect until the next time emulation is started.\n", "Cxbx-Reloaded", MB_OK);
(void)CxbxPopupMsgInfoSimple(m_hwnd, "This will not take effect until the next time emulation is started.");
RefreshMenus();
@ -1143,7 +1139,7 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
if (GetSaveFileName(&ofn) != FALSE)
{
MessageBox(m_hwnd, "This will not take effect until emulation is (re)started.\n", "Cxbx-Reloaded", MB_OK);
(void)CxbxPopupMsgInfoSimple(m_hwnd, "This will not take effect until emulation is (re)started.");
strncpy(g_Settings->m_core.szKrnlDebug, ofn.lpstrFile, MAX_PATH - 1);
@ -1274,9 +1270,10 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
case ID_HACKS_RUNXBOXTHREADSONALLCORES:
if (g_Settings->m_hacks.UseAllCores == false) {
int ret = MessageBox(hwnd, "Activating this hack will make the emulator more likely to crash and/or hang. \
Please do not report issues with games while this hack is active. Are you sure you want to turn it on?", "Cxbx-Reloaded", MB_YESNO | MB_ICONWARNING | MB_APPLMODAL);
if (ret == IDNO) {
MsgDlgRet ret = CxbxPopupMsgWarn(hwnd, MsgDlgButtons::YES_NO, MsgDlgRet::RET_NO,
"Activating this hack will make the emulator more likely to crash and/or hang."
"\nPlease do not report issues with games while this hack is active. Are you sure you want to turn it on?");
if (ret != MsgDlgRet::RET_YES) {
break;
}
}
@ -1433,7 +1430,7 @@ void WndMain::LoadLogo()
if(m_Xbe->HasError())
{
MessageBox(m_hwnd, m_Xbe->GetError().c_str(), "Cxbx-Reloaded", MB_ICONEXCLAMATION | MB_OK);
(void)CxbxPopupMsgErrorSimple(m_hwnd, m_Xbe->GetError().c_str());
if (m_Xbe->HasFatalError())
{
@ -1998,7 +1995,7 @@ void WndMain::OpenXbe(const char *x_filename)
RedrawWindow(m_hwnd, nullptr, NULL, RDW_INVALIDATE);
MessageBox(m_hwnd, ErrorMessage.c_str(), "Cxbx-Reloaded", MB_ICONSTOP | MB_OK);
(void)CxbxPopupMsgErrorSimple(m_hwnd, ErrorMessage.c_str());
UpdateCaption();
@ -2007,10 +2004,11 @@ void WndMain::OpenXbe(const char *x_filename)
if (!g_Settings->m_gui.bIgnoreInvalidXbeSig && !m_Xbe->CheckXbeSignature())
{
int ret = MessageBox(m_hwnd, "XBE signature check failed!\n"
MsgDlgRet ret = CxbxPopupMsgWarn(m_hwnd, MsgDlgButtons::YES_NO, MsgDlgRet::RET_NO,
"XBE signature check failed!\n"
"\nThis is dangerous, as maliciously modified Xbox titles could take control of your system.\n"
"\nAre you sure you want to continue?", "Cxbx-Reloaded", MB_ICONEXCLAMATION | MB_YESNO);
if (ret != IDYES)
"\nAre you sure you want to continue?");
if (ret != MsgDlgRet::RET_YES)
{
delete m_Xbe; m_Xbe = nullptr;
@ -2079,11 +2077,11 @@ void WndMain::CloseXbe()
if(m_bXbeChanged)
{
int ret = MessageBox(m_hwnd, "Changes have been made, do you wish to save?", "Cxbx-Reloaded", MB_ICONQUESTION | MB_YESNOCANCEL);
MsgDlgRet ret = CxbxPopupMsgQuestionSimple(m_hwnd, "Changes have been made, do you wish to save?");
if(ret == IDYES)
if(ret == MsgDlgRet::RET_YES)
SaveXbeAs();
else if(ret == IDCANCEL)
else if(ret == MsgDlgRet::RET_CANCEL)
return;
}
@ -2147,7 +2145,7 @@ void WndMain::SaveXbe(const char *x_filename)
// ask permission to overwrite if the file already exists
if(_access(x_filename, 0) != -1)
{
if(MessageBox(m_hwnd, "Overwrite existing file?", "Cxbx-Reloaded", MB_ICONQUESTION | MB_YESNO) != IDYES)
if(CxbxPopupMsgQuestion(m_hwnd, LOG_LEVEL::INFO, MsgDlgButtons::YES_NO, MsgDlgRet::RET_NO, "Overwrite existing file?") != MsgDlgRet::RET_YES)
return;
}
@ -2156,16 +2154,14 @@ void WndMain::SaveXbe(const char *x_filename)
m_Xbe->Export(x_filename);
if(m_Xbe->HasError())
MessageBox(m_hwnd, m_Xbe->GetError().c_str(), "Cxbx-Reloaded", MB_ICONSTOP | MB_OK);
(void)CxbxPopupMsgErrorSimple(m_hwnd, m_Xbe->GetError().c_str());
else
{
char buffer[255];
sprintf(buffer, "%s was successfully saved.", m_Xbe->m_szAsciiTitle);
printf("WndMain: %s was successfully saved.\n", m_Xbe->m_szAsciiTitle);
MessageBox(m_hwnd, buffer, "Cxbx-Reloaded", MB_ICONINFORMATION | MB_OK);
(void)CxbxPopupMsgInfoSimple(m_hwnd, buffer);
m_bXbeChanged = false;
}
@ -2212,8 +2208,7 @@ void WndMain::StartEmulation(HWND hwndParent, DebuggerState LocalDebuggerState /
g_EmuShared->GetIsEmulating(&isEmulating);
if (isEmulating) {
MessageBox(m_hwnd, "A title is currently emulating, please stop emulation before attempting to start again.",
"Cxbx-Reloaded", MB_ICONERROR | MB_OK);
(void)CxbxPopupMsgErrorSimple(m_hwnd, "A title is currently emulating, please stop emulation before attempting to start again.");
return;
}
@ -2278,7 +2273,7 @@ void WndMain::StartEmulation(HWND hwndParent, DebuggerState LocalDebuggerState /
DebuggerMonitorClose();
if (!CxbxExec(true, &m_hDebuggerProc, true)) {
MessageBox(m_hwnd, "Failed to start emulation with the debugger.\n\nYou will need to build CxbxDebugger manually.", "Cxbx-Reloaded", MB_ICONSTOP | MB_OK);
(void)CxbxPopupMsgErrorSimple(m_hwnd, "Failed to start emulation with the debugger.\n\nYou will need to build CxbxDebugger manually.");
printf("WndMain: %s debugger shell failed.\n", m_Xbe->m_szAsciiTitle);
}
@ -2291,7 +2286,7 @@ void WndMain::StartEmulation(HWND hwndParent, DebuggerState LocalDebuggerState /
else {
if (!CxbxExec(false, nullptr, false)) {
MessageBox(m_hwnd, "Emulation failed.\n\n If this message repeats, the Xbe is not supported.", "Cxbx-Reloaded", MB_ICONSTOP | MB_OK);
(void)CxbxPopupMsgErrorSimple(m_hwnd, "Emulation failed.\n\n If this message repeats, the Xbe is not supported.");
printf("WndMain: %s shell failed.\n", m_Xbe->m_szAsciiTitle);
}