early-access version 1988

This commit is contained in:
pineappleEA
2021-08-12 01:07:27 +02:00
parent e37f82ce96
commit 24ddfcbb39
265 changed files with 68343 additions and 5348 deletions

View File

@@ -38,6 +38,7 @@ static const char *cursorNames[] = {
};
int system_cursor = -1;
SDL_Cursor *cursor = NULL;
SDL_bool relative_mode = SDL_FALSE;
/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
static void
@@ -76,6 +77,17 @@ loop()
SDL_GetDisplayName(SDL_GetWindowDisplayIndex(window)));
}
}
if (event.window.event == SDL_WINDOWEVENT_FOCUS_LOST) {
relative_mode = SDL_GetRelativeMouseMode();
if (relative_mode) {
SDL_SetRelativeMouseMode(SDL_FALSE);
}
}
if (event.window.event == SDL_WINDOWEVENT_FOCUS_GAINED) {
if (relative_mode) {
SDL_SetRelativeMouseMode(SDL_TRUE);
}
}
}
if (event.type == SDL_KEYUP) {
SDL_bool updateCursor = SDL_FALSE;