Skip to content

Commit

Permalink
Update AGDK game mode sample to 1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
natetrost committed Jan 27, 2025
1 parent 895feeb commit 4963183
Show file tree
Hide file tree
Showing 9 changed files with 221 additions and 153 deletions.
12 changes: 6 additions & 6 deletions agdk/game_mode/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 33
ndkVersion '26.1.10909125'
compileSdkVersion 35
ndkVersion '27.2.12479018'

defaultConfig {
applicationId 'com.android.example.games.game_mode_sample'
minSdkVersion 24
targetSdkVersion 33
targetSdkVersion 35
versionCode 2
versionName '1.2'
versionName '1.2.1'
externalNativeBuild {
cmake {
arguments '-DANDROID_STL=c++_shared'
Expand Down Expand Up @@ -60,8 +60,8 @@ dependencies {
implementation "androidx.core:core:1.5.0"
implementation "androidx.constraintlayout:constraintlayout:2.0.4"
implementation 'androidx.fragment:fragment:1.2.5'
implementation "androidx.games:games-activity:2.0.2"
implementation "androidx.games:games-frame-pacing:2.0.0"
implementation "androidx.games:games-activity:3.0.5"
implementation "androidx.games:games-frame-pacing:2.1.2"

// Example of using local .aar files in libs/ directory.
// Comment out the androidx.games implementation lines if
Expand Down
1 change: 1 addition & 0 deletions agdk/game_mode/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ target_compile_options(game
target_link_libraries(game
android
bullet3
c++
imgui
game-activity::game-activity_static
games-frame-pacing::swappy_static
Expand Down
2 changes: 1 addition & 1 deletion agdk/game_mode/app/src/main/cpp/native_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ void NativeEngine::GameLoop() {
struct android_poll_source *source;

// If not animating, block until we get an event; if animating, don't block.
while ((ALooper_pollAll(IsAnimating() ? 0 : -1, NULL, &events,
while ((ALooper_pollOnce(IsAnimating() ? 0 : -1, NULL, &events,
(void **)&source)) >= 0) {
// process event
if (source != NULL) {
Expand Down
2 changes: 1 addition & 1 deletion agdk/game_mode/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.7.2'
}
}

Expand Down
5 changes: 4 additions & 1 deletion agdk/game_mode/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@
android.enableJetifier=true
android.useAndroidX=true

android.prefabVersion=2.0.0
android.prefabVersion=2.0.0
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
Binary file modified agdk/game_mode/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions agdk/game_mode/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Fri Nov 03 11:29:29 CDT 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 4963183

Please sign in to comment.