From 93962a9de4811c0161d79c6d02cb879a14231630 Mon Sep 17 00:00:00 2001 From: RadWolfie Date: Sat, 13 Jun 2020 17:35:59 -0500 Subject: [PATCH] fix typos --- src/common/Logging.cpp | 20 ++++++++++---------- src/common/Logging.h | 6 +++--- src/common/Settings.cpp | 6 +++--- src/common/Settings.hpp | 2 +- src/common/win32/EmuShared.h | 4 ++-- src/gui/DlgLoggingConfig.cpp | 16 ++++++++-------- src/gui/resource/Cxbx.rc | 2 +- 7 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/common/Logging.cpp b/src/common/Logging.cpp index ae1279b8e..75ea30004 100644 --- a/src/common/Logging.cpp +++ b/src/common/Logging.cpp @@ -102,8 +102,8 @@ const char* g_EnumModules2String[to_underlying(CXBXR_MODULE::MAX)] = { "XE ", }; std::atomic_int g_CurrentLogLevel = to_underlying(LOG_LEVEL::INFO); -std::atomic_bool g_CurrentLogPopupTestcase = true; -static bool g_bFullScreen = false; +std::atomic_bool g_CurrentLogPopupTestCase = true; +static bool g_disablePopupMessages = false; const char log_debug[] = "DEBUG: "; const char log_info[] = "INFO : "; @@ -195,21 +195,21 @@ void NTAPI EmuLogInit(LOG_LEVEL level, const char *szWarningMessage, ...) // Set up the logging variables for the GUI process inline void log_get_settings() { - log_set_config(g_Settings->m_core.LogLevel, g_Settings->m_core.LoggedModules, g_Settings->m_core.bLogPopupTestcase); + log_set_config(g_Settings->m_core.LogLevel, g_Settings->m_core.LoggedModules, g_Settings->m_core.bLogPopupTestCase); } inline void log_sync_config() { int LogLevel; unsigned int LoggedModules[NUM_INTEGERS_LOG]; - bool LogPopupTestcase; + bool LogPopupTestCase; g_EmuShared->GetLogLv(&LogLevel); g_EmuShared->GetLogModules(LoggedModules); - g_EmuShared->GetLogPopupTestcase(&LogPopupTestcase); - log_set_config(LogLevel, LoggedModules, LogPopupTestcase); + g_EmuShared->GetLogPopupTestCase(&LogPopupTestCase); + log_set_config(LogLevel, LoggedModules, LogPopupTestCase); } -void log_set_config(int LogLevel, unsigned int* LoggedModules, bool LogPopupTestcase) +void log_set_config(int LogLevel, unsigned int* LoggedModules, bool LogPopupTestCase) { g_CurrentLogLevel = LogLevel; for (unsigned int index = to_underlying(CXBXR_MODULE::CXBXR); index < to_underlying(CXBXR_MODULE::MAX); index++) { @@ -220,7 +220,7 @@ void log_set_config(int LogLevel, unsigned int* LoggedModules, bool LogPopupTest g_EnabledModules[index] = false; } } - g_CurrentLogPopupTestcase = LogPopupTestcase; + g_CurrentLogPopupTestCase = LogPopupTestCase; } // Generate active log filter output. @@ -245,13 +245,13 @@ void log_init_popup_msg() { Settings::s_video vSettings; g_EmuShared->GetVideoSettings(&vSettings); - g_bFullScreen = vSettings.bFullScreen; + g_disablePopupMessages = vSettings.bFullScreen; } MsgDlgRet CxbxMessageBox(const char* msg, MsgDlgRet ret_default, UINT uType, HWND hWnd) { // If user is using exclusive fullscreen, we need to refrain all popups. - if (g_bFullScreen) { + if (g_disablePopupMessages) { return ret_default; } int ret = MessageBox(hWnd, msg, /*lpCaption=*/TEXT("Cxbx-Reloaded"), uType); diff --git a/src/common/Logging.h b/src/common/Logging.h index 3f944a754..d4e7599c4 100644 --- a/src/common/Logging.h +++ b/src/common/Logging.h @@ -116,7 +116,7 @@ typedef enum class _CXBXR_MODULE: unsigned int { extern std::atomic_bool g_EnabledModules[to_underlying(CXBXR_MODULE::MAX)]; extern const char* g_EnumModules2String[to_underlying(CXBXR_MODULE::MAX)]; extern std::atomic_int g_CurrentLogLevel; -extern std::atomic_bool g_CurrentLogPopupTestcase; +extern std::atomic_bool g_CurrentLogPopupTestCase; // print out a log message to the console or kernel debug log file if level is high enough void NTAPI EmuLogEx(CXBXR_MODULE cxbxr_module, LOG_LEVEL level, const char *szWarningMessage, ...); @@ -128,7 +128,7 @@ extern inline void log_get_settings(); extern inline void log_sync_config(); -void log_set_config(int LogLevel, unsigned int* LoggedModules, bool LogPopupTestcase); +void log_set_config(int LogLevel, unsigned int* LoggedModules, bool LogPopupTestCase); void log_generate_active_filter_output(const CXBXR_MODULE cxbxr_module); @@ -189,7 +189,7 @@ extern inline void EmuLogOutputEx(CXBXR_MODULE cxbxr_module, LOG_LEVEL level, co if (bTestCaseLogged) break; \ bTestCaseLogged = true; \ bool logOnly = true; \ - if (g_CurrentLogPopupTestcase) { \ + if (g_CurrentLogPopupTestCase) { \ LOG_CHECK_ENABLED(LOG_LEVEL::INFO) { \ (void)CxbxPopupMsgInfoSimple(nullptr, "Please report that %s shows the following message:\nLOG_TEST_CASE: %s\nIn %s (%s line %d)", \ CxbxKrnl_Xbe->m_szAsciiTitle, message, __func__, __FILE__, __LINE__); \ diff --git a/src/common/Settings.cpp b/src/common/Settings.cpp index 8fea9723f..b3ed34fab 100644 --- a/src/common/Settings.cpp +++ b/src/common/Settings.cpp @@ -95,7 +95,7 @@ static struct { const char* LoggedModules = "LoggedModules"; const char* LogLevel = "LogLevel"; const char* LoaderExecutable = "LoaderExecutable"; - const char* LogPopupTestcase = "LogPopupTestcase"; + const char* LogPopupTestCase = "LogPopupTestCase"; } sect_core_keys; static const char* section_video = "video"; @@ -358,7 +358,7 @@ bool Settings::LoadConfig() m_core.LoggedModules[index] = 0; index++; } - m_core.bLogPopupTestcase = m_si.GetBoolValue(section_core, sect_core_keys.LogPopupTestcase, /*Default=*/true); + m_core.bLogPopupTestCase = m_si.GetBoolValue(section_core, sect_core_keys.LogPopupTestCase, /*Default=*/true); m_core.bUseLoaderExec = m_si.GetBoolValue(section_core, sect_core_keys.LoaderExecutable, /*Default=*/true); @@ -538,7 +538,7 @@ bool Settings::Save(std::string file_path) stream << "0x" << std::hex << m_core.LoggedModules[i]; m_si.SetValue(section_core, sect_core_keys.LoggedModules, stream.str().c_str(), nullptr, false); } - m_si.SetBoolValue(section_core, sect_core_keys.LogPopupTestcase, m_core.bLogPopupTestcase, nullptr, true); + m_si.SetBoolValue(section_core, sect_core_keys.LogPopupTestCase, m_core.bLogPopupTestCase, nullptr, true); m_si.SetBoolValue(section_core, sect_core_keys.LoaderExecutable, m_core.bUseLoaderExec, nullptr, true); diff --git a/src/common/Settings.hpp b/src/common/Settings.hpp index c72da607b..cac692f16 100644 --- a/src/common/Settings.hpp +++ b/src/common/Settings.hpp @@ -102,7 +102,7 @@ public: int LogLevel = 1; bool bUseLoaderExec; bool allowAdminPrivilege; - bool bLogPopupTestcase; + bool bLogPopupTestCase; bool Reserved4 = 0; int Reserved99[10] = { 0 }; } m_core; diff --git a/src/common/win32/EmuShared.h b/src/common/win32/EmuShared.h index d3397db02..52f8a1b5d 100644 --- a/src/common/win32/EmuShared.h +++ b/src/common/win32/EmuShared.h @@ -227,8 +227,8 @@ class EmuShared : public Mutex // ****************************************************************** // * Log Level value Accessors // ****************************************************************** - void GetLogPopupTestcase(bool *value) { Lock(); *value = m_core.bLogPopupTestcase; Unlock(); } - void SetLogPopupTestcase(bool value) { Lock(); m_core.bLogPopupTestcase = value; Unlock(); } + void GetLogPopupTestCase(bool *value) { Lock(); *value = m_core.bLogPopupTestCase; Unlock(); } + void SetLogPopupTestCase(bool value) { Lock(); m_core.bLogPopupTestCase = value; Unlock(); } // ****************************************************************** // * File storage location diff --git a/src/gui/DlgLoggingConfig.cpp b/src/gui/DlgLoggingConfig.cpp index 54324801e..0d09a036f 100644 --- a/src/gui/DlgLoggingConfig.cpp +++ b/src/gui/DlgLoggingConfig.cpp @@ -121,7 +121,7 @@ INT_PTR CALLBACK DlgLogConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPARAM int TempLevel; unsigned int LoggedModules[NUM_INTEGERS_LOG]; int LogLevel; - bool LogPopupTestcase; + bool LogPopupTestCase; // Set window icon SetClassLong(hWndDlg, GCL_HICON, (LONG)LoadIcon(GetModuleHandle(nullptr), MAKEINTRESOURCE(IDI_CXBX))); @@ -129,7 +129,7 @@ INT_PTR CALLBACK DlgLogConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPARAM LoggedModules[0] = g_Settings->m_core.LoggedModules[0]; LoggedModules[1] = g_Settings->m_core.LoggedModules[1]; LogLevel = g_Settings->m_core.LogLevel; - LogPopupTestcase = g_Settings->m_core.bLogPopupTestcase; + LogPopupTestCase = g_Settings->m_core.bLogPopupTestCase; hHandle = GetDlgItem(hWndDlg, IDC_EVENT_LV); TempLevel = to_underlying(LOG_LEVEL::DEBUG); @@ -146,7 +146,7 @@ INT_PTR CALLBACK DlgLogConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPARAM } } - if (LogPopupTestcase) { + if (LogPopupTestCase) { (void)SendMessage(GetDlgItem(hWndDlg, IDC_LOG_POPUP_TESTCASE), BM_SETCHECK, BST_CHECKED, 0); } @@ -239,18 +239,18 @@ INT_PTR CALLBACK DlgLogConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPARAM } } - bool LogPopupTestcase = false; + bool LogPopupTestCase = false; if (SendMessage(GetDlgItem(hWndDlg, IDC_LOG_POPUP_TESTCASE), BM_GETCHECK, 0, 0) == BST_CHECKED) { - LogPopupTestcase = true; + LogPopupTestCase = true; } g_Settings->m_core.LoggedModules[0] = LoggedModules[0]; g_Settings->m_core.LoggedModules[1] = LoggedModules[1]; g_Settings->m_core.LogLevel = LogLevel; - g_Settings->m_core.bLogPopupTestcase = LogPopupTestcase; + g_Settings->m_core.bLogPopupTestCase = LogPopupTestCase; // Update the logging variables for the GUI process - log_set_config(LogLevel, LoggedModules, LogPopupTestcase); + log_set_config(LogLevel, LoggedModules, LogPopupTestCase); log_generate_active_filter_output(CXBXR_MODULE::GUI); // Also inform the kernel process if it exists @@ -258,7 +258,7 @@ INT_PTR CALLBACK DlgLogConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPARAM // Sync updated log to kernel process to use run-time settings. g_EmuShared->SetLogLv(&LogLevel); g_EmuShared->SetLogModules(LoggedModules); - g_EmuShared->SetLogPopupTestcase(LogPopupTestcase); + g_EmuShared->SetLogPopupTestCase(LogPopupTestCase); ipc_send_kernel_update(IPC_UPDATE_KERNEL::CONFIG_LOGGING_SYNC, 0, reinterpret_cast(g_ChildWnd)); } } diff --git a/src/gui/resource/Cxbx.rc b/src/gui/resource/Cxbx.rc index 42138060d..09df49c95 100644 --- a/src/gui/resource/Cxbx.rc +++ b/src/gui/resource/Cxbx.rc @@ -401,7 +401,7 @@ FONT 8, "Verdana", 0, 0, 0x1 BEGIN COMBOBOX IDC_EVENT_LV,57,9,50,10,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CTEXT "Event Level",IDC_STATIC,10,11,40,10,0,WS_EX_RIGHT - CONTROL "Popup Testcase",IDC_LOG_POPUP_TESTCASE,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,121,11,64,10 + CONTROL "Test Case Popup",IDC_LOG_POPUP_TESTCASE,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,121,11,64,10 GROUPBOX "Emulator Event",IDC_CXBXR_EVENTS,12,26,234,186,WS_GROUP,WS_EX_CLIENTEDGE CONTROL "Enable all",IDC_LOG_ENABLE_GENERAL,"Button",BS_AUTORADIOBUTTON | BS_LEFTTEXT,19,39,47,10 CONTROL "Disable all",IDC_LOG_DISABLE_GENERAL,"Button",BS_AUTORADIOBUTTON | BS_LEFTTEXT,71,39,50,10