Browse Source

General Android upgrades

* SDL2 to 2.30.2 bugfix
* Gradle to 8.7
* Android Gradle plugin to 8.3.2

Playtested to my Google Pixel 2, Android 11
pull/7378/head
Oleksandr Kalko 2 years ago committed by Anders Jenbo
parent
commit
5446496ae6
  1. 4
      3rdParty/SDL2/CMakeLists.txt
  2. 2
      android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
  3. 16
      android-project/app/src/main/java/org/libsdl/app/SDLControllerManager.java
  4. 2
      android-project/build.gradle
  5. 4
      android-project/gradle/wrapper/gradle-wrapper.properties

4
3rdParty/SDL2/CMakeLists.txt vendored

@ -15,7 +15,7 @@ set(SDL_TEST_ENABLED_BY_DEFAULT OFF)
include(functions/FetchContent_MakeAvailableExcludeFromAll)
include(FetchContent)
FetchContent_Declare(SDL2
URL https://github.com/libsdl-org/SDL/releases/download/release-2.30.0/SDL2-2.30.0.tar.gz
URL_HASH SHA256=36e2e41557e0fa4a1519315c0f5958a87ccb27e25c51776beb6f1239526447b0
URL https://github.com/libsdl-org/SDL/releases/download/release-2.30.2/SDL2-2.30.2.tar.gz
URL_HASH SHA256=891d66ac8cae51361d3229e3336ebec1c407a8a2a063b61df14f5fdf3ab5ac31
)
FetchContent_MakeAvailableExcludeFromAll(SDL2)

2
android-project/app/src/main/java/org/libsdl/app/SDLActivity.java

@ -61,7 +61,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
private static final String TAG = "SDL";
private static final int SDL_MAJOR_VERSION = 2;
private static final int SDL_MINOR_VERSION = 30;
private static final int SDL_MICRO_VERSION = 0;
private static final int SDL_MICRO_VERSION = 2;
/*
// Display InputType.SOURCE/CLASS of events and devices
//

16
android-project/app/src/main/java/org/libsdl/app/SDLControllerManager.java

@ -546,13 +546,15 @@ class SDLHapticHandler {
if (haptic == null) {
InputDevice device = InputDevice.getDevice(deviceIds[i]);
Vibrator vib = device.getVibrator();
if (vib.hasVibrator()) {
haptic = new SDLHaptic();
haptic.device_id = deviceIds[i];
haptic.name = device.getName();
haptic.vib = vib;
mHaptics.add(haptic);
SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
if (vib != null) {
if (vib.hasVibrator()) {
haptic = new SDLHaptic();
haptic.device_id = deviceIds[i];
haptic.name = device.getName();
haptic.vib = vib;
mHaptics.add(haptic);
SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
}
}
}
}

2
android-project/build.gradle

@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.2'
classpath 'com.android.tools.build:gradle:8.3.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

4
android-project/gradle/wrapper/gradle-wrapper.properties vendored

@ -1,6 +1,6 @@
#Sat Aug 19 20:48:57 CEST 2023
#Mon Apr 29 13:42:12 EEST 2024
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

Loading…
Cancel
Save