Mail Archives: djgpp/1999/05/10/13:05:38
Okay, here's the problem:
For some reason this example program (ex1 from examples directory for allegro)
makes my computer freeze:
#include <stdlib.h>
#include <stdio.h>
#include "allegro.h"
int main()
{
/* you should always do this at the start of Allegro programs */
allegro_init();
/* set up the keyboard handler */
install_keyboard();
set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0);
/* set the color pallete */
set_pallete(desktop_pallete);
/* write some text to the screen */
textout_centre(screen, font, "Hello, world!", SCREEN_W/2, SCREEN_H/2, 255);
/* wait for a keypress */
readkey();
return 0;
}
In the original code the set graphics line was this:
set_gfx_mode(GFX_VGA, 320, 200, 0, 0);
when i use that it runs fine.
I don't understand how this would be a problem because I have programs that
work fine using VGA_AUTODETECT, 640, 480
It seems as though the DJGPP input routines for the mouse and keyboard are the
cause. I'm not sure if its a problem with my drivers or what. Anyways, when it
freezes I have to push reset, then when my pc wants me to run scandisk I can't
because it doesn't re-initialize the keyboard. All of the other examples work
fine unless the resolution is higher than 320x200. Any help is greatly
appreciated, thanks.
Beholder, who...
Has a neat tile map editor but uses getch() to do all of the input = not fun.
- Raw text -