SDL 2 IOS 8 Screen resolution problem |
SDL 2 IOS 8 Screen resolution problem |
Alex Szpakowski
Guest
|
Does the problem still happen if you use my fork of SDL containing updates and fixes to its iOS code?
https://bitbucket.org/slime73/sdl-experiments/branch/iOS-improvements https://bitbucket.org/slime73/sdl-experiments/get/iOS-improvements.zip On Nov 11, 2014, at 8:58 AM, doctoreamer wrote:
|
|||||||||||||
|
Re: SDL 2 IOS 8 Screen resolution problem |
doctoreamer
|
Thanks for the response. I will try it!
|
|||||||||||||||
|
Re: SDL 2 IOS 8 Screen resolution problem |
doctoreamer
|
I built your fork of SDL using the Xcode project. Then I swapped out the original SDL in my project to your version and tried to build. Was not successful, this is the linker error I got:
Undefined symbols for architecture armv7: "_OBJC_CLASS_$_CMMotionManager", referenced from: objc-class-ref in libSDL2Test.a(SDL_sysjoystick.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation) Do I need to do anything else to make your version work? I'm sorry if it's obvious, I'm new to SDL and IOS development.
|
|||||||||||||||
|
SDL 2 IOS 8 Screen resolution problem |
Alex Szpakowski
Guest
|
Recent versions of SDL for iOS need your app to link with the CoreMotion framework.
On Nov 11, 2014, at 5:01 PM, doctoreamer wrote:
|
|||||||||||||
|
Re: SDL 2 IOS 8 Screen resolution problem |
doctoreamer
|
It worked, the game renders on the whole screen again! Thanks alot for your work on this! Will your fork eventually merge with SDL?
|
|||||||||||||||
|
SDL 2 IOS 8 Screen resolution problem |
Alex Szpakowski
Guest
|
I hope so! Thanks for testing.
On Nov 11, 2014, at 5:14 PM, doctoreamer wrote:
|
|||||||||||||
|
Re: SDL 2 IOS 8 Screen resolution problem |
doctoreamer
|
I think I've found a bug with your fork. When I press the home button while the game is running, and then open the application again, the application is "frozen". When the game is frozen the background image is not filling the whole screen and no touch input is handled. None of this happens on the official SDL release (2.0.4).
[img]http://i.imgur.com/paIhoMn.png?1[/img]
|
|||||||||||||||
|
Re: SDL 2 IOS 8 Screen resolution problem |
doctoreamer
|
Never mind the image linked, it doesn't show anything on a white background. It was supposed to show how the background image didn't fill the whole screen, and the rest is white.
|
|||||||||||||||||
|
SDL 2 IOS 8 Screen resolution problem |
Alex Szpakowski
Guest
|
I can’t reproduce this – sending apps into and out of the background works fine for me, although I’ve been testing with code that uses raw OpenGL (and handles iOS multitasking properly by calling glFinish in SDL_APP_DIDENTERBACKGROUND via an event watch callback.)
On Nov 12, 2014, at 6:03 AM, doctoreamer wrote:
|
|||||||||||||
|
Re: SDL 2 IOS 8 Screen resolution problem |
doctoreamer
|
I'm not using raw OpenGL, I'm rendering using SDL_Textures and functions like SDL_RenderCopy() instead. Multitasking is not an issue when I'm using official SDL, even though my code does nothing to handle events like SDL_APP_DIDENTERBACKGROUND. I realise that I probably should handle these events anyway, but thought it might be interesting to point out the difference in behaviour.
Is using raw OpenGL much preferable to the SDL rendering methods when building iOS applications? Thanks alot for your responses!
|
|||||||||||||
|
SDL 2 IOS 8 Screen resolution problem |
Alex Szpakowski
Guest
|
I ran the iOS keyboard demo (which uses SDL_Render) and I still can’t reproduce the issue – do you have a minimal test case available?
Using raw OpenGL (ES) is preferable if you need the level of control it gives compared to the SDL_Render API, but if you don’t then SDL_Render should be fine. On Nov 12, 2014, at 6:29 PM, doctoreamer wrote:
|
|||||||||||||
|
Re: SDL 2 IOS 8 Screen resolution problem |
doctoreamer
|
I reproduced the issue with this code:
|
|||||||||||||||
|
SDL 2 IOS 8 Screen resolution problem |
Alex Szpakowski
Guest
|
Thanks for the test code! My latest commit to the iOS-improvements branch of my repository should fix the issue, I think.
On Nov 18, 2014, at 4:14 PM, doctoreamer wrote:
|
|||||||||||||
|
Re: SDL 2 IOS 8 Screen resolution problem |
doctoreamer
|
I tried running the program I posted here with your new commit. The issue now happens as soon as I run the app and not only when switching applications.
|
|||||||||||||
|
doctoreamer
|
By the way, I'm testing on a iPhone 4s device.
|
|||||||||||
|
SDL 2 IOS 8 Screen resolution problem |
Alex Szpakowski
Guest
|
I can’t reproduce it with my branch with my latest commits. When using a simulated iPhone 4s / iOS 8.1, my test image (since I don’t have access to your images) always fills the whole screen, and when using a physical iPad 2 with iOS 8.1 it’s letterboxed to the 480/320 aspect ratio as expected and fills the whole screen aside from that.
On Nov 21, 2014, at 7:27 PM, doctoreamer wrote:
|
|||||||||||||
|