Fix warnings detected on Android build

This commit is contained in:
Sylvain Becker
2018-12-06 09:22:00 +01:00
parent a7563bcd3d
commit 252dc85e95
10 changed files with 22 additions and 18 deletions

View File

@@ -234,7 +234,7 @@ Android_OnMouse(int state, int action, float x, float y, SDL_bool relative)
changes = state & ~last_state;
button = TranslateButton(changes);
last_state = state;
SDL_SendMouseMotion(Android_Window, 0, relative, x, y);
SDL_SendMouseMotion(Android_Window, 0, relative, (int)x, (int)y);
SDL_SendMouseButton(Android_Window, 0, SDL_PRESSED, button);
break;
@@ -242,13 +242,13 @@ Android_OnMouse(int state, int action, float x, float y, SDL_bool relative)
changes = last_state & ~state;
button = TranslateButton(changes);
last_state = state;
SDL_SendMouseMotion(Android_Window, 0, relative, x, y);
SDL_SendMouseMotion(Android_Window, 0, relative, (int)x, (int)y);
SDL_SendMouseButton(Android_Window, 0, SDL_RELEASED, button);
break;
case ACTION_MOVE:
case ACTION_HOVER_MOVE:
SDL_SendMouseMotion(Android_Window, 0, relative, x, y);
SDL_SendMouseMotion(Android_Window, 0, relative, (int)x, (int)y);
break;
case ACTION_SCROLL: