Skip to content

Commit

Permalink
emscripten: Changed internal functions to be static.
Browse files Browse the repository at this point in the history
  • Loading branch information
philippwiesemann committed May 12, 2017
1 parent ce01128 commit cc5b4f4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/joystick/emscripten/SDL_sysjoystick.c
Expand Up @@ -42,7 +42,7 @@ static SDL_joylist_item *SDL_joylist_tail = NULL;
static int numjoysticks = 0;
static int instance_counter = 0;

EM_BOOL
static EM_BOOL
Emscripten_JoyStickConnected(int eventType, const EmscriptenGamepadEvent *gamepadEvent, void *userData)
{
int i;
Expand Down Expand Up @@ -111,7 +111,7 @@ Emscripten_JoyStickConnected(int eventType, const EmscriptenGamepadEvent *gamepa
return 1;
}

EM_BOOL
static EM_BOOL
Emscripten_JoyStickDisconnected(int eventType, const EmscriptenGamepadEvent *gamepadEvent, void *userData)
{
SDL_joylist_item *item = SDL_joylist;
Expand Down
24 changes: 12 additions & 12 deletions src/video/emscripten/SDL_emscriptenevents.c
Expand Up @@ -270,7 +270,7 @@ static const SDL_Scancode emscripten_scancode_table[] = {


/* "borrowed" from SDL_windowsevents.c */
int
static int
Emscripten_ConvertUTF32toUTF8(Uint32 codepoint, char * text)
{
if (codepoint <= 0x7F) {
Expand Down Expand Up @@ -307,7 +307,7 @@ Emscripten_HandlePointerLockChange(int eventType, const EmscriptenPointerlockCha
}


EM_BOOL
static EM_BOOL
Emscripten_HandleMouseMove(int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData)
{
SDL_WindowData *window_data = userData;
Expand Down Expand Up @@ -338,7 +338,7 @@ Emscripten_HandleMouseMove(int eventType, const EmscriptenMouseEvent *mouseEvent
return 0;
}

EM_BOOL
static EM_BOOL
Emscripten_HandleMouseButton(int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData)
{
SDL_WindowData *window_data = userData;
Expand Down Expand Up @@ -374,7 +374,7 @@ Emscripten_HandleMouseButton(int eventType, const EmscriptenMouseEvent *mouseEve
return SDL_GetEventState(sdl_event_type) == SDL_ENABLE;
}

EM_BOOL
static EM_BOOL
Emscripten_HandleMouseFocus(int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData)
{
SDL_WindowData *window_data = userData;
Expand All @@ -396,15 +396,15 @@ Emscripten_HandleMouseFocus(int eventType, const EmscriptenMouseEvent *mouseEven
return SDL_GetEventState(SDL_WINDOWEVENT) == SDL_ENABLE;
}

EM_BOOL
static EM_BOOL
Emscripten_HandleWheel(int eventType, const EmscriptenWheelEvent *wheelEvent, void *userData)
{
SDL_WindowData *window_data = userData;
SDL_SendMouseWheel(window_data->window, 0, wheelEvent->deltaX, -wheelEvent->deltaY, SDL_MOUSEWHEEL_NORMAL);
return SDL_GetEventState(SDL_MOUSEWHEEL) == SDL_ENABLE;
}

EM_BOOL
static EM_BOOL
Emscripten_HandleFocus(int eventType, const EmscriptenFocusEvent *wheelEvent, void *userData)
{
SDL_WindowData *window_data = userData;
Expand All @@ -419,7 +419,7 @@ Emscripten_HandleFocus(int eventType, const EmscriptenFocusEvent *wheelEvent, vo
return SDL_GetEventState(SDL_WINDOWEVENT) == SDL_ENABLE;
}

EM_BOOL
static EM_BOOL
Emscripten_HandleTouch(int eventType, const EmscriptenTouchEvent *touchEvent, void *userData)
{
SDL_WindowData *window_data = userData;
Expand Down Expand Up @@ -482,7 +482,7 @@ Emscripten_HandleTouch(int eventType, const EmscriptenTouchEvent *touchEvent, vo
return preventDefault;
}

EM_BOOL
static EM_BOOL
Emscripten_HandleKey(int eventType, const EmscriptenKeyboardEvent *keyEvent, void *userData)
{
Uint32 scancode;
Expand Down Expand Up @@ -524,7 +524,7 @@ Emscripten_HandleKey(int eventType, const EmscriptenKeyboardEvent *keyEvent, voi
return prevent_default;
}

EM_BOOL
static EM_BOOL
Emscripten_HandleKeyPress(int eventType, const EmscriptenKeyboardEvent *keyEvent, void *userData)
{
char text[5];
Expand All @@ -534,7 +534,7 @@ Emscripten_HandleKeyPress(int eventType, const EmscriptenKeyboardEvent *keyEvent
return SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE;
}

EM_BOOL
static EM_BOOL
Emscripten_HandleFullscreenChange(int eventType, const EmscriptenFullscreenChangeEvent *fullscreenChangeEvent, void *userData)
{
SDL_WindowData *window_data = userData;
Expand All @@ -555,7 +555,7 @@ Emscripten_HandleFullscreenChange(int eventType, const EmscriptenFullscreenChang
return 0;
}

EM_BOOL
static EM_BOOL
Emscripten_HandleResize(int eventType, const EmscriptenUiEvent *uiEvent, void *userData)
{
SDL_WindowData *window_data = userData;
Expand Down Expand Up @@ -607,7 +607,7 @@ Emscripten_HandleCanvasResize(int eventType, const void *reserved, void *userDat
return 0;
}

EM_BOOL
static EM_BOOL
Emscripten_HandleVisibilityChange(int eventType, const EmscriptenVisibilityChangeEvent *visEvent, void *userData)
{
SDL_WindowData *window_data = userData;
Expand Down

0 comments on commit cc5b4f4

Please sign in to comment.