From 03f8528315fa46c95991a34f3325d7b33ae5538c Mon Sep 17 00:00:00 2001
From: Edward Rudd <urkle@outoforder.cc>
Date: Sat, 02 May 2020 21:48:36 +0000
Subject: [PATCH] Update source to SDL2 2.0.12
---
source/src/video/android/SDL_androidmouse.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/source/src/video/android/SDL_androidmouse.c b/source/src/video/android/SDL_androidmouse.c
index 037b453..8f49862 100644
--- a/source/src/video/android/SDL_androidmouse.c
+++ b/source/src/video/android/SDL_androidmouse.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -62,7 +62,7 @@
cursor = SDL_calloc(1, sizeof(*cursor));
if (cursor) {
- SDL_AndroidCursorData *data = (SDL_AndroidCursorData*)SDL_calloc(1, sizeof(*data));
+ SDL_AndroidCursorData *data = (SDL_AndroidCursorData *)SDL_calloc(1, sizeof(*data));
if (data) {
data->custom_cursor = custom_cursor;
data->system_cursor = system_cursor;
@@ -141,13 +141,13 @@
}
static int
-Android_ShowCursor(SDL_Cursor * cursor)
+Android_ShowCursor(SDL_Cursor *cursor)
{
if (!cursor) {
cursor = Android_CreateEmptyCursor();
}
if (cursor) {
- SDL_AndroidCursorData *data = (SDL_AndroidCursorData*)cursor->driverdata;
+ SDL_AndroidCursorData *data = (SDL_AndroidCursorData *)cursor->driverdata;
if (data->custom_cursor) {
if (!Android_JNI_SetCustomCursor(data->custom_cursor)) {
return SDL_Unsupported();
@@ -220,12 +220,12 @@
}
void
-Android_OnMouse(int state, int action, float x, float y, SDL_bool relative)
+Android_OnMouse(SDL_Window *window, int state, int action, float x, float y, SDL_bool relative)
{
int changes;
Uint8 button;
- if (!Android_Window) {
+ if (!window) {
return;
}
@@ -234,25 +234,25 @@
changes = state & ~last_state;
button = TranslateButton(changes);
last_state = state;
- SDL_SendMouseMotion(Android_Window, 0, relative, x, y);
- SDL_SendMouseButton(Android_Window, 0, SDL_PRESSED, button);
+ SDL_SendMouseMotion(window, 0, relative, (int)x, (int)y);
+ SDL_SendMouseButton(window, 0, SDL_PRESSED, button);
break;
case ACTION_UP:
changes = last_state & ~state;
button = TranslateButton(changes);
last_state = state;
- SDL_SendMouseMotion(Android_Window, 0, relative, x, y);
- SDL_SendMouseButton(Android_Window, 0, SDL_RELEASED, button);
+ SDL_SendMouseMotion(window, 0, relative, (int)x, (int)y);
+ SDL_SendMouseButton(window, 0, SDL_RELEASED, button);
break;
case ACTION_MOVE:
case ACTION_HOVER_MOVE:
- SDL_SendMouseMotion(Android_Window, 0, relative, x, y);
+ SDL_SendMouseMotion(window, 0, relative, (int)x, (int)y);
break;
case ACTION_SCROLL:
- SDL_SendMouseWheel(Android_Window, 0, x, y, SDL_MOUSEWHEEL_NORMAL);
+ SDL_SendMouseWheel(window, 0, x, y, SDL_MOUSEWHEEL_NORMAL);
break;
default:
--
Gitblit v1.9.3