[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Ok,
here they are:
==== modified README.TXT ===
I dunno if it's a bug. I think it is. (Windows)
BUG-HOWTO
=========
Step 1.
In Windows, compile a.c:
C:\>gcc -oa.exe a.c -lalleg -mwindows <-- notice the flags
==========================================================
= After this... use your mouse... not the keyboard!!! =
==========================================================
Step 2.
Open an explorer window.
Double Click on the a.exe. (run it)
=> A's Window appears.
Step 3.
Now click on the A's Window on the taskbar.
Ta-Da! A Closes.
Congratulations.. you just found the bug :)
P.S.: It is a problem with our application only...
Hence, I think there may be a problem in the implementation
of:
int keypressed();
Returns TRUE if there are keypresses waiting in the input buffer.
This is equivalent to the libc kbhit() function.
because... We never pressed any. :P
==== README.TXT ===
==== a.c ====
//A Simple Program.
#include "allegro.h"
void main()
{
allegro_init();
if(set_gfx_mode(GFX_AUTODETECT_WINDOWED,320,200,0,0)>=0)
if(install_keyboard()>=0)
{
clear_to_color(screen,makecol(0,0,255));
textout_centre_ex(screen,font,"I exist. Therefore I
am.",160,96,makecol(255,255,0),-1);
while(!keypressed()) //This is what makes it important.
{
}
}
allegro_exit();
}
END_OF_MAIN();
==== a.c ====
That's it.
gcc --version:
GCC.EXE (GCC) 3.2.3 (mingw special 20030504-1)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
cl:
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
^^ came with VS6 SP6
That's it.
I'll try to test on a different Windows version. It'll take time but..
because I only have Win98 installed currently. I'll try to find out
more helpful sources.
--
V Karthik Kumar