[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Adonthell-devel] Redesign?
From: |
Kai Sterker |
Subject: |
Re: [Adonthell-devel] Redesign? |
Date: |
Tue, 19 Aug 2003 12:32:17 +0200 |
Am Montag, 18.08.03 um 10:32 Uhr schrieb Alexandre Courbot:
What I don't understand is why we hadn't such problems with 0.3 on OSX.
Because we did exactly what SDL wanted us to do: have our main function
replaced by SDL's (happens automatically when including SDL.h in
main.cc). So SDL did the initialization and everything worked well.
Maybe it's the module stuff?
Nope, definitely not. I once did the above with the inputtest program
and it worked like a charm. However, that is totally against the
backend idea. I mean, inputtest should run with any backend you
specify, so one can't add SDL specific initialization to it! That's why
I wanted to add this initialization to the SDL gfx backend.
It also would have the advantage that a plain python interpreter could
load the SDL module on OSX and everything would be set up to open
windows and such. If initialization is done elsewhere in Adonthell,
anything run with python would be missing that. Unless python itself
takes care of it, like MacPython is supposed to do (also see my
previous mail).
Could a "global" initialization function help? That fonction could set
up the
OSX main function callback and would look cleaner design-wise.
I don't think so. A function is bad, as it will never return. We need
something like SDL or Clanlib does. Initialize and then call our
application from _inside_ the initialization.
Okay. Then I guess in these conditions dynamic loading of the SDL
module is
out of the question on OSX.
Again, if everything is initialized correctly, the SDL module can be
loaded at runtime and will work.
So, what seems to be the most promising solution would be doing what
Clanlib does (thanks for the hint, Kenneth!). That means, any little
tools we write do not need their own initialization, and they remain
independent from the backend. I think, I will have a closer look at
this.
Kai
Re: [Adonthell-devel] Redesign?, Micah J. Cowan, 2003/08/18
Re: [Adonthell-devel] Redesign?, Kenneth Gangstoe, 2003/08/19