mirror of
https://github.com/encounter/SDL.git
synced 2025-12-16 08:27:05 +00:00
Fix warnings detected on Android build
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -64,7 +64,7 @@ int Android_SurfaceWidth = 0;
|
||||
int Android_SurfaceHeight = 0;
|
||||
int Android_DeviceWidth = 0;
|
||||
int Android_DeviceHeight = 0;
|
||||
Uint32 Android_ScreenFormat = SDL_PIXELFORMAT_UNKNOWN;
|
||||
static Uint32 Android_ScreenFormat = SDL_PIXELFORMAT_UNKNOWN;
|
||||
static int Android_ScreenRate = 0;
|
||||
|
||||
SDL_sem *Android_PauseSem = NULL, *Android_ResumeSem = NULL;
|
||||
@@ -221,7 +221,7 @@ Android_SetScreenResolution(int surfaceWidth, int surfaceHeight, int deviceWidth
|
||||
Android_DeviceWidth = deviceWidth;
|
||||
Android_DeviceHeight = deviceHeight;
|
||||
Android_ScreenFormat = format;
|
||||
Android_ScreenRate = rate;
|
||||
Android_ScreenRate = (int)rate;
|
||||
|
||||
/*
|
||||
Update the resolution of the desktop mode, so that the window
|
||||
@@ -247,7 +247,7 @@ Android_SetScreenResolution(int surfaceWidth, int surfaceHeight, int deviceWidth
|
||||
display->display_modes[0].format = format;
|
||||
display->display_modes[0].w = Android_DeviceWidth;
|
||||
display->display_modes[0].h = Android_DeviceHeight;
|
||||
display->display_modes[0].refresh_rate = rate;
|
||||
display->display_modes[0].refresh_rate = (int)rate;
|
||||
display->current_mode = display->display_modes[0];
|
||||
|
||||
SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_RESIZED, surfaceWidth, surfaceHeight);
|
||||
|
||||
@@ -41,7 +41,6 @@ extern int Android_SurfaceWidth;
|
||||
extern int Android_SurfaceHeight;
|
||||
extern int Android_DeviceWidth;
|
||||
extern int Android_DeviceHeight;
|
||||
extern Uint32 Android_ScreenFormat;
|
||||
extern SDL_sem *Android_PauseSem, *Android_ResumeSem;
|
||||
extern SDL_Window *Android_Window;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user