Skip to content

Commit

Permalink
Merge pull request #6 from joelgomes1994/fix-crash-null-uri
Browse files Browse the repository at this point in the history
Fix crash due to null image Uri
  • Loading branch information
joelgomes1994 authored Jan 22, 2024
2 parents d82fe00 + bc4e9a7 commit fb98744
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ In short follow these steps:
- Linux:
- `./gradlew assembleRelease`
- Copy the newly created `.aar` file to your plugin directory:
- `app/build/outputs/aar/GodotPlayGamesServices.release.aar` to `[your Godot project]/android/plugins/`
- `app/build/outputs/aar/GodotGooglePlayGameServices.release.aar` to `[your Godot project]/android/plugins/`

# How to use

Expand Down
30 changes: 12 additions & 18 deletions app/src/main/java/com/jacobibanez/godot/gpgs/games/GameMapper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,16 @@ fun fromGame(godot: Godot, game: Game) = Dictionary().apply {
game.secondaryCategory.let { put("secondaryCategory", it) }
put("themeColor", game.themeColor)
put("hasGamepadSupport", game.hasGamepadSupport())
game.hiResImageUri.let {
put(
"hiResImageUri",
it.toStringAndSave(godot, "hiResImageUri", game.applicationId)
)
}
game.iconImageUri.let {
put(
"iconImageUri",
it.toStringAndSave(godot, "iconImageUri", game.applicationId)
)
}
game.featuredImageUri.let {
put(
"featuredImageUri",
it.toStringAndSave(godot, "featuredImageUri", game.applicationId)
)
}
put(
"hiResImageUri",
game.hiResImageUri?.toStringAndSave(godot, "hiResImageUri", game.applicationId) ?: ""
)
put(
"iconImageUri",
game.iconImageUri?.toStringAndSave(godot, "iconImageUri", game.applicationId) ?: ""
)
put(
"featuredImageUri",
game.featuredImageUri?.toStringAndSave(godot, "featuredImageUri", game.applicationId) ?: ""
)
}

0 comments on commit fb98744

Please sign in to comment.