Re: [AD] No need for END_OF_MAIN (Windows)

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


> I say we remove ALLEGRO_NO_MAGIC_MAIN and add this to winalleg.h
> 
> #define WinMain _mangled_main
> 
> This way if user use normal main() everything works as before and is
> he use WinMain it would be called trought allegro's WinMain which
> should work as it was called directly.
> 

But then the user must include winalleg.h in the same source he
defines WinMain, and that's not always possible (for example, if I
want to use MFC and allegro, since MFC defines WinMain, not me).

> Works like a charm here. Only problem is that it will crash when user
> WinMain return if it's defined with WINAPI or APIENTRY (not really a
> problem, could be noted in docs).

Again the same problem. If I want to use MFC it won't work, since it
probably defines WinMain with WINAPI and I can't change that.




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