cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/14/19:10:04

From: "Chris A. Triebel" <cat AT sun4 DOT iol DOT unh DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Need Shawn's (or anybody's) advice on making joystick buffer...
Date: Mon, 12 May 1997 14:52:40 -0400
Organization: University of New Hampshire - Durham, NH
Lines: 31
Message-ID: <Pine.SUN.3.91.970512145030.17680B-100000@sun4.iol.unh.edu>
References: <Pine DOT 3 DOT 89 DOT 9705091454 DOT B31537-0100000 AT alpha DOT hcst DOT com> <5l2ano$3cv2 AT elmo DOT cadvision DOT com>
NNTP-Posting-Host: sun4.iol.unh.edu
Mime-Version: 1.0
In-Reply-To: <5l2ano$3cv2@elmo.cadvision.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On 10 May 1997, Calvin French wrote:

> Date: 10 MAY 1997 17:19:52 GMT 
> From: Calvin French <frenchc AT cadvision DOT com>
> Newgroups: comp.os.msdos.djgpp
> Subject: Re: Need Shawn's (or anybody's) advice on making joystick buffer... 
> 
> What can I say? Holy moly! :-) And I couldn't get past the fourth beer 
> at the Millenial Fair in Chrono Trigger. I'll try and poll about 60 
> times per second, then... I just hope I don't get into reentrancy at 
> that rate.

It's possible that you could solve this problem by using a flag which 
when set does not allow you to re-enter the function.  Say something like 
this ...

static int flag=0;
void stick(void)
{
	if(flag)
		return;
	else
	{
		flag=1;
		do_stuff_here
		flag=0;
		return;
	}
}

cat

- Raw text -


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