| 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 | { |
no test coverage detected