(gfx) Cleanups

This commit is contained in:
twinaphex 2020-02-13 23:24:51 +01:00
parent 310bf3328e
commit e47b7526bc
3 changed files with 9 additions and 6 deletions

View File

@ -785,8 +785,9 @@ static void gl2_create_fbo_texture(gl_t *gl,
bool fp_fbo = false; bool fp_fbo = false;
bool smooth = false; bool smooth = false;
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
GLuint base_filt = settings->bools.video_smooth ? GL_LINEAR : GL_NEAREST; bool video_smooth = settings->bools.video_smooth;
GLuint base_mip_filt = settings->bools.video_smooth ? GLuint base_filt = video_smooth ? GL_LINEAR : GL_NEAREST;
GLuint base_mip_filt = video_smooth ?
GL_LINEAR_MIPMAP_LINEAR : GL_NEAREST_MIPMAP_NEAREST; GL_LINEAR_MIPMAP_LINEAR : GL_NEAREST_MIPMAP_NEAREST;
unsigned mip_level = i + 2; unsigned mip_level = i + 2;
bool mipmapped = gl->shader->mipmap_input(gl->shader_data, mip_level); bool mipmapped = gl->shader->mipmap_input(gl->shader_data, mip_level);

View File

@ -1118,7 +1118,7 @@ static void vulkan_init_readback(vk_t *vk)
* not initialized yet. * not initialized yet.
*/ */
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
bool recording_enabled = recording_is_enabled(); bool recording_enabled = recording_is_enabled();
vk->readback.streamed = settings->bools.video_gpu_record && recording_enabled; vk->readback.streamed = settings->bools.video_gpu_record && recording_enabled;
if (!vk->readback.streamed) if (!vk->readback.streamed)

View File

@ -1159,13 +1159,15 @@ void font_driver_init_osd(
bool is_threaded, bool is_threaded,
enum font_driver_render_api api) enum font_driver_render_api api)
{ {
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
const char *path_font = settings->paths.path_font;
float video_font_size = settings->floats.video_font_size;
if (video_font_driver) if (video_font_driver)
return; return;
video_font_driver = font_driver_init_first(video_data, video_font_driver = font_driver_init_first(video_data,
*settings->paths.path_font ? settings->paths.path_font : NULL, *path_font ? path_font : NULL,
settings->floats.video_font_size, threading_hint, is_threaded, api); video_font_size, threading_hint, is_threaded, api);
if (!video_font_driver) if (!video_font_driver)
RARCH_ERR("[font]: Failed to initialize OSD font.\n"); RARCH_ERR("[font]: Failed to initialize OSD font.\n");