diff --git a/project/jni/application/ballfield/AndroidAppSettings.cfg b/project/jni/application/ballfield/AndroidAppSettings.cfg index 6a780792c..6942d86ab 100644 --- a/project/jni/application/ballfield/AndroidAppSettings.cfg +++ b/project/jni/application/ballfield/AndroidAppSettings.cfg @@ -49,6 +49,8 @@ SdlVideoResize=y # Application resizing will keep 4:3 aspect ratio, with black bars at sides (y)/(n) SdlVideoResizeKeepAspect=n +CompatibilityHacksProperUsageOfSDL_UpdateRects=y + # Application does not call SDL_Flip() or SDL_UpdateRects() appropriately, or draws from non-main thread - # enabling the compatibility mode will force screen update every 100 milliseconds, which is laggy and inefficient (y) or (n) CompatibilityHacks=n diff --git a/project/jni/application/xserver/xserver b/project/jni/application/xserver/xserver index 4f937a66d..1921292f9 160000 --- a/project/jni/application/xserver/xserver +++ b/project/jni/application/xserver/xserver @@ -1 +1 @@ -Subproject commit 4f937a66dd6c81674c0d6b8a61d94e115448fc9f +Subproject commit 1921292f96ecaec4a5297cdd64b0bc0b35f5b488 diff --git a/project/jni/sdl-1.2/src/video/android/SDL_androidvideo-1.2.c b/project/jni/sdl-1.2/src/video/android/SDL_androidvideo-1.2.c index e299fcf2f..9d253584d 100644 --- a/project/jni/sdl-1.2/src/video/android/SDL_androidvideo-1.2.c +++ b/project/jni/sdl-1.2/src/video/android/SDL_androidvideo-1.2.c @@ -967,9 +967,10 @@ static void ANDROID_FlipHWSurfaceInternal(int numrects, SDL_Rect *rects) int i; for(i = 0; i < numrects; i++) { - //printf("SDL_UpdateTexture: rect %d: %04d:%04d:%04d:%04d", i, rects[i].x, rects[i].y, rects[i].w, rects[i].h); + //__android_log_print(ANDROID_LOG_INFO, "libSDL", "SDL_UpdateTexture: rect %d: %04d:%04d:%04d:%04d", i, rects[i].x, rects[i].y, rects[i].w, rects[i].h); SDL_UpdateTexture((struct SDL_Texture *)SDL_CurrentVideoSurface->hwdata, &rects[i], - SDL_CurrentVideoSurface->pixels + rects[i].y * SDL_CurrentVideoSurface->pitch + rects[i].x, + SDL_CurrentVideoSurface->pixels + rects[i].y * SDL_CurrentVideoSurface->pitch + + rects[i].x * SDL_CurrentVideoSurface->format->BytesPerPixel, SDL_CurrentVideoSurface->pitch); } }