Skip to content

Commit

Permalink
Use same SDL_Init flags on all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
rsn8887 authored and AJenbo committed Jul 19, 2019
1 parent 366b8b5 commit c54eac1
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions SourceX/miniwin/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,18 +335,12 @@ HWND CreateWindowExA(
HINSTANCE hInstance,
LPVOID lpParam)
{
#ifndef SWITCH

if (SDL_Init(SDL_INIT_EVERYTHING & ~SDL_INIT_HAPTIC) <= -1) {
SDL_Log(SDL_GetError());
return NULL;
}
atexit(SDL_Quit);
#else
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER) <= -1) {
SDL_Log(SDL_GetError());
return NULL;
}
#endif

SDL_JoystickOpen(0);
SDL_GameControllerOpen(0);
Expand Down

0 comments on commit c54eac1

Please sign in to comment.