Skip to content

Commit

Permalink
speedup map update
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaPomaskin committed Nov 8, 2023
1 parent 175b565 commit fcbdf3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions android/app/src/main/java/org/libsdl/app/SDLActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -487,11 +487,11 @@ public void onVisibilityChanged(boolean visible) {
SDLActivity.nativeResume();
nativeUpdateConfigs();
} else {
debouncer.addRunLast(1, TimeUnit.SECONDS, "visibility-off", k1 -> {
debouncer.addRunLast(400, TimeUnit.MILLISECONDS, "visibility-off", k1 -> {
nativeUpdateVisibleMapRegion();

// small delay to let game engine update random map place and render it
debouncer.addRunLast(1, TimeUnit.SECONDS, "native-pause", k2 -> {
debouncer.addRunLast(500, TimeUnit.MILLISECONDS, "native-pause", k2 -> {
SDLActivity.nativePause();
});
});
Expand Down

0 comments on commit fcbdf3f

Please sign in to comment.