mirror of
https://github.com/libretro/RetroArch
synced 2025-03-13 07:14:43 +00:00
Refactored some code - added 5x scale
This commit is contained in:
parent
33271647af
commit
ec63eb6434
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
4
gfx/gl.c
4
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)
|
||||
|
@ -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
|
||||
|
@ -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))
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user