mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-17 07:31:01 +00:00
Boost the DPI on mobile. Touch is off for some reason, needs investigation
This commit is contained in:
parent
aa2177a4b5
commit
429f1227a8
@ -190,7 +190,13 @@ bool PPSSPP_UWPMain::Render() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_dpi = m_deviceResources->GetDpi();
|
g_dpi = m_deviceResources->GetDpi();
|
||||||
g_dpi_scale = 96.0f / g_dpi;
|
|
||||||
|
if (System_GetPropertyInt(SYSPROP_DEVICE_TYPE) == DEVICE_TYPE_MOBILE) {
|
||||||
|
// Boost DPI a bit to look better.
|
||||||
|
g_dpi_scale = 120.0f / g_dpi;
|
||||||
|
} else {
|
||||||
|
g_dpi_scale = 96.0f / g_dpi;
|
||||||
|
}
|
||||||
|
|
||||||
pixel_in_dps = 1.0f / g_dpi_scale;
|
pixel_in_dps = 1.0f / g_dpi_scale;
|
||||||
|
|
||||||
@ -276,8 +282,8 @@ void PPSSPP_UWPMain::OnTouchEvent(int touchEvent, int touchId, float x, float y,
|
|||||||
TouchInput input{};
|
TouchInput input{};
|
||||||
input.id = touchId;
|
input.id = touchId;
|
||||||
RotateXYToDisplay(x, y);
|
RotateXYToDisplay(x, y);
|
||||||
input.x = x;
|
input.x = x * pixel_in_dps;
|
||||||
input.y = y;
|
input.y = y * pixel_in_dps;
|
||||||
input.flags = touchEvent;
|
input.flags = touchEvent;
|
||||||
input.timestamp = timestamp;
|
input.timestamp = timestamp;
|
||||||
NativeTouch(input);
|
NativeTouch(input);
|
||||||
@ -348,7 +354,12 @@ int System_GetPropertyInt(SystemProperty prop) {
|
|||||||
case SYSPROP_DISPLAY_REFRESH_RATE:
|
case SYSPROP_DISPLAY_REFRESH_RATE:
|
||||||
return 60000;
|
return 60000;
|
||||||
case SYSPROP_DEVICE_TYPE:
|
case SYSPROP_DEVICE_TYPE:
|
||||||
|
// TODO: Detect touch screen instead.
|
||||||
|
#ifdef _M_ARM
|
||||||
|
return DEVICE_TYPE_MOBILE;
|
||||||
|
#else
|
||||||
return DEVICE_TYPE_DESKTOP;
|
return DEVICE_TYPE_DESKTOP;
|
||||||
|
#endif
|
||||||
case SYSPROP_HAS_FILE_BROWSER:
|
case SYSPROP_HAS_FILE_BROWSER:
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user