diff --git a/360/main.c b/360/main.c index 828d55d14d..4f09a7217f 100644 --- a/360/main.c +++ b/360/main.c @@ -432,6 +432,8 @@ begin_loop: input_xdk360.poll(NULL); + rarch_set_auto_viewport(g_extern.frame_cache.width, g_extern.frame_cache.height); + do{ repeat = rarch_main_iterate(); }while(repeat && !g_console.frame_advance_enable); diff --git a/360/xdk360_video.cpp b/360/xdk360_video.cpp index 364203e2a2..d9b90e1efa 100644 --- a/360/xdk360_video.cpp +++ b/360/xdk360_video.cpp @@ -367,6 +367,9 @@ static void xdk360_set_aspect_ratio(void * data, uint32_t aspectratio_index) { (void)data; + if(g_console.aspect_ratio_index == ASPECT_RATIO_AUTO) + rarch_set_auto_viewport(g_extern.frame_cache.width, g_extern.frame_cache.height); + g_settings.video.aspect_ratio = aspectratio_lut[g_console.aspect_ratio_index].value; g_settings.video.force_aspect = false; set_viewport(false); diff --git a/console/console_ext.c b/console/console_ext.c index 2fe9d35696..4138c75d0f 100644 --- a/console/console_ext.c +++ b/console/console_ext.c @@ -486,12 +486,15 @@ struct aspect_ratio_elem aspectratio_lut[ASPECT_RATIO_END] = { { "19:14", 1.3571f }, { "30:17", 1.7647f }, { "32:9", 3.5555f }, - { "Auto", 0.0f }, + { "Auto", 1.0f }, { "Custom", 0.0f } }; void rarch_set_auto_viewport(unsigned width, unsigned height) { + if(width == 0 || height == 0) + return; + unsigned aspect_x, aspect_y, len, highest, i; len = width < height ? width : height; diff --git a/ps3/ps3_video_psgl.c b/ps3/ps3_video_psgl.c index 1ba26c14a2..4c3ac8a84d 100644 --- a/ps3/ps3_video_psgl.c +++ b/ps3/ps3_video_psgl.c @@ -557,9 +557,6 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei GLfloat yamt = (GLfloat)height / gl->tex_h; set_texture_coords(gl->tex_coords, xamt, yamt); - - if(g_console.aspect_ratio_index == ASPECT_RATIO_AUTO ) - rarch_set_auto_viewport(width, height); } else if (width != gl->last_width[(gl->tex_index - 1) & TEXTURES_MASK] || height != gl->last_height[(gl->tex_index - 1) & TEXTURES_MASK]) {