Emscripten: Changed return type of callback implementations from int to EM_BOOL.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Sun, 15 Feb 2015 21:44:36 +0100
changeset 9352 2cbf791a601c
parent 9351 483c411e8e11
child 9353 4528766f5d2c
Emscripten: Changed return type of callback implementations from int to EM_BOOL. The prototypes are declared with EM_BOOL (which is currently an int) in html5.h.
src/joystick/emscripten/SDL_sysjoystick.c
src/video/emscripten/SDL_emscriptenevents.c
--- a/src/joystick/emscripten/SDL_sysjoystick.c	Sun Feb 15 12:11:44 2015 -0500
+++ b/src/joystick/emscripten/SDL_sysjoystick.c	Sun Feb 15 21:44:36 2015 +0100
@@ -46,7 +46,7 @@
 static int numjoysticks = 0;
 static int instance_counter = 0;
 
-int
+EM_BOOL
 Emscripten_JoyStickConnected(int eventType, const EmscriptenGamepadEvent *gamepadEvent, void *userData)
 {
     int i;
@@ -127,7 +127,7 @@
     return 1;
 }
 
-int
+EM_BOOL
 Emscripten_JoyStickDisconnected(int eventType, const EmscriptenGamepadEvent *gamepadEvent, void *userData)
 {
     SDL_joylist_item *item = SDL_joylist;
--- a/src/video/emscripten/SDL_emscriptenevents.c	Sun Feb 15 12:11:44 2015 -0500
+++ b/src/video/emscripten/SDL_emscriptenevents.c	Sun Feb 15 21:44:36 2015 +0100
@@ -296,7 +296,7 @@
     return SDL_TRUE;
 }
 
-int
+EM_BOOL
 Emscripten_HandleMouseMove(int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData)
 {
     SDL_WindowData *window_data = userData;
@@ -322,7 +322,7 @@
     return 0;
 }
 
-int
+EM_BOOL
 Emscripten_HandleMouseButton(int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData)
 {
     SDL_WindowData *window_data = userData;
@@ -344,7 +344,7 @@
     return 1;
 }
 
-int
+EM_BOOL
 Emscripten_HandleMouseFocus(int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData)
 {
     SDL_WindowData *window_data = userData;
@@ -352,7 +352,7 @@
     return 1;
 }
 
-int
+EM_BOOL
 Emscripten_HandleWheel(int eventType, const EmscriptenWheelEvent *wheelEvent, void *userData)
 {
     SDL_WindowData *window_data = userData;
@@ -360,7 +360,7 @@
     return 1;
 }
 
-int
+EM_BOOL
 Emscripten_HandleFocus(int eventType, const EmscriptenFocusEvent *wheelEvent, void *userData)
 {
     SDL_WindowData *window_data = userData;
@@ -368,7 +368,7 @@
     return 1;
 }
 
-int
+EM_BOOL
 Emscripten_HandleTouch(int eventType, const EmscriptenTouchEvent *touchEvent, void *userData)
 {
     /*SDL_WindowData *window_data = userData;*/
@@ -404,7 +404,7 @@
     return 1;
 }
 
-int
+EM_BOOL
 Emscripten_HandleKey(int eventType, const EmscriptenKeyboardEvent *keyEvent, void *userData)
 {
     Uint32 scancode;
@@ -443,7 +443,7 @@
             || keyEvent->keyCode == 8 /* backspace */ || keyEvent->keyCode == 9 /* tab */;
 }
 
-int
+EM_BOOL
 Emscripten_HandleKeyPress(int eventType, const EmscriptenKeyboardEvent *keyEvent, void *userData)
 {
     char text[5];
@@ -452,7 +452,7 @@
     return 1;
 }
 
-int
+EM_BOOL
 Emscripten_HandleFullscreenChange(int eventType, const EmscriptenFullscreenChangeEvent *fullscreenChangeEvent, void *userData)
 {
     /*make sure this is actually our element going fullscreen*/
@@ -514,7 +514,7 @@
     return 0;
 }
 
-int
+EM_BOOL
 Emscripten_HandleResize(int eventType, const EmscriptenUiEvent *uiEvent, void *userData)
 {
     SDL_WindowData *window_data = userData;
@@ -554,7 +554,7 @@
     return 0;
 }
 
-int
+EM_BOOL
 Emscripten_HandleVisibilityChange(int eventType, const EmscriptenVisibilityChangeEvent *visEvent, void *userData)
 {
     SDL_WindowData *window_data = userData;