Adding back changes for Android by Terrence.

This commit is contained in:
Pere Pujal i Carabantes 2025-10-29 23:43:42 +01:00
parent 509dfff633
commit cc304b8b5e
2 changed files with 4 additions and 2 deletions

View file

@ -52,6 +52,7 @@
#ifdef __ANDROID__ #ifdef __ANDROID__
#include "SDL2/SDL.h" #include "SDL2/SDL.h"
#include "../../../SDL2/src/core/android/SDL_android.h"
#include "jni.h" #include "jni.h"
// since setlocale on the Android is not supported well, // since setlocale on the Android is not supported well,
// setlocale cannot get current default locale of the device. // setlocale cannot get current default locale of the device.

View file

@ -358,6 +358,7 @@ extern status_t haiku_trash(const char *f);
#define AUTOSAVE_GOING_BACKGROUND #define AUTOSAVE_GOING_BACKGROUND
#include "android_print.h" #include "android_print.h"
#include "android_assets.h" #include "android_assets.h"
#include "SDL_mouse_c.h"
int entered_background = 0; int entered_background = 0;
#else #else
@ -31869,7 +31870,7 @@ static void convert_motion_to_wheel(SDL_Event event)
{ {
while (motion_dy - high > 0) while (motion_dy - high > 0)
{ {
SDL_SendMouseWheel(NULL, event.motion.which, 0, 1); SDL_SendMouseWheel(NULL, event.motion.which, 0.0f, 1.0f, SDL_MOUSEWHEEL_NORMAL);
motion_dy -= high; motion_dy -= high;
} }
} }
@ -31877,7 +31878,7 @@ static void convert_motion_to_wheel(SDL_Event event)
{ {
while (motion_dy + high < 0) while (motion_dy + high < 0)
{ {
SDL_SendMouseWheel(NULL, event.motion.which, 0, -1); SDL_SendMouseWheel(NULL, event.motion.which, 0.0f, -1.0f, SDL_MOUSEWHEEL_NORMAL);
motion_dy += high; motion_dy += high;
} }
} }