Re: [AD] No need for END_OF_MAIN (Windows) |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] No need for END_OF_MAIN (Windows)
- From: Oscar Giner <oginer@xxxxxxxxxx>
- Date: Mon, 16 May 2005 04:34:16 +0200
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Blu48r8kdXnvbboVsFWg/vt/3+5RwKvCyf2voGqyobLgeTyjfFv/6BMusvkB351NAjfXIcOAoJkHrsrdYXQAS29RJKif/XN627jBAq72xaCoOiznfizGSxhw6geORBC4NFp5Pnd6TcnEEm7xbgrqYHiCIlsAlIEJW2FR4E1B4HA=
> 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.