mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Remove unused menu_display_pixel_get_scale
This commit is contained in:
parent
712910dec0
commit
debbd9f15b
@ -2044,45 +2044,6 @@ void menu_display_unset_framebuffer_dirty_flag(void)
|
||||
menu_display_framebuf_dirty = false;
|
||||
}
|
||||
|
||||
float menu_display_get_pixel_scale(unsigned width, unsigned height)
|
||||
{
|
||||
static unsigned last_width = 0;
|
||||
static unsigned last_height = 0;
|
||||
static float scale = 0.0f;
|
||||
static bool scale_cached = false;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
/* We need to perform a square root here, which
|
||||
* can be slow on some platforms (not *slow*, but
|
||||
* it involves enough work that it's worth trying
|
||||
* to optimise). We therefore cache the pixel scale,
|
||||
* and only update on first run or when the video
|
||||
* size changes */
|
||||
if (!scale_cached ||
|
||||
(width != last_width) ||
|
||||
(height != last_height))
|
||||
{
|
||||
/* Baseline reference is a 1080p display */
|
||||
scale = (float)(
|
||||
sqrt((double)((width * width) + (height * height))) /
|
||||
DIAGONAL_PIXELS_1080P);
|
||||
|
||||
scale_cached = true;
|
||||
last_width = width;
|
||||
last_height = height;
|
||||
}
|
||||
|
||||
/* Apply user scaling factor */
|
||||
if (settings)
|
||||
{
|
||||
float menu_scale_factor = settings->floats.menu_scale_factor;
|
||||
return scale * ((menu_scale_factor > 0.0001f) ?
|
||||
menu_scale_factor : 1.0f);
|
||||
}
|
||||
|
||||
return scale;
|
||||
}
|
||||
|
||||
float menu_display_get_dpi_scale(unsigned width, unsigned height)
|
||||
{
|
||||
static unsigned last_width = 0;
|
||||
|
@ -594,7 +594,6 @@ void menu_display_unset_viewport(unsigned width, unsigned height);
|
||||
bool menu_display_get_framebuffer_dirty_flag(void);
|
||||
void menu_display_set_framebuffer_dirty_flag(void);
|
||||
void menu_display_unset_framebuffer_dirty_flag(void);
|
||||
float menu_display_get_pixel_scale(unsigned width, unsigned height);
|
||||
float menu_display_get_dpi_scale(unsigned width, unsigned height);
|
||||
bool menu_display_init_first_driver(bool video_is_threaded);
|
||||
bool menu_display_restore_clear_color(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user