Skip to content

Commit

Permalink
Merge pull request #16800 from hrydgard/android-update-measurements
Browse files Browse the repository at this point in the history
Android: update measurements on UI thread
  • Loading branch information
hrydgard authored Jan 12, 2023
2 parents 3d6647e + f38dd95 commit 449d0a1
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions android/src/org/ppsspp/ppsspp/SizeManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,10 @@ public void checkDisplayMeasurements() {
}
displayUpdatePending = true;

final Runnable updater = new Runnable() {
public void run() {
Log.d(TAG, "checkDisplayMeasurements: checking now");
updateDisplayMeasurements();
}
};

final Handler handler = new Handler(Looper.getMainLooper());
handler.postDelayed(updater, 10);
activity.runOnUiThread(() -> {
Log.d(TAG, "checkDisplayMeasurements: checking now");
updateDisplayMeasurements();
});
}

@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
Expand Down

0 comments on commit 449d0a1

Please sign in to comment.