gui: Fix console log source menu item behaviour

Fixes an issue where the Enable all/Disable all/Restore Default menu
items in the Console Log Sources menu do not immediately enable/disable
CDVD log output.
This commit is contained in:
Jonathan Li 2016-02-15 19:45:54 +00:00
parent 999166fa58
commit aff75131e4
1 changed files with 6 additions and 3 deletions

View File

@ -511,7 +511,8 @@ void ConsoleLogFrame::OnEnableAllLogging(wxCommandEvent& evt)
log->Enabled = true;
}
DevConWriterEnabled = true;
g_Conf->EmuOptions.CdvdVerboseReads = true;
// Safe to change - it's read only in the core thread and only affects log output.
const_cast<Pcsx2Config&>(EmuConfig).CdvdVerboseReads = g_Conf->EmuOptions.CdvdVerboseReads = true;
OnLoggingChanged();
evt.Skip();
@ -526,7 +527,8 @@ void ConsoleLogFrame::OnDisableAllLogging(wxCommandEvent& evt)
log->Enabled = false;
}
DevConWriterEnabled = false;
g_Conf->EmuOptions.CdvdVerboseReads = false;
// Safe to change - it's read only in the core thread and only affects log output.
const_cast<Pcsx2Config&>(EmuConfig).CdvdVerboseReads = g_Conf->EmuOptions.CdvdVerboseReads = false;
OnLoggingChanged();
evt.Skip();
@ -541,7 +543,8 @@ void ConsoleLogFrame::OnSetDefaultLogging(wxCommandEvent& evt)
log->Enabled = ConLogDefaults[i];
}
DevConWriterEnabled = false;
g_Conf->EmuOptions.CdvdVerboseReads = false;
// Safe to change - it's read only in the core thread and only affects log output.
const_cast<Pcsx2Config&>(EmuConfig).CdvdVerboseReads = g_Conf->EmuOptions.CdvdVerboseReads = false;
OnLoggingChanged();
evt.Skip();