mirror of
https://github.com/libretro/RetroArch
synced 2025-03-27 23:37:39 +00:00
(Xbox 1) Fixed lockups that occurred due to negative viewport coordinates (X,Y in Resize Mode)
This commit is contained in:
parent
7fb25a76c8
commit
0da3b628c6
@ -1874,9 +1874,11 @@ 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;
|
||||
if(g_console.viewports.custom_vp.x >= 4)
|
||||
g_console.viewports.custom_vp.x -= 4;
|
||||
else if(input & (1 << RETRO_DEVICE_ID_JOYPAD_LEFT))
|
||||
g_console.viewports.custom_vp.x -= 1;
|
||||
if(g_console.viewports.custom_vp.x > 0)
|
||||
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 +1891,11 @@ 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;
|
||||
if(g_console.viewports.custom_vp.y >= 4)
|
||||
g_console.viewports.custom_vp.y -= 4;
|
||||
else if(input & (1 << RETRO_DEVICE_ID_JOYPAD_DOWN))
|
||||
g_console.viewports.custom_vp.y -= 1;
|
||||
if(g_console.viewports.custom_vp.y > 0)
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user