Re: [AD] iphone port

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thu, 2009-08-13 at 14:02 -0400, Evert Glebbeek wrote:
> I forgot to ask earlier: have you looked at the OS X code at all for  
> this and is any code shared between the OS X port and the iphone port?  
> It probably makes sense to try to do that, or have one benefit from  
> the other.


Probably. But OSX uses NSApplication instead of UIApplication, or
NSOpenGLContext instead of EAGLContext and so on. So not sure much can
be shared. However, there's certainly room to re-factor a lot of the
current A5 code. E.g. the ALLEGRO_EXTRA_DISPLAY_SETTINGS has all ports
do some things right now which could go to a platform independent place
(noticed earlier when adding it to the iphone port).

> Did you copy the OS X code's way to handle main() or did you find an  
> alternative solution?

It re-implements just the same mechanism, ever since my commit just
before. I hadn't written a single line of objective C code before this
port, so something like

[global_delegate performSelectorOnMainThread: @selector(add_view) 
      withObject:nil
      waitUntilDone: YES];

never would have occured to me to do what it does - even if I had seen
it in the OSX port earlier. I kinda can't believe how Apple does this in
such a stupid way. Even Microsoft has no arbitrary things like certain
messages failing silently if not sent to the main thread o_O

-- 
Elias Pschernig <elias@xxxxxxxxxx>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/