mirror of
https://github.com/libretro/RetroArch
synced 2025-02-07 03:40:24 +00:00
crt_first_run and crt_video_restore were both useless
This commit is contained in:
parent
78e0ab6c0e
commit
b2f5262a3b
@ -53,15 +53,6 @@ typedef struct videocrt_switch
|
||||
|
||||
/* TODO/FIXME - globals */
|
||||
static videocrt_switch_t crt_switch_st;
|
||||
static bool first_run = true;
|
||||
|
||||
static void crt_check_first_run(void)
|
||||
{
|
||||
if (!first_run)
|
||||
return;
|
||||
|
||||
first_run = false;
|
||||
}
|
||||
|
||||
static void switch_crt_hz(void)
|
||||
{
|
||||
@ -127,7 +118,8 @@ static void switch_res_crt(unsigned width, unsigned height)
|
||||
video_driver_apply_state_changes();
|
||||
}
|
||||
|
||||
/* Create correct aspect to fit video if resolution does not exist */
|
||||
/* Create correct aspect to fit video
|
||||
* if resolution does not exist */
|
||||
static void crt_screen_setup_aspect(unsigned width, unsigned height)
|
||||
{
|
||||
videocrt_switch_t *p_switch = &crt_switch_st;
|
||||
@ -137,10 +129,11 @@ static void crt_screen_setup_aspect(unsigned width, unsigned height)
|
||||
#endif
|
||||
|
||||
switch_crt_hz();
|
||||
/* get original resolution of core */
|
||||
|
||||
/* Get original resolution of core */
|
||||
if (height == 4)
|
||||
{
|
||||
/* detect menu only */
|
||||
/* Detect menu only */
|
||||
if (width < 700)
|
||||
width = 320;
|
||||
|
||||
@ -207,8 +200,8 @@ void crt_switch_res_core(unsigned width, unsigned height,
|
||||
* video_driver_monitor_adjust_system_rates() */
|
||||
if (width == 4)
|
||||
{
|
||||
width = 320;
|
||||
height = 240;
|
||||
width = 320;
|
||||
height = 240;
|
||||
}
|
||||
|
||||
p_switch->ra_core_height = height;
|
||||
@ -225,13 +218,11 @@ void crt_switch_res_core(unsigned width, unsigned height,
|
||||
if (crt_mode == 2)
|
||||
{
|
||||
if (hz > 53)
|
||||
p_switch->ra_core_hz = hz * 2;
|
||||
p_switch->ra_core_hz = hz * 2;
|
||||
if (hz <= 53)
|
||||
p_switch->ra_core_hz = 120.0f;
|
||||
p_switch->ra_core_hz = 120.0f;
|
||||
}
|
||||
|
||||
crt_check_first_run();
|
||||
|
||||
/* Detect resolution change and switch */
|
||||
if (
|
||||
(p_switch->ra_tmp_height != p_switch->ra_core_height) ||
|
||||
@ -254,14 +245,6 @@ void crt_switch_res_core(unsigned width, unsigned height,
|
||||
}
|
||||
}
|
||||
|
||||
void crt_video_restore(void)
|
||||
{
|
||||
if (first_run)
|
||||
return;
|
||||
|
||||
first_run = true;
|
||||
}
|
||||
|
||||
int crt_compute_dynamic_width(int width)
|
||||
{
|
||||
unsigned i;
|
||||
@ -290,27 +273,27 @@ static void crt_rpi_switch(int width, int height, float hz, int xoffset)
|
||||
{
|
||||
char buffer[1024];
|
||||
VCHI_INSTANCE_T vchi_instance;
|
||||
VCHI_CONNECTION_T *vchi_connection = NULL;
|
||||
VCHI_CONNECTION_T *vchi_connection = NULL;
|
||||
static char output[250] = {0};
|
||||
static char output1[250] = {0};
|
||||
static char output2[250] = {0};
|
||||
static char set_hdmi[250] = {0};
|
||||
static char set_hdmi_timing[250] = {0};
|
||||
int i = 0;
|
||||
int hfp = 0;
|
||||
int hsp = 0;
|
||||
int hbp = 0;
|
||||
int vfp = 0;
|
||||
int vsp = 0;
|
||||
int vbp = 0;
|
||||
int hmax = 0;
|
||||
int vmax = 0;
|
||||
int pdefault = 8;
|
||||
int pwidth = 0;
|
||||
float roundw = 0.0f;
|
||||
float roundh = 0.0f;
|
||||
float pixel_clock = 0;
|
||||
int ip_flag = 0;
|
||||
int i = 0;
|
||||
int hfp = 0;
|
||||
int hsp = 0;
|
||||
int hbp = 0;
|
||||
int vfp = 0;
|
||||
int vsp = 0;
|
||||
int vbp = 0;
|
||||
int hmax = 0;
|
||||
int vmax = 0;
|
||||
int pdefault = 8;
|
||||
int pwidth = 0;
|
||||
int ip_flag = 0;
|
||||
float roundw = 0.0f;
|
||||
float roundh = 0.0f;
|
||||
float pixel_clock = 0.0f;
|
||||
|
||||
/* set core refresh from hz */
|
||||
video_monitor_set_refresh_rate(hz);
|
||||
@ -321,7 +304,9 @@ static void crt_rpi_switch(int width, int height, float hz, int xoffset)
|
||||
{
|
||||
hfp = (width * 0.065);
|
||||
hbp = width * 0.35-hsp-hfp;
|
||||
}else {
|
||||
}
|
||||
else
|
||||
{
|
||||
hfp = (width * 0.033) + (width / 112);
|
||||
hbp = (width * 0.225) + (width /58);
|
||||
xoffset = xoffset*2;
|
||||
|
@ -31,8 +31,6 @@ void crt_switch_res_core(unsigned width, unsigned height, float hz, unsigned crt
|
||||
|
||||
void crt_aspect_ratio_switch(unsigned width, unsigned height);
|
||||
|
||||
void crt_video_restore(void);
|
||||
|
||||
int crt_compute_dynamic_width(int width);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
@ -32443,7 +32443,6 @@ static void retroarch_deinit_drivers(struct rarch_state *p_rarch)
|
||||
|
||||
/* Video */
|
||||
video_display_server_destroy();
|
||||
crt_video_restore();
|
||||
|
||||
p_rarch->video_driver_use_rgba = false;
|
||||
p_rarch->video_driver_active = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user