Merge pull request #42 from freakdave/master

(Xbox 1) Fixed lockups that occurred due to negative viewport coordinates (X,Y in Resize Mode)
This commit is contained in:
Squarepusher 2012-08-06 07:41:13 -07:00
commit fba4f6273a

View File

@ -1874,9 +1874,15 @@ static void ingame_menu_resize(item *items, menu *current_menu, uint64_t input)
gfx_ctx_set_aspect_ratio(NULL, g_console.aspect_ratio_index);
if(input & (1 << RETRO_DEVICE_ID_JOYPAD_ANALOG_LEFT_DPAD_LEFT))
g_console.viewports.custom_vp.x -= 4;
#ifdef _XBOX1
if(g_console.viewports.custom_vp.x >= 4)
#endif
g_console.viewports.custom_vp.x -= 4;
else if(input & (1 << RETRO_DEVICE_ID_JOYPAD_LEFT))
g_console.viewports.custom_vp.x -= 1;
#ifdef _XBOX1
if(g_console.viewports.custom_vp.x > 0)
#endif
g_console.viewports.custom_vp.x -= 1;
if(input & (1 << RETRO_DEVICE_ID_JOYPAD_ANALOG_LEFT_DPAD_RIGHT))
g_console.viewports.custom_vp.x += 4;
@ -1889,9 +1895,15 @@ static void ingame_menu_resize(item *items, menu *current_menu, uint64_t input)
g_console.viewports.custom_vp.y += 1;
if(input & (1 << RETRO_DEVICE_ID_JOYPAD_ANALOG_LEFT_DPAD_DOWN))
g_console.viewports.custom_vp.y -= 4;
#ifdef _XBOX1
if(g_console.viewports.custom_vp.y >= 4)
#endif
g_console.viewports.custom_vp.y -= 4;
else if(input & (1 << RETRO_DEVICE_ID_JOYPAD_DOWN))
g_console.viewports.custom_vp.y -= 1;
#ifdef _XBOX1
if(g_console.viewports.custom_vp.y > 0)
#endif
g_console.viewports.custom_vp.y -= 1;
if(input & (1 << RETRO_DEVICE_ID_JOYPAD_ANALOG_RIGHT_DPAD_LEFT))
g_console.viewports.custom_vp.width -= 4;