Skip to content

Commit

Permalink
Update SDL3.
Browse files Browse the repository at this point in the history
  • Loading branch information
Themaister committed Feb 6, 2024
1 parent 6ada3dd commit c3e250d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions application/platforms/application_sdl3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,14 @@ struct WSIPlatformSDL : GraniteWSIPlatform
}
#endif

Util::Timer tmp_timer;
tmp_timer.start();
if (SDL_Init(SDL_INIT_EVENTS | SDL_INIT_GAMEPAD | SDL_INIT_VIDEO) < 0)
{
LOGE("Failed to init SDL.\n");
return false;
}
LOGI("SDL_Init took %.3f seconds.\n", tmp_timer.end());

SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
// Adding gamepad events will make main loop spin without waiting.
Expand Down
2 changes: 1 addition & 1 deletion third_party/sdl3
Submodule sdl3 updated 573 files

0 comments on commit c3e250d

Please sign in to comment.