Skip to content

Commit 9bb5f9c

Browse files
authored
Merge pull request #88 from lexi-the-cute/main
Updated To Games-Activity 2.0.2
2 parents 1a8a92b + a604c0a commit 9bb5f9c

20 files changed

+10968
-11199
lines changed

android-activity/CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Changed
9+
- GameActivity updated to 2.0.2 (requires the corresponding 2.0.2 `.aar` release from Google) ([#88](https://github.com/rust-mobile/android-activity/pull/88))
810

911
## [0.4.3] - 2022-07-30
1012
### Fixed
1113
- Fixed a deadlock in the `native-activity` backend while waiting for the native thread after getting an `onDestroy` callback from Java ([#94](https://github.com/rust-mobile/android-activity/pull/94))
12-
1314
- Fixed numerous deadlocks in the `game-activity` backend with how it would wait for the native thread in various Java callbacks, after the app has returned from `android_main` ([#98](https://github.com/rust-mobile/android-activity/pull/98))
1415

1516
## [0.4.2] - 2022-06-17
@@ -26,7 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2627
### Changed
2728
- Removed some overly-verbose logging in the `native-activity` backend ([#49](https://github.com/rust-mobile/android-activity/pull/49))
2829
### Removed
29-
- Most of the examples were moved to https://github.com/rust-mobile/rust-android-examples ([#50](https://github.com/rust-mobile/android-activity/pull/50))
30+
- Most of the examples were moved to <https://github.com/rust-mobile/rust-android-examples> ([#50](https://github.com/rust-mobile/android-activity/pull/50))
3031

3132
## [0.4] - 2022-11-10
3233
### Changed
@@ -61,4 +62,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6162

6263
## [0.1] - 2022-07-04
6364
### Added
64-
- Initial release
65+
- Initial release

android-activity/build.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
#![allow(dead_code)]
22

33
fn build_glue_for_game_activity() {
4-
for f in ["GameActivity.h", "GameActivity.cpp"] {
4+
for f in [
5+
"GameActivity.h",
6+
"GameActivity.cpp",
7+
"GameActivityEvents.h",
8+
"GameActivityEvents.cpp",
9+
"GameActivityLog.h",
10+
] {
511
println!("cargo:rerun-if-changed=game-activity-csrc/game-activity/{f}");
612
}
713
cc::Build::new()
814
.cpp(true)
915
.include("game-activity-csrc")
1016
.file("game-activity-csrc/game-activity/GameActivity.cpp")
17+
.file("game-activity-csrc/game-activity/GameActivityEvents.cpp")
1118
.extra_warnings(false)
1219
.cpp_link_stdlib("c++_static")
1320
.compile("libgame_activity.a");
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright 2020 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/*
18+
* This is the main interface to the Android Performance Tuner library, also
19+
* known as Tuning Fork.
20+
*
21+
* It is part of the Android Games SDK and produces best results when integrated
22+
* with the Swappy Frame Pacing Library.
23+
*
24+
* See the documentation at
25+
* https://developer.android.com/games/sdk/performance-tuner/custom-engine for
26+
* more information on using this library in a native Android game.
27+
*
28+
*/
29+
30+
#pragma once
31+
32+
// There are separate versions for each GameSDK component that use this format:
33+
#define ANDROID_GAMESDK_PACKED_VERSION(MAJOR, MINOR, BUGFIX) \
34+
((MAJOR << 16) | (MINOR << 8) | (BUGFIX))
35+
// Accessors
36+
#define ANDROID_GAMESDK_MAJOR_VERSION(PACKED) ((PACKED) >> 16)
37+
#define ANDROID_GAMESDK_MINOR_VERSION(PACKED) (((PACKED) >> 8) & 0xff)
38+
#define ANDROID_GAMESDK_BUGFIX_VERSION(PACKED) ((PACKED) & 0xff)
39+
40+
#define AGDK_STRING_VERSION(MAJOR, MINOR, BUGFIX, GIT) \
41+
#MAJOR "." #MINOR "." #BUGFIX "." #GIT

0 commit comments

Comments
 (0)