mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42:30 +00:00
[GX] reset menu pitch & custom viewport when changing resolution
This commit is contained in:
parent
14fe8623bb
commit
23f2e3b0e1
@ -402,6 +402,7 @@ static void gx_set_video_mode(void *data, unsigned fbWidth, unsigned lines,
|
|||||||
menu->frame_buf.width &= ~3;
|
menu->frame_buf.width &= ~3;
|
||||||
if (menu->frame_buf.width > 400)
|
if (menu->frame_buf.width > 400)
|
||||||
menu->frame_buf.width = 400;
|
menu->frame_buf.width = 400;
|
||||||
|
menu->frame_buf.pitch = menu->frame_buf.width * 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tvmode == VI_PAL)
|
if (tvmode == VI_PAL)
|
||||||
@ -419,8 +420,11 @@ static void gx_set_video_mode(void *data, unsigned fbWidth, unsigned lines,
|
|||||||
driver_set_refresh_rate(59.94f);
|
driver_set_refresh_rate(59.94f);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't spam the queue when scrolling through resolutions. */
|
/* custom viewports for older resolutions will most likely be corrupted, reset them */
|
||||||
msg_queue_clear(g_extern.msg_queue);
|
g_extern.console.screen.viewports.custom_vp.x = 0;
|
||||||
|
g_extern.console.screen.viewports.custom_vp.y = 0;
|
||||||
|
g_extern.console.screen.viewports.custom_vp.width = 0;
|
||||||
|
g_extern.console.screen.viewports.custom_vp.height = 0;
|
||||||
|
|
||||||
g_current_framebuf = 0;
|
g_current_framebuf = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user