diff --git a/pcsx2/gui/AppConfig.cpp b/pcsx2/gui/AppConfig.cpp index 01bd5961e9..f5c89465ab 100644 --- a/pcsx2/gui/AppConfig.cpp +++ b/pcsx2/gui/AppConfig.cpp @@ -624,6 +624,8 @@ AppConfig::GSWindowOptions::GSWindowOptions() WindowPos = wxDefaultPosition; IsMaximized = false; IsFullscreen = false; + + IsToggleFullscreenOnDoubleClick = true; } void AppConfig::GSWindowOptions::SanityCheck() @@ -660,6 +662,8 @@ void AppConfig::GSWindowOptions::LoadSave( IniInterface& ini ) IniEntry( IsMaximized ); IniEntry( IsFullscreen ); + IniEntry( IsToggleFullscreenOnDoubleClick ); + static const wxChar* AspectRatioNames[] = { L"Stretch", diff --git a/pcsx2/gui/AppConfig.h b/pcsx2/gui/AppConfig.h index 20d4bb278a..8c6e2ef6e2 100644 --- a/pcsx2/gui/AppConfig.h +++ b/pcsx2/gui/AppConfig.h @@ -175,6 +175,8 @@ public: bool IsMaximized; bool IsFullscreen; + bool IsToggleFullscreenOnDoubleClick; + GSWindowOptions(); void LoadSave( IniInterface& conf ); diff --git a/pcsx2/gui/FrameForGS.cpp b/pcsx2/gui/FrameForGS.cpp index a884436860..9df175be25 100644 --- a/pcsx2/gui/FrameForGS.cpp +++ b/pcsx2/gui/FrameForGS.cpp @@ -243,9 +243,11 @@ void GSPanel::AppStatusEvent_OnSettingsApplied() void GSPanel::OnLeftDclick(wxMouseEvent& evt) { - //need to add a config option for users which use mouse input. Till then, this feature is disabled. - //Console.WriteLn("GSPanel::OnDoubleClick: Invoking Fullscreen-Toggle accelerator."); - //DirectKeyCommand(FULLSCREEN_TOGGLE_ACCELERATOR_GSPANEL); + if( !g_Conf->GSWindow.IsToggleFullscreenOnDoubleClick ) + return; + + Console.WriteLn("GSPanel::OnDoubleClick: Invoking Fullscreen-Toggle accelerator."); + DirectKeyCommand(FULLSCREEN_TOGGLE_ACCELERATOR_GSPANEL); } diff --git a/pcsx2/gui/Panels/ConfigurationPanels.h b/pcsx2/gui/Panels/ConfigurationPanels.h index 3c101c0ad3..722a813d7d 100644 --- a/pcsx2/gui/Panels/ConfigurationPanels.h +++ b/pcsx2/gui/Panels/ConfigurationPanels.h @@ -270,6 +270,7 @@ namespace Panels pxCheckBox* m_check_Fullscreen; pxCheckBox* m_check_ExclusiveFS; pxCheckBox* m_check_HideMouse; + pxCheckBox* m_check_DclickFullscreen; wxTextCtrl* m_text_WindowWidth; wxTextCtrl* m_text_WindowHeight; diff --git a/pcsx2/gui/Panels/GSWindowPanel.cpp b/pcsx2/gui/Panels/GSWindowPanel.cpp index 92a39971cc..671d2cffa0 100644 --- a/pcsx2/gui/Panels/GSWindowPanel.cpp +++ b/pcsx2/gui/Panels/GSWindowPanel.cpp @@ -46,6 +46,7 @@ Panels::GSWindowSettingsPanel::GSWindowSettingsPanel( wxWindow* parent ) m_check_CloseGS = new pxCheckBox( this, _("Hide window on suspend") ); m_check_Fullscreen = new pxCheckBox( this, _("Default to fullscreen mode on open") ); m_check_VsyncEnable = new pxCheckBox( this, _("Wait for vsync on refresh") ); + m_check_DclickFullscreen = new pxCheckBox( this, _("Double-click Toggles Full-Screen mode") ); m_check_ExclusiveFS = new pxCheckBox( this, _("Use exclusive fullscreen mode (if available)") ); m_check_VsyncEnable->SetToolTip( pxEt( "!ContextTip:Window:Vsync", @@ -98,6 +99,8 @@ Panels::GSWindowSettingsPanel::GSWindowSettingsPanel( wxWindow* parent ) *this += new wxStaticLine( this ) | StdExpand(); *this += m_check_Fullscreen; + *this += m_check_DclickFullscreen;; + *this += m_check_ExclusiveFS; *this += m_check_VsyncEnable; @@ -126,6 +129,8 @@ void Panels::GSWindowSettingsPanel::ApplyConfigToGui( AppConfig& configToApply, m_check_VsyncEnable ->SetValue( configToApply.EmuOptions.GS.VsyncEnable ); + m_check_DclickFullscreen ->SetValue ( conf.IsToggleFullscreenOnDoubleClick ); + m_text_WindowWidth ->SetValue( wxsFormat( L"%d", conf.WindowSize.GetWidth() ) ); m_text_WindowHeight ->SetValue( wxsFormat( L"%d", conf.WindowSize.GetHeight() ) ); @@ -146,6 +151,8 @@ void Panels::GSWindowSettingsPanel::Apply() gsconf.VsyncEnable = m_check_VsyncEnable->GetValue(); + appconf.IsToggleFullscreenOnDoubleClick = m_check_DclickFullscreen->GetValue(); + long xr, yr; if( !m_text_WindowWidth->GetValue().ToLong( &xr ) || !m_text_WindowHeight->GetValue().ToLong( &yr ) )