delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/25/19:57:00

Message-Id: <199806252356.AAA12406@sable.ox.ac.uk>
Comments: Authenticated sender is <mert0407 AT sable DOT ox DOT ac DOT uk>
From: George Foot <george DOT foot AT merton DOT oxford DOT ac DOT uk>
To: "Ronald Patino G." <logan AT cue DOT satnet DOT net>
Date: Fri, 26 Jun 1998 00:51:53 +0000
MIME-Version: 1.0
Subject: Re: Ronald Patino's problem with Allegro's keyboard handler and
Reply-to: george DOT foot AT merton DOT oxford DOT ac DOT uk
CC: djgpp AT delorie DOT com

On 25 Jun 98 at 16:44, Ronald Patino G. wrote:

> Hi , can somebody tell me if I am using the Allegro keyboard
> routine properly, this is the code i wrote if somebody can point
> out my mystake i would apreciate it. 

Your code looks fine, as far as the keyboard routines are concerned.  
You ought to check the return value from set_gfx_mode, technically, 
in case it fails, so that you can tell the user gracefully.  Also 
note that 640x400 is a slightly odd resolution; it's probably better 
to use more standard resolutions in test programs.

>   After running this , when i return to RHIDE the keyboard doesn't
> work at all, any key i press either the cursor  goes left or right
> or pops up any of the dialog boxes of RHIDE   

Did you use Ctrl-F9 to run the program?  I don't use RHIDE, so 
haven't tested this theory, but perhaps when you run the program and 
Allegro takes over the keyboard, the BIOS doesn't notice that the 
Ctrl key is released, and so when the Allegro program exits and 
returns control to the BIOS handler it thinks that you're still 
holding down the Ctrl key.  Consequently, when you press other keys 
RHIDE thinks you're using keyboard shortcuts.

Try pressing and releasing the Ctrl keys after running the Allegro 
program.  Also try choosing the `Run' option from the menu, either 
with the mouse or keyboard.

-- 
george DOT foot AT merton DOT oxford DOT ac DOT uk

- Raw text -


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