Skip to content

Commit

Permalink
Android: When using the hardware scaler, round the size to divisible …
Browse files Browse the repository at this point in the history
…by 4. Might help #11151
  • Loading branch information
hrydgard committed Aug 26, 2018
1 parent 61eb331 commit 3c5b2d6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions android/jni/app-android.cpp
Expand Up @@ -871,6 +871,11 @@ void getDesiredBackbufferSize(int &sz_x, int &sz_y) {
sz_x = 0; sz_x = 0;
sz_y = 0; sz_y = 0;
} }
// Round the size up to the nearest multiple of 4. While this may cause a tiny aspect ratio distortion,
// there's some hope that #11151 is a driver bug that might be worked around this way. If this fixes it,
// it'll be worth trying to round to a multiple of 2 instead.
sz_x = (sz_x + 3) & ~3;
sz_y = (sz_y + 3) & ~3;
} }


extern "C" void JNICALL Java_org_ppsspp_ppsspp_NativeApp_setDisplayParameters(JNIEnv *, jclass, jint xres, jint yres, jint dpi, jfloat refreshRate) { extern "C" void JNICALL Java_org_ppsspp_ppsspp_NativeApp_setDisplayParameters(JNIEnv *, jclass, jint xres, jint yres, jint dpi, jfloat refreshRate) {
Expand Down

0 comments on commit 3c5b2d6

Please sign in to comment.