diff --git a/pcsx2/gui/FrameForGS.cpp b/pcsx2/gui/FrameForGS.cpp index 545a6705df..8b23ecbb0e 100644 --- a/pcsx2/gui/FrameForGS.cpp +++ b/pcsx2/gui/FrameForGS.cpp @@ -45,6 +45,8 @@ void GSPanel::InitDefaultAccelerators() m_Accels->Map( AAC( WXK_TAB ), "Framelimiter_TurboToggle" ); m_Accels->Map( AAC( WXK_TAB ).Shift(), "Framelimiter_SlomoToggle" ); + m_Accels->Map( AAC( WXK_F6 ), "GSwindow_CycleAspectRatio" ); + m_Accels->Map( AAC( WXK_ESCAPE ), "Sys_Suspend" ); m_Accels->Map( AAC( WXK_F8 ), "Sys_TakeSnapshot" ); m_Accels->Map( AAC( WXK_F8 ).Shift(), "Sys_TakeSnapshot"); diff --git a/pcsx2/gui/GlobalCommands.cpp b/pcsx2/gui/GlobalCommands.cpp index 94239d1f71..5fc8d2edee 100644 --- a/pcsx2/gui/GlobalCommands.cpp +++ b/pcsx2/gui/GlobalCommands.cpp @@ -161,6 +161,21 @@ namespace Implementations pauser.AllowResume(); } + void GSwindow_CycleAspectRatio() + { + AspectRatioType& art = g_Conf->GSWindow.AspectRatio; + wxString arts(L"Not modified"); + switch( art ) + { + case AspectRatio_Stretch: art = AspectRatio_4_3; arts = L"AspectRatio_4_3"; break; + case AspectRatio_4_3: art = AspectRatio_16_9; arts = L"AspectRatio_16:9"; break; + case AspectRatio_16_9: art = AspectRatio_Stretch; arts = L"AspectRatio_Stretch";break; + } + + Console.WriteLn(L"(GSwindow) Aspect ratio: %s.", arts.c_str()); + AppApplySettings(); + } + void Sys_Suspend() { CoreThread.Suspend(); @@ -317,6 +332,12 @@ static const GlobalCommandDescriptor CommandDeclarations[] = NULL, }, + { "GSwindow_CycleAspectRatio", + Implementations::GSwindow_CycleAspectRatio, + NULL, + NULL, + }, + { "Sys_Suspend", Implementations::Sys_Suspend, NULL, diff --git a/plugins/GSdx/GSRenderer.cpp b/plugins/GSdx/GSRenderer.cpp index 604e00094f..d1cda1a7ad 100644 --- a/plugins/GSdx/GSRenderer.cpp +++ b/plugins/GSdx/GSRenderer.cpp @@ -504,12 +504,15 @@ void GSRenderer::KeyEvent(GSKeyEventData* e) { case VK_F5: m_interlace = (m_interlace + 7 + step) % 7; + printf("GSdx: Set deinterlace mode to %d (%s).\n", (int)m_interlace, theApp.m_gs_interlace.at(m_interlace).name.c_str()); return; case VK_F6: - m_aspectratio = (m_aspectratio + 3 + step) % 3; + if( m_wnd.IsManaged() ) + m_aspectratio = (m_aspectratio + 3 + step) % 3; return; case VK_F7: m_shader = (m_shader + 3 + step) % 3; + printf("GSdx: Set shader %d (%s).\n", (int)m_shader); return; case VK_DELETE: m_aa1 = !m_aa1;