forked from Kolyah35/minecraft-pe-0.6.1
It isn't a commit without a linux compilation fail
This commit is contained in:
@@ -1208,10 +1208,7 @@ if (options.getBooleanValue(OPTIONS_WINDOW_SCALE)){ // scales with resolution us
|
|||||||
|
|
||||||
Gui::GuiScale = (float)Mth::Min(guiScale, Mth::Max(1, Mth::Min(width / 320, height / 240)));
|
Gui::GuiScale = (float)Mth::Min(guiScale, Mth::Max(1, Mth::Min(width / 320, height / 240)));
|
||||||
|
|
||||||
// 2. Calculate the Inverse based on the NEW scale
|
|
||||||
Gui::InvGuiScale = 1.0f / Gui::GuiScale;
|
|
||||||
screenWidth = (int)(width * Gui::InvGuiScale);
|
|
||||||
screenHeight = (int)(height * Gui::InvGuiScale);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@@ -1251,9 +1248,7 @@ if (options.getBooleanValue(OPTIONS_WINDOW_SCALE)){ // scales with resolution us
|
|||||||
Gui::GuiScale = 1.0f;
|
Gui::GuiScale = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
Gui::InvGuiScale = 1.0f / Gui::GuiScale;
|
|
||||||
screenWidth = (int)(width * Gui::InvGuiScale);
|
|
||||||
screenHeight = (int)(height * Gui::InvGuiScale);
|
|
||||||
|
|
||||||
// if (platform()) {
|
// if (platform()) {
|
||||||
// float pixelsPerMillimeter = options.getProgressValue(&Option::PIXELS_PER_MILLIMETER);
|
// float pixelsPerMillimeter = options.getProgressValue(&Option::PIXELS_PER_MILLIMETER);
|
||||||
@@ -1261,8 +1256,13 @@ if (options.getBooleanValue(OPTIONS_WINDOW_SCALE)){ // scales with resolution us
|
|||||||
// pixelCalcUi.setPixelsPerMillimeter(pixelsPerMillimeter * Gui::InvGuiScale);
|
// pixelCalcUi.setPixelsPerMillimeter(pixelsPerMillimeter * Gui::InvGuiScale);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Gui::InvGuiScale = 1.0f / Gui::GuiScale;
|
||||||
|
screenWidth = (int)(width * Gui::InvGuiScale);
|
||||||
|
screenHeight = (int)(height * Gui::InvGuiScale);
|
||||||
|
|
||||||
Config config = createConfig(this);
|
Config config = createConfig(this);
|
||||||
gui.onConfigChanged(config);
|
gui.onConfigChanged(config);
|
||||||
|
|
||||||
@@ -1277,7 +1277,7 @@ if (options.getBooleanValue(OPTIONS_WINDOW_SCALE)){ // scales with resolution us
|
|||||||
char resbuf[128];
|
char resbuf[128];
|
||||||
sprintf(resbuf, " %d x %d @ scale %.2f", width, height, Gui::GuiScale);
|
sprintf(resbuf, " %d x %d @ scale %.2f", width, height, Gui::GuiScale);
|
||||||
//gui.addMessage(resbuf);
|
//gui.addMessage(resbuf);
|
||||||
|
#endif
|
||||||
#endif /* STANDALONE_SERVER */
|
#endif /* STANDALONE_SERVER */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user