[ Thread Index |
| More lists.liballeg.org/allegro-developers Archives
On 24 Mar 2010, at 22:49 , Peter Wang wrote:
>> Looks correct to me (unlike the above code).
Actually, on second thought, (onoff && (display->flags & ALLEGRO_FULLSCREEN_WINDOW != 0)) is probably what was intended there.
> You can write
> (onoff == !!(display->flags & ALLEGRO_FULLSCREEN_WINDOW))
I think I prefer what I just came up with. :P
> To avoid confusion, we should have
> sizeof(C++ bool) == sizeof(C99 bool) == sizeof(Allegro bool)
This is probably not an issue on MinGW, since we use C99 bool and it'd be silly for the compiler to have sizeof(C++ bool) != sizeof(C99 bool), so the question is: is MinGW's C++ bool the same size as MSVC's C++ bool? I guess it would have to be, or DLLs that use bool wouldn't be compatible, which I don't think is the case.
In that case, could we somehow use MSVC's C++ bool type in Allegro (I'm guessing not without compiling Allegro as C++ code)?