Re: [AD] More OSX Allegro Notes |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
--- Angelo Mottola <a.mottola@xxxxxxxxxx> wrote:
> OSX Allegro uses magic main replamenent that works this way: on
> startup a cocoa NSApplication object is created (thus a connection
> with the window server is enstablished), then it is registered with
> the dock (and you see the icon popping out there) and then it spawns
> a thread running the user main() function, while the main application
> thread fetches and handles system events. What can be done is not to
> register the app with the dock if ALLEGRO_USE_CONSOLE is defined, but
> an NSApplication object is needed to handle system events. But I
> wonder if this makes much sense at all. Thoughts?
It actually makes perfect sense, in that "allegro uses black magic to
change your main()" kind of way. ^_^;;
I think the not registering the icon with the dock would be the way to
go. Is that a possibility? It's just weird to see console apps that
are command-line-only tools with a dock spot.
A side question: if ALLEGRO_USE_CONSOLE is defined, would the program
still be able to open a window for graphical output? I know that the
two sound completely contradictory, but I had to ask all the same. I'm
currently attempting to write a set of tools for converting png files
to my own proprietary sprite set format, and if the '-p' option is
specified on the tool's command line, I'd like to be able to open a
window and display the sprites.
Maybe what's needed is to only register with the dock when the "video
mode" is set? I don't know how all this stuff works; Objective-C seems
like a wonderful upgrade to C++ to me, but it's waaaaay above my head.
^_^;;
> Great. What kind of joystick do you have? I'm particularly interested
> in knowing how the axis are reported on secondary sticks...
I got one of those Macally iShock2 gamepads. It has one digital pad
and two analog sticks, plus something like *11* buttons. The sticks
also click, and I don't know if that registers as a button press or
not. Hopefully this weekend I'll be able to put it through its paces
with Allegro, but for now it works pretty damned well with MAME. :)
- Charles