MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / setWindowScaling

Function setWindowScaling

src/OpenLoco/src/Ui.cpp:994–1008  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

992 }
993
994 void setWindowScaling(float newScaleFactor)
995 {
996 auto& config = Config::get();
997 newScaleFactor = std::clamp(newScaleFactor, ScaleFactor::min, ScaleFactor::max);
998 if (config.scaleFactor == newScaleFactor)
999 {
1000 return;
1001 }
1002
1003 config.scaleFactor = newScaleFactor;
1004
1005 OpenLoco::Config::write();
1006 Ui::triggerResize();
1007 Gfx::invalidateScreen();
1008 }
1009
1010 void adjustWindowScale(float adjust_by)
1011 {

Callers 2

adjustWindowScaleFunction · 0.85
startFunction · 0.85

Calls 4

writeFunction · 0.85
triggerResizeFunction · 0.85
invalidateScreenFunction · 0.85
getFunction · 0.70

Tested by

no test coverage detected