GUI: re-apply UI settings when displays are connec
This commit is contained in:
parent
0e19716dcd
commit
64e6cf12c2
|
@ -3520,10 +3520,12 @@ bool FurnaceGUI::loop() {
|
||||||
case SDL_DISPLAYEVENT_CONNECTED:
|
case SDL_DISPLAYEVENT_CONNECTED:
|
||||||
logD("display %d connected!",ev.display.display);
|
logD("display %d connected!",ev.display.display);
|
||||||
updateWindow=true;
|
updateWindow=true;
|
||||||
|
shallDetectScale=16;
|
||||||
break;
|
break;
|
||||||
case SDL_DISPLAYEVENT_DISCONNECTED:
|
case SDL_DISPLAYEVENT_DISCONNECTED:
|
||||||
logD("display %d disconnected!",ev.display.display);
|
logD("display %d disconnected!",ev.display.display);
|
||||||
updateWindow=true;
|
updateWindow=true;
|
||||||
|
shallDetectScale=16;
|
||||||
break;
|
break;
|
||||||
case SDL_DISPLAYEVENT_ORIENTATION:
|
case SDL_DISPLAYEVENT_ORIENTATION:
|
||||||
logD("display oriented to %d",ev.display.data1);
|
logD("display oriented to %d",ev.display.data1);
|
||||||
|
@ -6115,6 +6117,14 @@ bool FurnaceGUI::loop() {
|
||||||
willCommit=false;
|
willCommit=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (shallDetectScale) {
|
||||||
|
if (--shallDetectScale<1) {
|
||||||
|
if (settings.dpiScale<0.5f) {
|
||||||
|
applyUISettings();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (fontsFailed) {
|
if (fontsFailed) {
|
||||||
showError("it appears I couldn't load these fonts. any setting you can check?");
|
showError("it appears I couldn't load these fonts. any setting you can check?");
|
||||||
logE("couldn't load fonts");
|
logE("couldn't load fonts");
|
||||||
|
@ -6889,6 +6899,7 @@ FurnaceGUI::FurnaceGUI():
|
||||||
displayInsTypeListMakeInsSample(-1),
|
displayInsTypeListMakeInsSample(-1),
|
||||||
mobileEditPage(0),
|
mobileEditPage(0),
|
||||||
wheelCalmDown(0),
|
wheelCalmDown(0),
|
||||||
|
shallDetectScale(0),
|
||||||
mobileMenuPos(0.0f),
|
mobileMenuPos(0.0f),
|
||||||
autoButtonSize(0.0f),
|
autoButtonSize(0.0f),
|
||||||
mobileEditAnim(0.0f),
|
mobileEditAnim(0.0f),
|
||||||
|
|
|
@ -1343,6 +1343,7 @@ class FurnaceGUI {
|
||||||
int displayInsTypeListMakeInsSample;
|
int displayInsTypeListMakeInsSample;
|
||||||
int mobileEditPage;
|
int mobileEditPage;
|
||||||
int wheelCalmDown;
|
int wheelCalmDown;
|
||||||
|
int shallDetectScale;
|
||||||
float mobileMenuPos, autoButtonSize, mobileEditAnim;
|
float mobileMenuPos, autoButtonSize, mobileEditAnim;
|
||||||
ImVec2 mobileEditButtonPos, mobileEditButtonSize;
|
ImVec2 mobileEditButtonPos, mobileEditButtonSize;
|
||||||
const int* curSysSection;
|
const int* curSysSection;
|
||||||
|
|
Loading…
Reference in a new issue