Some cleanups

This commit is contained in:
twinaphex 2018-04-21 15:00:35 +02:00
parent 710570a408
commit dae0f36a20
2 changed files with 9 additions and 5 deletions

View File

@ -2588,10 +2588,10 @@ static void gl_set_coords(void *handle_data, void *shader_data,
static float gl_get_refresh_rate(void *data)
{
float refresh_rate;
if (video_context_driver_get_refresh_rate(&refresh_rate))
return refresh_rate;
return 0.0f;
float refresh_rate = 0.0f;
if (video_context_driver_get_refresh_rate(&refresh_rate))
return refresh_rate;
return 0.0f;
}
static void gl_set_mvp(void *data, void *shader_data,

View File

@ -3194,8 +3194,12 @@ bool video_context_driver_get_refresh_rate(float *refresh_rate)
{
if (!current_video_context.get_refresh_rate || !refresh_rate)
return false;
if (!video_context_data)
return false;
*refresh_rate = current_video_context.get_refresh_rate(video_context_data);
if (refresh_rate)
*refresh_rate =
current_video_context.get_refresh_rate(video_context_data);
return true;
}