SDL 2.0.3 going rabid on OS X |
Andreas Falkenhahn
Guest
|
Hi,
I am experiencing some serious issues with SDL 2.0.3 on OS X. I can reproduce the behaviour on two different systems, an iMac running 10.6 and a MacMini running 10.9. On both systems SDL randomly seems to turn off the monitor and go to energy saver mode for no apparent reason. Has anybody ever heard of such an issue before? It's really quite scary... The only rational explanation I can find for this behaviour is that my build is somewhat messed up. I had to go to quite some pains because I want to target 10.6 but I only have the 10.8 & 10.9 SDKs. According to https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html it is still possible, however, to build for 10.6 using a newer SDK. And the builds do run on 10.6 so it seems possible after all. However, this sudden monitor and drive switch off is really scaring the heck out of me. Here's what I told 'configure': ./configure CFLAGS="-arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.6" --enable-shared=NO In addition, the environment variable MACOSX_DEPLOYMENT_TARGET is set to "10.6" and when I link against -lSDL2 I'm also passing -Wl,-syslibroot,Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk to gcc. Before I investigate deeper here I'd just be interested to know if anybody has ever heard of this issue before or if there's something else that I need to keep in mind when building for Mac OS X using plain makefiles. README-macosx.txt, unfortunately, is not of much help here because it doesn't talk about all these intricacies that one is confronted with when building for "The World's Most Advanced OS" (cough, cough) without resorting to Xcode... -- Best regards, Andreas Falkenhahn mailto: _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||
|
SDL 2.0.3 going rabid on OS X |
Alex Szpakowski
Guest
|
Have you tried calling SDL_DisableScreenSaver? You might want to try with the latest Mercurial version of SDL as well.
I build SDL targeting 10.6 using the SDKs from the most recent versions of OS X and I’ve never had this problem, although my code makes sure the screensaver is disabled when the game is in the foreground. On Aug 17, 2014, at 11:11 AM, Andreas Falkenhahn wrote:
_______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
SDL 2.0.3 going rabid on OS X |
Ryan C. Gordon
Guest
|
This is normal; SDL should build with 10.5 compatibility, even when built against the 10.9 SDK. If you aren't using the mouse/keyboard (just playing back a movie with SDL or using a joystick exclusively) then your screensaver might be kicking in. We changed this to turn off the screensaver by default, but I don't know if we did that after 2.0.3 shipped. You can explicitly disable it in any case with SDL_DisableScreenSaver(). --ryan. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
SDL 2.0.3 going rabid on OS X |
Andreas Falkenhahn
Guest
|
Sorry, it was my fault. There seems to be a problem with symbol importing from
my custom dylib that contains SDL2 among some glue code. When doing a func = dlsym(obj, "Sleep"); I actually get a pointer to a function which puts the system to sleep. Still, I have no idea where this function comes from. When doing a nm mysdlglue.dylib I don't see a symbol named "Sleep" but still it is imported successfully by the call above and this in turn confuses my app because my app expects the "Sleep" symbol to do something entirely different Quite strange... I'll have to do some more debugging here... On 17.08.2014 at 18:47 Ryan C. Gordon wrote:
-- Best regards, Andreas Falkenhahn mailto: _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||||||||||||
|