mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42:30 +00:00
Hack - make diagonal 5.0f for mobile, 6.5f for desktop
This commit is contained in:
parent
92b46a8275
commit
b24433a9f2
@ -542,18 +542,23 @@ void menu_display_unset_framebuffer_dirty_flag(void)
|
|||||||
* RGUI or XMB use this. */
|
* RGUI or XMB use this. */
|
||||||
float menu_display_get_dpi(void)
|
float menu_display_get_dpi(void)
|
||||||
{
|
{
|
||||||
settings_t *settings = config_get_ptr();
|
|
||||||
float dpi;
|
|
||||||
unsigned width, height;
|
unsigned width, height;
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
|
float dpi = 0.0f;
|
||||||
|
float diagonal = 6.5f;
|
||||||
|
|
||||||
video_driver_get_size(&width, &height);
|
video_driver_get_size(&width, &height);
|
||||||
|
|
||||||
if (!settings)
|
if (!settings)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
#ifdef RARCH_MOBILE
|
||||||
|
diagonal = 5.0f;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Generic dpi calculation formula,
|
/* Generic dpi calculation formula,
|
||||||
* the divider is the screen diagonal in inches */
|
* the divider is the screen diagonal in inches */
|
||||||
dpi = sqrt((width * width) + (height * height)) / 5;
|
dpi = sqrt((width * width) + (height * height)) / diagonal;
|
||||||
|
|
||||||
if (settings->bools.menu_dpi_override_enable)
|
if (settings->bools.menu_dpi_override_enable)
|
||||||
return settings->uints.menu_dpi_override_value;
|
return settings->uints.menu_dpi_override_value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user