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

Function windowPositionChanged

src/OpenLoco/src/Ui.cpp:445–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443 }
444
445 void windowPositionChanged([[maybe_unused]] int32_t x, [[maybe_unused]] int32_t y)
446 {
447 const auto displayId = SDL_GetDisplayForWindow(_window);
448 const auto displayIndex = getDisplayIndex(displayId);
449
450 auto& cfg = Config::get().display;
451 if (cfg.index != displayIndex)
452 {
453 cfg.index = displayIndex;
454 Config::write();
455 }
456 }
457
458 void windowSizeChanged(int32_t width, int32_t height)
459 {

Callers 2

processMessagesMiniFunction · 0.85
processMessagesFunction · 0.85

Calls 3

getDisplayIndexFunction · 0.85
writeFunction · 0.85
getFunction · 0.70

Tested by

no test coverage detected