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 93522cbf791a601c
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
     1.1 --- a/src/joystick/emscripten/SDL_sysjoystick.c	Sun Feb 15 12:11:44 2015 -0500
     1.2 +++ b/src/joystick/emscripten/SDL_sysjoystick.c	Sun Feb 15 21:44:36 2015 +0100
     1.3 @@ -46,7 +46,7 @@
     1.4  static int numjoysticks = 0;
     1.5  static int instance_counter = 0;
     1.6  
     1.7 -int
     1.8 +EM_BOOL
     1.9  Emscripten_JoyStickConnected(int eventType, const EmscriptenGamepadEvent *gamepadEvent, void *userData)
    1.10  {
    1.11      int i;
    1.12 @@ -127,7 +127,7 @@
    1.13      return 1;
    1.14  }
    1.15  
    1.16 -int
    1.17 +EM_BOOL
    1.18  Emscripten_JoyStickDisconnected(int eventType, const EmscriptenGamepadEvent *gamepadEvent, void *userData)
    1.19  {
    1.20      SDL_joylist_item *item = SDL_joylist;
     2.1 --- a/src/video/emscripten/SDL_emscriptenevents.c	Sun Feb 15 12:11:44 2015 -0500
     2.2 +++ b/src/video/emscripten/SDL_emscriptenevents.c	Sun Feb 15 21:44:36 2015 +0100
     2.3 @@ -296,7 +296,7 @@
     2.4      return SDL_TRUE;
     2.5  }
     2.6  
     2.7 -int
     2.8 +EM_BOOL
     2.9  Emscripten_HandleMouseMove(int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData)
    2.10  {
    2.11      SDL_WindowData *window_data = userData;
    2.12 @@ -322,7 +322,7 @@
    2.13      return 0;
    2.14  }
    2.15  
    2.16 -int
    2.17 +EM_BOOL
    2.18  Emscripten_HandleMouseButton(int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData)
    2.19  {
    2.20      SDL_WindowData *window_data = userData;
    2.21 @@ -344,7 +344,7 @@
    2.22      return 1;
    2.23  }
    2.24  
    2.25 -int
    2.26 +EM_BOOL
    2.27  Emscripten_HandleMouseFocus(int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData)
    2.28  {
    2.29      SDL_WindowData *window_data = userData;
    2.30 @@ -352,7 +352,7 @@
    2.31      return 1;
    2.32  }
    2.33  
    2.34 -int
    2.35 +EM_BOOL
    2.36  Emscripten_HandleWheel(int eventType, const EmscriptenWheelEvent *wheelEvent, void *userData)
    2.37  {
    2.38      SDL_WindowData *window_data = userData;
    2.39 @@ -360,7 +360,7 @@
    2.40      return 1;
    2.41  }
    2.42  
    2.43 -int
    2.44 +EM_BOOL
    2.45  Emscripten_HandleFocus(int eventType, const EmscriptenFocusEvent *wheelEvent, void *userData)
    2.46  {
    2.47      SDL_WindowData *window_data = userData;
    2.48 @@ -368,7 +368,7 @@
    2.49      return 1;
    2.50  }
    2.51  
    2.52 -int
    2.53 +EM_BOOL
    2.54  Emscripten_HandleTouch(int eventType, const EmscriptenTouchEvent *touchEvent, void *userData)
    2.55  {
    2.56      /*SDL_WindowData *window_data = userData;*/
    2.57 @@ -404,7 +404,7 @@
    2.58      return 1;
    2.59  }
    2.60  
    2.61 -int
    2.62 +EM_BOOL
    2.63  Emscripten_HandleKey(int eventType, const EmscriptenKeyboardEvent *keyEvent, void *userData)
    2.64  {
    2.65      Uint32 scancode;
    2.66 @@ -443,7 +443,7 @@
    2.67              || keyEvent->keyCode == 8 /* backspace */ || keyEvent->keyCode == 9 /* tab */;
    2.68  }
    2.69  
    2.70 -int
    2.71 +EM_BOOL
    2.72  Emscripten_HandleKeyPress(int eventType, const EmscriptenKeyboardEvent *keyEvent, void *userData)
    2.73  {
    2.74      char text[5];
    2.75 @@ -452,7 +452,7 @@
    2.76      return 1;
    2.77  }
    2.78  
    2.79 -int
    2.80 +EM_BOOL
    2.81  Emscripten_HandleFullscreenChange(int eventType, const EmscriptenFullscreenChangeEvent *fullscreenChangeEvent, void *userData)
    2.82  {
    2.83      /*make sure this is actually our element going fullscreen*/
    2.84 @@ -514,7 +514,7 @@
    2.85      return 0;
    2.86  }
    2.87  
    2.88 -int
    2.89 +EM_BOOL
    2.90  Emscripten_HandleResize(int eventType, const EmscriptenUiEvent *uiEvent, void *userData)
    2.91  {
    2.92      SDL_WindowData *window_data = userData;
    2.93 @@ -554,7 +554,7 @@
    2.94      return 0;
    2.95  }
    2.96  
    2.97 -int
    2.98 +EM_BOOL
    2.99  Emscripten_HandleVisibilityChange(int eventType, const EmscriptenVisibilityChangeEvent *visEvent, void *userData)
   2.100  {
   2.101      SDL_WindowData *window_data = userData;