(360) Aspect ratio selection fix

This commit is contained in:
TwinAphex51224 2012-05-07 20:55:33 +02:00
parent ff9f07e23f
commit df650a5e64

View File

@ -202,21 +202,20 @@ HRESULT CRetroArchQuickMenu::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled
m_quickmenulist.SetText(MENU_ITEM_HARDWARE_FILTERING, set_filter_element(g_settings.video.smooth));
break;
case MENU_ITEM_KEEP_ASPECT_RATIO:
{
if(g_console.aspect_ratio_index < ASPECT_RATIO_END)
g_console.aspect_ratio_index++;
else
g_console.aspect_ratio_index = 0;
{
g_console.aspect_ratio_index++;
if(g_console.aspect_ratio_index >= ASPECT_RATIO_END)
g_console.aspect_ratio_index = 0;
video_xdk360.set_aspect_ratio(NULL, g_console.aspect_ratio_index);
char aspectratio_label[32];
sprintf(aspectratio_label, "Aspect Ratio: %s", aspectratio_lut[g_console.aspect_ratio_index].name);
unsigned long dwNum = MultiByteToWideChar(CP_ACP, 0, aspectratio_label, -1, NULL, 0);
wchar_t * aspectratio_label_w = new wchar_t[dwNum];
MultiByteToWideChar(CP_ACP, 0, aspectratio_label, -1, aspectratio_label_w, dwNum);
m_quickmenulist.SetText(MENU_ITEM_KEEP_ASPECT_RATIO, aspectratio_label_w);
delete[] aspectratio_label_w;
}
video_xdk360.set_aspect_ratio(NULL, g_console.aspect_ratio_index);
char aspectratio_label[32];
sprintf(aspectratio_label, "Aspect Ratio: %s", aspectratio_lut[g_console.aspect_ratio_index].name);
unsigned long dwNum = MultiByteToWideChar(CP_ACP, 0, aspectratio_label, -1, NULL, 0);
wchar_t * aspectratio_label_w = new wchar_t[dwNum];
MultiByteToWideChar(CP_ACP, 0, aspectratio_label, -1, aspectratio_label_w, dwNum);
m_quickmenulist.SetText(MENU_ITEM_KEEP_ASPECT_RATIO, aspectratio_label_w);
delete[] aspectratio_label_w;
}
break;
case MENU_ITEM_OVERSCAN_AMOUNT:
break;