(Gfx drivers) Cleanups
This commit is contained in:
parent
006735395c
commit
ee2f25b1dc
|
@ -101,6 +101,7 @@ static bool caca_gfx_frame(void *data, const void *frame,
|
||||||
unsigned height = 0;
|
unsigned height = 0;
|
||||||
bool draw = true;
|
bool draw = true;
|
||||||
caca_t *caca = (caca_t*)data;
|
caca_t *caca = (caca_t*)data;
|
||||||
|
bool menu_is_alive = video_info->menu_is_alive;
|
||||||
|
|
||||||
if (!frame || !frame_width || !frame_height)
|
if (!frame || !frame_width || !frame_height)
|
||||||
return true;
|
return true;
|
||||||
|
@ -122,7 +123,7 @@ static bool caca_gfx_frame(void *data, const void *frame,
|
||||||
if (!caca->cv)
|
if (!caca->cv)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (caca->menu_frame && video_info->menu_is_alive)
|
if (caca->menu_frame && menu_is_alive)
|
||||||
frame_to_copy = caca->menu_frame;
|
frame_to_copy = caca->menu_frame;
|
||||||
|
|
||||||
width = caca_get_canvas_width(caca->cv);
|
width = caca_get_canvas_width(caca->cv);
|
||||||
|
@ -134,7 +135,7 @@ static bool caca_gfx_frame(void *data, const void *frame,
|
||||||
(frame_width < width && frame_height < height))
|
(frame_width < width && frame_height < height))
|
||||||
draw = false;
|
draw = false;
|
||||||
|
|
||||||
if (video_info->menu_is_alive)
|
if (menu_is_alive)
|
||||||
draw = false;
|
draw = false;
|
||||||
|
|
||||||
caca_clear_canvas(caca->cv);
|
caca_clear_canvas(caca->cv);
|
||||||
|
|
|
@ -530,6 +530,7 @@ static bool ctr_frame(void* data, const void* frame,
|
||||||
static int total_frames = 0;
|
static int total_frames = 0;
|
||||||
static int frames = 0;
|
static int frames = 0;
|
||||||
unsigned disp_mode = settings->uints.video_3ds_display_mode;
|
unsigned disp_mode = settings->uints.video_3ds_display_mode;
|
||||||
|
float video_refresh_rate = video_info->refresh_rate;
|
||||||
|
|
||||||
if (!width || !height || !settings)
|
if (!width || !height || !settings)
|
||||||
{
|
{
|
||||||
|
@ -620,7 +621,7 @@ static bool ctr_frame(void* data, const void* frame,
|
||||||
bool next_event = false;
|
bool next_event = false;
|
||||||
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
|
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
|
||||||
if (av_info)
|
if (av_info)
|
||||||
next_event = av_info->timing.fps < video_info->refresh_rate * 0.9f;
|
next_event = av_info->timing.fps < video_refresh_rate * 0.9f;
|
||||||
gspWaitForEvent(GSPGPU_EVENT_VBlank0, next_event);
|
gspWaitForEvent(GSPGPU_EVENT_VBlank0, next_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue