diff --git a/console/console_settings.c b/console/console_settings.c index d3cd8bf268..ebd666c8ad 100644 --- a/console/console_settings.c +++ b/console/console_settings.c @@ -27,11 +27,11 @@ void rarch_settings_change(unsigned setting) switch(setting) { case S_ASPECT_RATIO_DECREMENT: - if(g_console.aspect_ratio_index > 0) + if(g_console.aspect_ratio_index > 0) g_console.aspect_ratio_index--; break; - case S_ASPECT_RATIO_INCREMENT: - if(g_console.aspect_ratio_index < LAST_ASPECT_RATIO) + case S_ASPECT_RATIO_INCREMENT: + if(g_console.aspect_ratio_index < LAST_ASPECT_RATIO) g_console.aspect_ratio_index++; break; case S_FRAME_ADVANCE: @@ -57,6 +57,20 @@ void rarch_settings_change(unsigned setting) if(g_console.overscan_amount == 0.0f) g_console.overscan_enable = 0; break; + case S_RESOLUTION_PREVIOUS: + if (g_console.current_resolution_index) + { + g_console.current_resolution_index--; + g_console.current_resolution_id = g_console.supported_resolutions[g_console.current_resolution_index]; + } + break; + case S_RESOLUTION_NEXT: + if (g_console.current_resolution_index + 1 < g_console.supported_resolutions_count) + { + g_console.current_resolution_index++; + g_console.current_resolution_id = g_console.supported_resolutions[g_console.current_resolution_index]; + } + break; case S_QUIT: g_console.menu_enable = false; g_console.ingame_menu_enable = false; diff --git a/console/console_settings.h b/console/console_settings.h index d2ef16c157..bebc2df457 100644 --- a/console/console_settings.h +++ b/console/console_settings.h @@ -33,6 +33,8 @@ enum S_OVERSCAN_DECREMENT, S_OVERSCAN_INCREMENT, S_QUIT, + S_RESOLUTION_PREVIOUS, + S_RESOLUTION_NEXT, S_RETURN_TO_DASHBOARD, S_RETURN_TO_GAME, S_RETURN_TO_LAUNCHER, diff --git a/gfx/context/ps3_ctx.c b/gfx/context/ps3_ctx.c index 4d137d574f..960108eb72 100644 --- a/gfx/context/ps3_ctx.c +++ b/gfx/context/ps3_ctx.c @@ -309,24 +309,6 @@ void gfx_ctx_get_available_resolutions (void) g_console.check_available_resolutions = true; } -void ps3_next_resolution (void) -{ - if (g_console.current_resolution_index + 1 < g_console.supported_resolutions_count) - { - g_console.current_resolution_index++; - g_console.current_resolution_id = g_console.supported_resolutions[g_console.current_resolution_index]; - } -} - -void ps3_previous_resolution (void) -{ - if (g_console.current_resolution_index) - { - g_console.current_resolution_index--; - g_console.current_resolution_id = g_console.supported_resolutions[g_console.current_resolution_index]; - } -} - int gfx_ctx_check_resolution(unsigned resolution_id) { return cellVideoOutGetResolutionAvailability(CELL_VIDEO_OUT_PRIMARY, resolution_id, CELL_VIDEO_OUT_ASPECT_AUTO, 0); diff --git a/gfx/gl.c b/gfx/gl.c index 1b3352bb43..518ff7cd27 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -338,7 +338,7 @@ error: return false; } -static void gl_deinit_fbo(gl_t *gl) +void gl_deinit_fbo(gl_t *gl) { if (gl->fbo_inited) { @@ -352,7 +352,7 @@ static void gl_deinit_fbo(gl_t *gl) } } -static void gl_init_fbo(gl_t *gl, unsigned width, unsigned height) +void gl_init_fbo(gl_t *gl, unsigned width, unsigned height) { // No need to use FBOs. if (!g_settings.video.render_to_texture && gl_shader_num() == 0) diff --git a/gfx/gl_common.h b/gfx/gl_common.h index 0cb15c479c..6b43d7b8cf 100644 --- a/gfx/gl_common.h +++ b/gfx/gl_common.h @@ -225,4 +225,7 @@ void gl_shader_use(unsigned index); void gl_set_projection(gl_t *gl, struct gl_ortho *ortho, bool allow_rotate); void gl_set_viewport(gl_t *gl, unsigned width, unsigned height, bool force_full, bool allow_rotate); +void gl_init_fbo(gl_t * gl, unsigned width, unsigned height); +void gl_deinit_fbo(gl_t *gl); + #endif diff --git a/ps3/menu.c b/ps3/menu.c index c1704387f3..6d6a9da13c 100644 --- a/ps3/menu.c +++ b/ps3/menu.c @@ -1169,12 +1169,12 @@ static void producesettingentry(menu * menu_obj, uint64_t switchvalue) case SETTING_CHANGE_RESOLUTION: if(CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) ) { - ps3_next_resolution(); + rarch_settings_change(S_RESOLUTION_NEXT); set_delay = DELAY_SMALL; } if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) ) { - ps3_previous_resolution(); + rarch_settings_change(S_RESOLUTION_PREVIOUS); set_delay = DELAY_SMALL; } if(CTRL_CROSS(state)) diff --git a/ps3/ps3_video_psgl.h b/ps3/ps3_video_psgl.h index f0dceb6187..13efd8880d 100644 --- a/ps3/ps3_video_psgl.h +++ b/ps3/ps3_video_psgl.h @@ -30,14 +30,9 @@ enum }; #define MIN_SCALING_FACTOR (1.0f) -#define MAX_SCALING_FACTOR (4.0f) +#define MAX_SCALING_FACTOR (5.0f) const char * ps3_get_resolution_label(uint32_t resolution); -void ps3_previous_resolution (void); -void ps3_next_resolution (void); - -void gl_deinit_fbo(gl_t * gl); -void gl_init_fbo(gl_t * gl, unsigned width, unsigned height); bool gl_cg_reinit(const char *path); bool gl_cg_save_cgp(const char *path, const struct gl_cg_cgp_info *info);