Initial support for disabling logging, to provide a possible boost in performance for games that spam the log like crazy.

This commit is contained in:
The Dax
2013-07-27 19:39:49 -04:00
parent 8602c276ca
commit 528d81151a
6 changed files with 25 additions and 6 deletions
+6 -1
View File
@@ -963,7 +963,9 @@ namespace MainWindow
memoryWindow[0]->Show(true);
break;
case ID_DEBUG_LOG:
LogManager::GetInstance()->GetConsoleListener()->Show(LogManager::GetInstance()->GetConsoleListener()->Hidden());
if(g_Config.bEnableLogging)
LogManager::GetInstance()->GetConsoleListener()->Show(LogManager::GetInstance()->GetConsoleListener()->Hidden());
//else LogManager::GetInstance()->GetConsoleListener()->Close();
break;
case ID_OPTIONS_IGNOREILLEGALREADS:
@@ -1304,6 +1306,9 @@ namespace MainWindow
EnableMenuItem(menu,ID_TOGGLE_PAUSE, !menuEnable);
EnableMenuItem(menu,ID_EMULATION_STOP, !menuEnable);
EnableMenuItem(menu,ID_EMULATION_RESET, !menuEnable);
EnableMenuItem(menu, ID_DEBUG_LOG, g_Config.bEnableLogging ? MF_ENABLED : MF_GRAYED);
if(!g_Config.bEnableLogging && !LogManager::GetInstance()->GetConsoleListener()->Hidden())
LogManager::GetInstance()->GetConsoleListener()->Show(false);
}
// Message handler for about box.