MCPcopy Create free account
hub / github.com/Lovrom8/RSMods / UpdateGameWindowStacking

Function UpdateGameWindowStacking

DLL/dllmain.cpp:169–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169void UpdateGameWindowStacking() {
170 if (Settings::ReturnSettingValue("PreventMidSongPause") == "on") {
171 bool actuallyInSong = GameState::IsInSong();
172
173 if (ensureForcedTopMode) {
174 static bool lastState = false;
175 if (actuallyInSong != lastState) {
176 HWND position = actuallyInSong ? HWND_TOPMOST : HWND_NOTOPMOST;
177
178 SetWindowPos(D3DHooks::GetGameWindow(), position, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
179
180 lastState = actuallyInSong;
181 }
182 }
183
184 D3DHooks::cachedIsInSong = actuallyInSong;
185 }
186}
187
188/// <summary>
189/// Hook on game boot. Initialize all our own UI elements (text on screen, and ImGUI).

Callers 1

Hook_EndSceneMethod · 0.85

Calls 1

GetGameWindowFunction · 0.85

Tested by

no test coverage detected