Skip to content

Commit 2405157

Browse files
authored
Merge pull request #12801 from unknownbrackets/ui-display
Windows: Prevent applying -1 as inset space
2 parents 268df5a + fd0bf21 commit 2405157

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

Qt/QtMain.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ float System_GetPropertyFloat(SystemProperty prop) {
174174
return QApplication::primaryScreen()->logicalDotsPerInch();
175175
case SYSPROP_DISPLAY_DPI:
176176
return QApplication::primaryScreen()->physicalDotsPerInch();
177+
case SYSPROP_DISPLAY_SAFE_INSET_LEFT:
178+
case SYSPROP_DISPLAY_SAFE_INSET_RIGHT:
179+
case SYSPROP_DISPLAY_SAFE_INSET_TOP:
180+
case SYSPROP_DISPLAY_SAFE_INSET_BOTTOM:
181+
return 0.0f;
177182
default:
178183
return -1;
179184
}

SDL/SDLMain.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,11 @@ float System_GetPropertyFloat(SystemProperty prop) {
337337
switch (prop) {
338338
case SYSPROP_DISPLAY_REFRESH_RATE:
339339
return g_RefreshRate;
340+
case SYSPROP_DISPLAY_SAFE_INSET_LEFT:
341+
case SYSPROP_DISPLAY_SAFE_INSET_RIGHT:
342+
case SYSPROP_DISPLAY_SAFE_INSET_TOP:
343+
case SYSPROP_DISPLAY_SAFE_INSET_BOTTOM:
344+
return 0.0f;
340345
default:
341346
return -1;
342347
}

Windows/main.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,11 @@ float System_GetPropertyFloat(SystemProperty prop) {
248248
return 60.f;
249249
case SYSPROP_DISPLAY_DPI:
250250
return (float)ScreenDPI();
251+
case SYSPROP_DISPLAY_SAFE_INSET_LEFT:
252+
case SYSPROP_DISPLAY_SAFE_INSET_RIGHT:
253+
case SYSPROP_DISPLAY_SAFE_INSET_TOP:
254+
case SYSPROP_DISPLAY_SAFE_INSET_BOTTOM:
255+
return 0.0f;
251256
default:
252257
return -1;
253258
}

0 commit comments

Comments
 (0)