SDL on MacOS X problems

Hi,

I’m a developer of the vultures nethack gui. We’ve gotten a bug report that on
OSX input only works in fullscreen mode. In windowed mode neither keyboard nor
mouse events reach the window. Unfortunately neither Clive (the other
developer) nor me have macs, so we can’t really fix this ourselves.

OTOH our code does work fine on windows and unix, so this looks like an SDL
problem to us :smiley:

We’ve already added a call to “NSApplicationLoad()” for macs, without which
the game does not run at all, maybe some other “magic incantations” are needed
to fix the input problem?

(If anyone wants to look at our code (or play graphical nethack), snapshot
tarballs are here: http://usrsrc.org/darcs/vultures2/snapshot/)

Thanks,
Daniel

We’ve already added a call to “NSApplicationLoad()” for macs, without which
the game does not run at all, maybe some other “magic incantations” are needed
to fix the input problem?

Are you linking against SDLmain? You shouldn’t need to add Mac-specific
calls to your SDL program to get basic functionality, but nothing will
work right unless SDLmain is used.

–ryan.

Ryan C. Gordon wrote:

We’ve already added a call to “NSApplicationLoad()” for macs, without
which the game does not run at all, maybe some other “magic
incantations” are needed to fix the input problem?

Are you linking against SDLmain? You shouldn’t need to add Mac-specific
calls to your SDL program to get basic functionality, but nothing will
work right unless SDLmain is used.

We weren’t. Now we are and everything reportedly works.

Thanks a lot!

Daniel

I’m a developer of the vultures nethack gui. We’ve gotten a bug
report that on OSX input only works in fullscreen mode. In
windowed mode neither keyboard nor mouse events reach the
window. Unfortunately neither Clive (the other developer) nor
me have macs, so we can’t really fix this ourselves.

This sounds like a problem I used to have: an SDL binary launched
from the command-line would not receive events… whereas the same
binary inside an application bundle (which is just a directory, with
a couple of extra things inside it) launched with the Finder would
work fine.

I’m pretty sure this is fixed in recent versions of SDLMain. Whoever
is building the Mac version needs to make sure they’re using either
the 1.2.9 framework and the accompanying SDLMain.[hm] files, or the
equivalent version from Fink.

Send instant messages to your online friends http://au.messenger.yahoo.com