Added fullscreen funtion

This commit is contained in:
2025-12-19 22:46:21 +08:00
parent 551999c142
commit c8ab71738a
4 changed files with 19 additions and 2 deletions

View File

@@ -24,6 +24,11 @@ SDL_AppResult InputManager::handleInputEvent(const SDL_Event* event) {
m_currentInputState.mouseCurrentPosition = {static_cast<float>(event->motion.x),
static_cast<float>(event->motion.y)};
break;
case SDL_EVENT_KEY_DOWN:
if (event->key.key == SDLK_F11) {
m_currentInputState.isFullscreen = !m_currentInputState.isFullscreen;
}
break;
}
return SDL_APP_CONTINUE;
}

View File

@@ -5,4 +5,5 @@ struct InputState
std::pair<float, float> mouseCilckOn;
bool leftMouseDown = false;
std::pair<float, float> mouseCurrentPosition;
bool isFullscreen = false;
};