| 232 | } |
| 233 | |
| 234 | void ScreenService::Update() |
| 235 | { |
| 236 | #if USE_EDITOR |
| 237 | // Sync current cursor state in Editor (eg. when viewport focus can change) |
| 238 | const auto win = Editor::Managed->GetGameWindow(true); |
| 239 | bool gameViewportFocus = win && Engine::HasGameViewportFocus(); |
| 240 | if (gameViewportFocus != LastGameViewportFocus) |
| 241 | Screen::SetCursorVisible(CursorVisible); |
| 242 | LastGameViewportFocus = gameViewportFocus; |
| 243 | #endif |
| 244 | |
| 245 | // Sync pending cursor lock mode |
| 246 | if (PendingCursorLock != CursorLockMode::None && Engine::HasGameViewportFocus()) |
| 247 | Screen::SetCursorLock(PendingCursorLock); |
| 248 | } |
| 249 | |
| 250 | void ScreenService::Draw() |
| 251 | { |
nothing calls this directly
no test coverage detected