| 167 | } |
| 168 | |
| 169 | void 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). |
no test coverage detected