diff options
author | StapleButter <thetotalworm@gmail.com> | 2017-10-11 02:56:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-11 02:56:06 +0200 |
commit | f9d9aaec11cee163f2842c56945d5e85ac9b3c03 (patch) | |
tree | fe9acf27e33f851db32485cc5dbb62428900109b /src/libui_sdl | |
parent | 73626e9f45461a48f3a0ce38b791cbb545fa6405 (diff) | |
parent | 56bf1ecc131fa7f0cd152dfaee7fe9c5917d4b40 (diff) |
Merge pull request #112 from bentley/master
Portability fixes
Diffstat (limited to 'src/libui_sdl')
-rw-r--r-- | src/libui_sdl/Platform.cpp | 2 | ||||
-rw-r--r-- | src/libui_sdl/main.cpp | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/libui_sdl/Platform.cpp b/src/libui_sdl/Platform.cpp index 0b1e0a2..1d7438b 100644 --- a/src/libui_sdl/Platform.cpp +++ b/src/libui_sdl/Platform.cpp @@ -32,6 +32,8 @@ #else #include <unistd.h> #include <arpa/inet.h> + #include <netinet/in.h> + #include <sys/select.h> #include <sys/socket.h> #define socket_t int #define sockaddr_t struct sockaddr diff --git a/src/libui_sdl/main.cpp b/src/libui_sdl/main.cpp index c7f6120..6797139 100644 --- a/src/libui_sdl/main.cpp +++ b/src/libui_sdl/main.cpp @@ -579,7 +579,11 @@ int main(int argc, char** argv) // http://stackoverflow.com/questions/14543333/joystick-wont-work-using-sdl SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1"); - if (SDL_Init(SDL_INIT_EVERYTHING) < 0) + if (SDL_Init(SDL_INIT_HAPTIC) < 0) + { + printf("SDL couldn't init rumble\n"); + } + if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK) < 0) { printf("SDL shat itself :(\n"); return 1; |