mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-27 16:23:35 +01:00
Windows: Start at a sensible window size if high-DPI. Avoids the worst of #9437 but does not fix it.
This commit is contained in:
1 parent
6dcbed6659
commit
aefad893f8
4 files changed
+25
-20
No files matched your search
@@ -187,6 +187,21 @@ std::string System_GetProperty(SystemProperty prop) {
|
||||
// Ugly!
|
||||
extern WindowsAudioBackend *winAudioBackend;
|
||||
|
||||
#ifdef _WIN32
|
||||
#if PPSSPP_PLATFORM(UWP)
|
||||
static int ScreenDPI() {
|
||||
return 96; // TODO UWP
|
||||
}
|
||||
#else
|
||||
static int ScreenDPI() {
|
||||
HDC screenDC = GetDC(nullptr);
|
||||
int dotsPerInch = GetDeviceCaps(screenDC, LOGPIXELSY);
|
||||
ReleaseDC(nullptr, screenDC);
|
||||
return dotsPerInch;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int System_GetPropertyInt(SystemProperty prop) {
|
||||
switch (prop) {
|
||||
case SYSPROP_AUDIO_SAMPLE_RATE:
|
||||
@@ -195,6 +210,8 @@ int System_GetPropertyInt(SystemProperty prop) {
|
||||
return 60000;
|
||||
case SYSPROP_DEVICE_TYPE:
|
||||
return DEVICE_TYPE_DESKTOP;
|
||||
case SYSPROP_DISPLAY_DPI:
|
||||
return ScreenDPI();
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user