GS window: F6 now properly cycles aspect ratios (previously was internal to GSdx only, now affects actual CSX2's config)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4530 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
avihal@gmail.com 2011-04-05 11:30:07 +00:00
parent 732b038571
commit 20e6dc39e1
3 changed files with 27 additions and 1 deletions

View File

@ -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");

View File

@ -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,

View File

@ -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;