The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Quirks with SDL_SetRenderLogicalSize() on Android
neoaggelos


Joined: 02 Jan 2013
Posts: 138
Hello,

Is there anyone who has actually managed to use SDL_SetRenderLogicalSize() properly under Android? The reason behind this post is that SDL2 2.0.5 seems to be close, so a fix before release would be perfect.

I have encountered a handful of issues while trying to use it. Most of them revolved around mouse coordinates and viewport not being set correctly, especially after resuming the app. Because of those errors, I ended up ditching it and setting the viewport and scale of a renderer by directly (as well as a dirty event watch to fix event coordinates). Because of that, I don't have any code right now that replicates the issue, but if more people have had similar problems, then I could create a test case in hope that any bugs be fixed.

By the way this is with Android NDK 13 and Android API level 15.
Quirks with SDL_SetRenderLogicalSize() on Android
Eric Wing
Guest

On 10/8/16, neoaggelos wrote:
Quote:
Hello,

Is there anyone who has actually managed to use SDL_SetRenderLogicalSize()
properly under Android? The reason behind this post is that SDL2 2.0.5 seems
to be close, so a fix before release would be perfect.

I have encountered a handful of issues while trying to use it. Most of them
revolved around mouse coordinates and viewport not being set correctly,
especially after resuming the app. Because of those errors, I ended up
ditching it and setting the viewport and scale of a renderer by directly (as
well as a dirty event watch to fix event coordinates). Because of that, I
don't have any code right now that replicates the issue, but if more people
have had similar problems, then I could create a test case in hope that any
bugs be fixed.

By the way this is with Android NDK 13 and Android API level 15.


Yes, I've been using it. I think it works fine for me. (I am using a
patch I submitted to allow overscan mode in addition to letterbox, but
I don't think it would make me immune to the problems you describe.)

How does this work for you?
http://blurrrsdk.com/tempdownload/BlurrrBinaries/FlappyBlurrr/FlappyBlurrrC.apk

I do recall some programming error I once made where the
SetRenderLogicalSize caused everything to be restricted to the
top-left corner only on Android, but I forgot what caused that.

-Eric
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org