Alex's iOS improvements... |
Ryan C. Gordon
Guest
|
...have just landed in revision control. If you have an iOS project,
PLEASE update your copy of SDL if at all possible and let us know if anything has totally blown up, as this is slated to ship soon in 2.0.4. A quick list of improvements and fixes Alex made are noted here: https://hg.libsdl.org/SDL/rev/cf8fab52e33b If you don't want to screw around with Mercurial, this link will give you a zipfile of the complete source code to the latest revision, just download (about 7 megabytes), unzip, and point XCode at it: https://hg.libsdl.org/SDL/archive/default.zip A big thank you to Alex for an enormous amount of work on this! --ryan. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||
|
Alex's iOS improvements... |
Alex Szpakowski
Guest
|
Also, keep in mind that retina-resolution handling for iOS was changed (it’s now consistent with SDL’s high-dpi APIs, and with how SDL works in OS X, as mentioned in the list of changes.)
Existing code using SDL for iOS that expected to have retina-resolution output but didn’t use SDL_WINDOW_ALLOW_HIGHDPI and SDL_GL_GetDrawableSize or SDL_GetRendererOutputSize will need to be updated.
_______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
Alex's iOS improvements... |
Alex's iOS improvements... |
slvn
|
Tested also on latest XCode 6.3 / iPhoneOS8.3.sdk and almost all
worked fine, I only notice : 1/ Indeed, we need to add the SDL_WINDOW_ALLOW_HIGHDPI flag when creating the window + getting the renderer size by calling SDL_GetRendererOutputSize. Just wondering if it wouldn't be easier if SDL_GetDisplayMode could give the high dpi mode ? 2/ When testing Landscape mode on a real IPod Touch 4 (ios 6.1.6), I notice : - The device is in Portait. the Application draws in Portrait orientation with a Landscape Shape (a letterbox mode, with black on top and bottom). Bad. (and also with wrong touch coordinates) - When I rotate the device to landscape, it autorates to Landscape and lock in landscape. Ok. I was expecting, as before, that it would automatically rotates to landscape and lock to landscape. To be in landscape, my Info.plist contains : "UIInterfaceOrientation" and "UISupportedOrientation" both set to "UIInterfaceOrientationLandscapeRight" The hint "SDL_HINT_ORIENTATIONS" is set to "LandscapeLeft LandscapeRight" (only "LandscapeLeft" or "LandscapeRight" is not enough to have landscape ) 3/ Probably ok. "SDL_uikview:setSDLWindow()" is always called twice. (I have a splash screen). Thanks to Alex and Ryan for this works! On Fri, Apr 10, 2015 at 10:18 AM, Michael Labbé wrote:
-- Sylvain Becker _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
Alex's iOS improvements... |
Alex Szpakowski
Guest
|
Thanks for testing!
The display modes are in points rather than pixels in the OS X version of SDL as well. It’s probably better this way just because the coordinate systems of display modes / display positions and window sizes / window positions are the same right now. It would be nice to have functions to get the actual pixel dimensions of a display mode though – it’s something I’ve wanted but never got around to making a bugzilla report for. I pushed a couple orientation-related fixes to my fork of SDL ( https://bitbucket.org/slime73/sdl-experiments/commits/all ), it’d be great if you could test that and see if those issues are resolved.
|
|||||||||||||
|
Alex's iOS improvements... |
slvn
|
Great, it seems to be fixed:
The first commit solves the "letterbox / landscape" issue: https://bitbucket.org/slime73/sdl-experiments/commits/950a1a7b4c3cb095a6b8f1e68148ae34dfb42efd Though, I see no difference by adding the second one: https://bitbucket.org/slime73/sdl-experiments/commits/201f813c650ba40b3a51ec3f1710010650c5ec98 Moreover, I observed that setting the hint SDL_HINT_ORIENTATIONS to "LandscapeLeft LandscapeRight" is not need anymore (only the pInfo.list is used, like before). Thanks, Sylvain On Sun, Apr 12, 2015 at 6:59 AM, Alex Szpakowski wrote:
SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
Alex's iOS improvements... |
Ryan C. Gordon
Guest
|
(this was almost all Alex: literally months of work on his part, fwiw.) --ryan. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
Alex's iOS improvements... |
Eric Wing
Guest
|
On 4/9/15, Ryan C. Gordon wrote:
I pulled on Friday and did some testing over the weekend. So far, I haven't seen any serious problems or regressions. I also tested my entire gamut (iOS, OS X, Linux, Windows, Android), and things look equally good. (The SDLActivitiy.java changes are always a gotcha for me...I'm not advocating stabilizing it yet, but I hope we eventually get to a place where it does become stable.) Anyway, great work Alex and thank you! Thanks, Eric -- Beginning iPhone Games Development http://playcontrol.net/iphonegamebook/ _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
Alex's iOS improvements... |
Martin Gerhardy
Guest
|
Am 21.04.2015 um 11:13 schrieb Eric Wing:
Extending the SDLActivity class helps here btw. (Now that the libs that are loaded can be defined in the derived class). See here: https://github.com/mgerhardy/caveexpress/blob/master/android-project/src/org/base/BaseActivity.java _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||||
|
Alex's iOS improvements... |
Eric Wing
Guest
|
On 4/21/15, Martin Gerhardy wrote:
SDL crashes on launch when I try to use a subclass of SDLActivity. I'm going to move this to a new thread, but looking at the SDLActivity code, I don't think it is safe to subclass. Thanks, Eric -- Beginning iPhone Games Development http://playcontrol.net/iphonegamebook/ _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||||||
|
cedega
|
I just updated my iOS code to the newest SDL-2.0.4-9574, and forcing landscape orientations using Info.plist seems to crash the application on launch.
It writes this to the console on my iPhone 4 (iOS 7.1): <Error>: *** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES' Which is odd, because I just went into the source code and found that shouldAutorotate was being set to NO... Either way, enabling all orientations fixes the issue, but my app is definitely only playable in landscape mode Also this is probably intended, but setting the orientation hints using SDL does nothing now. |
|||||||||||
|
cedega
|
I've fixed the issue by replacing the supportedInterfaceOrientations function in SDL_uikitviewcontroller.m with:
- (NSUInteger)supportedInterfaceOrientations { // return UIKit_GetSupportedOrientations(window); return UIInterfaceOrientationMaskLandscape; } |
|||||||||||
|