From: Christer S. <chr...@md...> - 2005-08-23 19:45:29
|
On Tuesday 23 August 2005 17.53, Grzegorz Adam Hankiewicz wrote: >On 2005-08-23, Christer Sandberg <chr...@md...> wrote: >> The program below does not wait for a keypress in the second of >> the readkey() calls. >> [...] >> allegro_init(); >> install_keyboard(); >> if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 800, 600, 0, 0) != 0) { > >On some systems you cannot install the keyboard before getting a >successful graphic mode. This is documented in both the 4.0.x and Actually not (I studied it carefully when this problem first occured), it says: "Note that on some platforms the keyboard won't work unless you have set a graphic mode, even if this function returns zero before calling set_gfx_mode." Also in examples/exkeys the keyboard is installed before initializing the graphics. The keyboard worked fine for me in all other cases, but only after the call to set_gfx_mode, which confirms what is written in the docs. Now I'm at home and tested on another computer, Mandrake 10.0 gcc 3.3.2. Allegro 4.0.3 and 4.2.0 I have tried a lot of combinations of modes, but it works fine here! I'll test 4.2.0 at work tomorrow, then I come back. Maybe this problem can related to the other mode switch problem that I reported? But in this case the initialization of the graphics succeeds. Maybe it's just my computer at work that is bad. I will ask the support departement for a new one, it's almost 2 years anyway. -- Christer |