fix typos
This commit is contained in:
parent
d881695cf4
commit
93962a9de4
|
@ -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);
|
||||
|
|
|
@ -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__); \
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<std::uintptr_t>(g_ChildWnd));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue