void plat_video_set_size(int w, int h)
{
if (area.w != w || area.h != h) {
+ area = (struct area) { w, h };
if (plat_sdl_change_video_mode(w, h, 0) < 0) {
// failed, revert to original resolution
+ area = (struct area) { g_screen_width,g_screen_height };
plat_sdl_change_video_mode(g_screen_width, g_screen_height, 0);
- w = g_screen_width, h = g_screen_height;
}
if (!plat_sdl_overlay && !plat_sdl_gl_active) {
g_screen_width = plat_sdl_screen->w;
g_screen_height = h;
g_screen_ppitch = w;
}
- area = (struct area) { w, h };
}
}
#if defined(__RG99__)
// do not use the default resolution
- plat_video_set_size(320, 240);
+ plat_sdl_change_video_mode(320, 240, 1);
#endif
bgr_to_uyvy_init();