From 2b8998af9126851b827ad305df7f3facc34aea54 Mon Sep 17 00:00:00 2001 From: raven02 Date: Sun, 25 May 2014 16:00:54 +0800 Subject: [PATCH] Hide debug console option --- rpcs3/Emu/DbgConsole.cpp | 4 ++-- rpcs3/Emu/SysCalls/lv2/SC_TTY.cpp | 5 ++++- rpcs3/Gui/MainFrame.cpp | 4 ++++ rpcs3/Ini.h | 4 ++++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/DbgConsole.cpp b/rpcs3/Emu/DbgConsole.cpp index 0e534c952a..bfd84fcfcc 100644 --- a/rpcs3/Emu/DbgConsole.cpp +++ b/rpcs3/Emu/DbgConsole.cpp @@ -6,7 +6,7 @@ BEGIN_EVENT_TABLE(DbgConsole, FrameBase) END_EVENT_TABLE() DbgConsole::DbgConsole() - : FrameBase(nullptr, wxID_ANY, "DbgConsole", "", wxDefaultSize, wxDefaultPosition, wxDEFAULT_FRAME_STYLE, true) + : FrameBase(nullptr, wxID_ANY, "Debug Console", "", wxDefaultSize, wxDefaultPosition, wxDEFAULT_FRAME_STYLE, true) , ThreadBase("DbgConsole thread") , m_output(nullptr) { @@ -91,4 +91,4 @@ void DbgConsole::OnQuit(wxCloseEvent& event) } //event.Skip(); -} \ No newline at end of file +} diff --git a/rpcs3/Emu/SysCalls/lv2/SC_TTY.cpp b/rpcs3/Emu/SysCalls/lv2/SC_TTY.cpp index 0eb3dcce12..0f3709dbb6 100644 --- a/rpcs3/Emu/SysCalls/lv2/SC_TTY.cpp +++ b/rpcs3/Emu/SysCalls/lv2/SC_TTY.cpp @@ -15,7 +15,10 @@ int sys_tty_write(u32 ch, u64 buf_addr, u32 len, u64 pwritelen_addr) if(ch > 15 || (s32)len <= 0) return CELL_EINVAL; if(!Memory.IsGoodAddr(buf_addr)) return CELL_EFAULT; - Emu.GetDbgCon().Write(ch, Memory.ReadString(buf_addr, len)); + if (!Ini.HLEHideDebugConsole.GetValue()) + { + Emu.GetDbgCon().Write(ch, Memory.ReadString(buf_addr, len)); + } if(!Memory.IsGoodAddr(pwritelen_addr)) return CELL_EFAULT; diff --git a/rpcs3/Gui/MainFrame.cpp b/rpcs3/Gui/MainFrame.cpp index 2762c0988f..6b5d46f1d4 100644 --- a/rpcs3/Gui/MainFrame.cpp +++ b/rpcs3/Gui/MainFrame.cpp @@ -379,6 +379,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) wxCheckBox* chbox_hle_hook_stfunc = new wxCheckBox(p_hle, wxID_ANY, "Hook static functions"); wxCheckBox* chbox_hle_savetty = new wxCheckBox(p_hle, wxID_ANY, "Save TTY output to file"); wxCheckBox* chbox_hle_exitonstop = new wxCheckBox(p_hle, wxID_ANY, "Exit RPCS3 when process finishes"); + wxCheckBox* chbox_hle_hide_debug_console = new wxCheckBox(p_hle, wxID_ANY, "Hide Debug Console"); //cbox_cpu_decoder->Append("DisAsm"); cbox_cpu_decoder->Append("Interpreter & DisAsm"); @@ -455,6 +456,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) chbox_hle_hook_stfunc ->SetValue(Ini.HLEHookStFunc.GetValue()); chbox_hle_savetty ->SetValue(Ini.HLESaveTTY.GetValue()); chbox_hle_exitonstop ->SetValue(Ini.HLEExitOnStop.GetValue()); + chbox_hle_hide_debug_console->SetValue(Ini.HLEHideDebugConsole.GetValue()); cbox_cpu_decoder ->SetSelection(Ini.CPUDecoderMode.GetValue() ? Ini.CPUDecoderMode.GetValue() - 1 : 0); cbox_spu_decoder ->SetSelection(Ini.SPUDecoderMode.GetValue() ? Ini.SPUDecoderMode.GetValue() - 1 : 0); @@ -522,6 +524,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) s_subpanel_hle->Add(chbox_hle_hook_stfunc, wxSizerFlags().Border(wxALL, 5).Expand()); s_subpanel_hle->Add(chbox_hle_savetty, wxSizerFlags().Border(wxALL, 5).Expand()); s_subpanel_hle->Add(chbox_hle_exitonstop, wxSizerFlags().Border(wxALL, 5).Expand()); + s_subpanel_hle->Add(chbox_hle_hide_debug_console, wxSizerFlags().Border(wxALL, 5).Expand()); // System s_subpanel_system->Add(s_round_sys_lang, wxSizerFlags().Border(wxALL, 5).Expand()); @@ -566,6 +569,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) Ini.HLEExitOnStop.SetValue(chbox_hle_exitonstop->GetValue()); Ini.HLELogLvl.SetValue(cbox_hle_loglvl->GetSelection()); Ini.SysLanguage.SetValue(cbox_sys_lang->GetSelection()); + Ini.HLEHideDebugConsole.SetValue(chbox_hle_hide_debug_console->GetValue()); Ini.Save(); } diff --git a/rpcs3/Ini.h b/rpcs3/Ini.h index 7a75626086..aa3263667f 100644 --- a/rpcs3/Ini.h +++ b/rpcs3/Ini.h @@ -118,6 +118,7 @@ public: IniEntry HLELogLvl; IniEntry SysLanguage; IniEntry SkipPamf; + IniEntry HLEHideDebugConsole; IniEntry PadHandlerLStickLeft; IniEntry PadHandlerLStickDown; @@ -206,6 +207,7 @@ public: HLESaveTTY.Init("HLESaveTTY", path); HLEExitOnStop.Init("HLEExitOnStop", path); HLELogLvl.Init("HLELogLvl", path); + HLEHideDebugConsole.Init("HLEHideDebugConsole", path); path = DefPath + "/" + "System"; SysLanguage.Init("SysLanguage", path); @@ -235,6 +237,7 @@ public: HLEExitOnStop.Load(false); HLELogLvl.Load(0); SysLanguage.Load(1); + HLEHideDebugConsole.Load(false); PadHandlerLStickLeft.Load(314); //WXK_LEFT PadHandlerLStickDown.Load(317); //WXK_DOWN @@ -286,6 +289,7 @@ public: HLEExitOnStop.Save(); HLELogLvl.Save(); SysLanguage.Save(); + HLEHideDebugConsole.Save(); PadHandlerLStickLeft.Save(); PadHandlerLStickDown.Save();