Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't use SDL_INIT_EVERYTHING
SDL_Init(SDL_INIT_EVERYTHING) will fail on systems which do not support SDL_INIT_HAPTIC
  • Loading branch information
AMDmi3 committed Oct 24, 2018
1 parent 5f2c065 commit 8a831e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Functions.cpp
Expand Up @@ -416,7 +416,7 @@ void onVideoResize(ImageManager& imageManager, SDL_Renderer &renderer){

ScreenData init(){
//Initialze SDL.
if(SDL_Init(SDL_INIT_EVERYTHING)==-1) {
if(SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO|SDL_INIT_JOYSTICK)==-1) {
std::cerr << "FATAL ERROR: SDL_Init failed\nError: " << SDL_GetError() << std::endl;
return creationFailed();
}
Expand Down

0 comments on commit 8a831e7

Please sign in to comment.