www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/05/10/13:05:38

From: beholder1 AT aol DOT com (Beholder1)
Newsgroups: comp.os.msdos.djgpp
Subject: I/O routine problems
Lines: 52
NNTP-Posting-Host: ladder06.news.aol.com
X-Admin: news AT aol DOT com
Date: 10 May 1999 04:27:17 GMT
Organization: AOL http://www.aol.com
Message-ID: <19990510002717.14593.00001454@ng-fz1.aol.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019