mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
The mouse cursor is now hidden during application startup.
This commit is contained in:
parent
b014ef5ffd
commit
8b5f65c789
|
@ -455,6 +455,9 @@ int main(int argc, char* argv[])
|
|||
if (event.type == SDL_QUIT)
|
||||
return 1;
|
||||
|
||||
// This hides the mouse cursor during startup, i.e. before we have begun to capture SDL events.
|
||||
SDL_SetRelativeMouseMode(SDL_TRUE);
|
||||
|
||||
AudioManager::getInstance();
|
||||
MameNames::init();
|
||||
|
||||
|
@ -584,10 +587,11 @@ int main(int argc, char* argv[])
|
|||
(applicationEndTime - applicationStartTime).count() << " ms";
|
||||
|
||||
bool running = true;
|
||||
// Now that we've finished loading, disable the relative mouse mode or otherwise mouse
|
||||
// input wouldn't work in any games that are launched.
|
||||
SDL_SetRelativeMouseMode(SDL_FALSE);
|
||||
|
||||
while (running) {
|
||||
SDL_Event event;
|
||||
|
||||
if (SDL_PollEvent(&event)) {
|
||||
do {
|
||||
InputManager::getInstance()->parseEvent(event, &window);
|
||||
|
|
Loading…
Reference in a new issue