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

Function applyScreenModeRestrictions

src/OpenLoco/src/Ui/Windows/Options.cpp:580–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

578 }
579
580 static void applyScreenModeRestrictions(Window& self)
581 {
582 if (Config::get().display.mode != Config::ScreenMode::fullscreen)
583 {
584 self.disabledWidgets = (1ULL << Display::Widx::display_resolution) | (1ULL << Display::Widx::display_resolution_btn);
585 }
586
587#if !(defined(__APPLE__) && defined(__MACH__))
588 Display::screenModeToggleEnabled(self);
589#else
590 self.disabledWidgets |= (1ULL << Display::Widx::screen_mode)
591 | (1ULL << Display::Widx::screen_mode_btn)
592 | (1ULL << Display::Widx::display_resolution)
593 | (1ULL << Display::Widx::display_resolution_btn);
594#endif
595 }
596
597 static constexpr WindowEventList kEvents = {
598 .onClose = Common::onClose,

Callers 2

openFunction · 0.85
tabOnMouseUpFunction · 0.85

Calls 2

screenModeToggleEnabledFunction · 0.85
getFunction · 0.50

Tested by

no test coverage detected