Merge pull request #12801 from unknownbrackets/ui-display

Windows: Prevent applying -1 as inset space
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2020-04-06 09:28:09 +02:00
commit 2405157009
3 files changed
+15

No files matched your search

+5
View File
@@ -174,6 +174,11 @@ float System_GetPropertyFloat(SystemProperty prop) {
return QApplication::primaryScreen()->logicalDotsPerInch();
case SYSPROP_DISPLAY_DPI:
return QApplication::primaryScreen()->physicalDotsPerInch();
case SYSPROP_DISPLAY_SAFE_INSET_LEFT:
case SYSPROP_DISPLAY_SAFE_INSET_RIGHT:
case SYSPROP_DISPLAY_SAFE_INSET_TOP:
case SYSPROP_DISPLAY_SAFE_INSET_BOTTOM:
return 0.0f;
default:
return -1;
}
+5
View File
@@ -337,6 +337,11 @@ float System_GetPropertyFloat(SystemProperty prop) {
switch (prop) {
case SYSPROP_DISPLAY_REFRESH_RATE:
return g_RefreshRate;
case SYSPROP_DISPLAY_SAFE_INSET_LEFT:
case SYSPROP_DISPLAY_SAFE_INSET_RIGHT:
case SYSPROP_DISPLAY_SAFE_INSET_TOP:
case SYSPROP_DISPLAY_SAFE_INSET_BOTTOM:
return 0.0f;
default:
return -1;
}
+5
View File
@@ -248,6 +248,11 @@ float System_GetPropertyFloat(SystemProperty prop) {
return 60.f;
case SYSPROP_DISPLAY_DPI:
return (float)ScreenDPI();
case SYSPROP_DISPLAY_SAFE_INSET_LEFT:
case SYSPROP_DISPLAY_SAFE_INSET_RIGHT:
case SYSPROP_DISPLAY_SAFE_INSET_TOP:
case SYSPROP_DISPLAY_SAFE_INSET_BOTTOM:
return 0.0f;
default:
return -1;
}