(PS3) Clean up set_overscan
This commit is contained in:
parent
9aaf878908
commit
3dbc1a3e7f
12
ps3/menu.c
12
ps3/menu.c
|
@ -1409,7 +1409,7 @@ static void producesettingentry(menu * menu_obj, uint64_t switchvalue)
|
|||
if(g_console.overscan_amount == 0.0f)
|
||||
g_console.overscan_enable = false;
|
||||
|
||||
ps3graphics_set_overscan(g_console.overscan_enable, g_console.overscan_amount, 1);
|
||||
ps3graphics_set_overscan();
|
||||
set_delay = DELAY_SMALLEST;
|
||||
}
|
||||
if(CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
|
||||
|
@ -1420,14 +1420,14 @@ static void producesettingentry(menu * menu_obj, uint64_t switchvalue)
|
|||
if(g_console.overscan_amount == 0.0f)
|
||||
g_console.overscan_enable = 0;
|
||||
|
||||
ps3graphics_set_overscan(g_console.overscan_enable, g_console.overscan_amount, 1);
|
||||
ps3graphics_set_overscan();
|
||||
set_delay = DELAY_SMALLEST;
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
g_console.overscan_amount = 0.0f;
|
||||
g_console.overscan_enable = false;
|
||||
ps3graphics_set_overscan(g_console.overscan_enable, g_console.overscan_amount, 1);
|
||||
ps3graphics_set_overscan();
|
||||
}
|
||||
break;
|
||||
case SETTING_THROTTLE_MODE:
|
||||
|
@ -2137,7 +2137,7 @@ static void ingame_menu(uint32_t menu_id)
|
|||
if(g_console.overscan_amount == 0.00f)
|
||||
g_console.overscan_enable = false;
|
||||
|
||||
ps3graphics_set_overscan(g_console.overscan_enable, g_console.overscan_amount, 1);
|
||||
ps3graphics_set_overscan();
|
||||
set_delay = DELAY_SMALLEST;
|
||||
}
|
||||
if(CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state) || CTRL_LSTICK_RIGHT(state))
|
||||
|
@ -2147,14 +2147,14 @@ static void ingame_menu(uint32_t menu_id)
|
|||
if(g_console.overscan_amount == 0.0f)
|
||||
g_console.overscan_amount = false;
|
||||
|
||||
ps3graphics_set_overscan(g_console.overscan_enable, g_console.overscan_amount, 1);
|
||||
ps3graphics_set_overscan();
|
||||
set_delay = DELAY_SMALLEST;
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
g_console.overscan_amount = 0.0f;
|
||||
g_console.overscan_enable = false;
|
||||
ps3graphics_set_overscan(g_console.overscan_enable, g_console.overscan_amount, 1);
|
||||
ps3graphics_set_overscan();
|
||||
}
|
||||
strlcpy(comment, "Press LEFT or RIGHT to change the [Overscan] settings.\nPress START to reset back to default values.", sizeof(comment));
|
||||
break;
|
||||
|
|
|
@ -605,11 +605,11 @@ static void set_viewport(gl_t *gl, unsigned width, unsigned height, bool force_f
|
|||
|
||||
glViewport(m_viewport_x_temp, m_viewport_y_temp, m_viewport_width_temp, m_viewport_height_temp);
|
||||
|
||||
if(ps3_gl.overscan_enable)
|
||||
if(g_console.overscan_enable)
|
||||
{
|
||||
m_left = -ps3_gl.overscan_amount/2;
|
||||
m_right = 1 + ps3_gl.overscan_amount/2;
|
||||
m_bottom = -ps3_gl.overscan_amount/2;
|
||||
m_left = -g_console.overscan_amount/2;
|
||||
m_right = 1 + g_console.overscan_amount/2;
|
||||
m_bottom = -g_console.overscan_amount/2;
|
||||
}
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
|
@ -1408,19 +1408,13 @@ void ps3_set_filtering(unsigned index, bool set_smooth)
|
|||
glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]);
|
||||
}
|
||||
|
||||
void ps3graphics_set_overscan(bool overscan_enable, float amount, bool recalculate_viewport)
|
||||
void ps3graphics_set_overscan(void)
|
||||
{
|
||||
gl_t * gl = driver.video_data;
|
||||
if(!gl)
|
||||
return;
|
||||
|
||||
ps3_gl.overscan_enable = overscan_enable;
|
||||
ps3_gl.overscan_amount = amount;
|
||||
|
||||
if(recalculate_viewport)
|
||||
{
|
||||
set_viewport(gl, gl->win_width, gl->win_height, false, true);
|
||||
}
|
||||
set_viewport(gl, gl->win_width, gl->win_height, false, true);
|
||||
}
|
||||
|
||||
void ps3graphics_video_init(bool get_all_resolutions)
|
||||
|
@ -1435,15 +1429,11 @@ void ps3graphics_video_init(bool get_all_resolutions)
|
|||
driver.video_data = gl_init(&video_info, NULL, NULL);
|
||||
gl_set_fbo_enable(g_console.fbo_enabled);
|
||||
|
||||
ps3_gl.overscan_enable = g_console.overscan_enable;
|
||||
ps3_gl.overscan_amount = g_console.overscan_amount;
|
||||
|
||||
if(get_all_resolutions)
|
||||
get_all_available_resolutions();
|
||||
|
||||
ps3_set_resolution();
|
||||
ps3_setup_texture();
|
||||
ps3graphics_set_overscan(ps3_gl.overscan_enable, ps3_gl.overscan_amount, 0);
|
||||
}
|
||||
|
||||
void ps3graphics_video_reinit(void)
|
||||
|
|
|
@ -46,8 +46,8 @@ void ps3_previous_resolution (void);
|
|||
void ps3_next_resolution (void);
|
||||
void ps3_set_filtering(unsigned index, bool set_smooth);
|
||||
void ps3_video_deinit(void);
|
||||
void ps3graphics_reinit_fbos (void);
|
||||
void ps3graphics_set_overscan(bool overscan_enable, float amount, bool recalculate_viewport);
|
||||
void ps3graphics_reinit_fbos(void);
|
||||
void ps3graphics_set_overscan(void);
|
||||
void ps3graphics_set_vsync(uint32_t vsync);
|
||||
void ps3graphics_video_init(bool get_all_resolutions);
|
||||
void ps3graphics_video_reinit(void);
|
||||
|
|
Loading…
Reference in New Issue