delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/06/14:34:02

Message-ID: <3874C811.A30525CA@softhome.net>
Date: Thu, 06 Jan 2000 18:51:29 +0200
From: Laurynas Biveinis <lauras AT softhome DOT net>
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: How to optimize this mouse function..
References: <210046ed DOT e1267171 AT usw-ex0101-007 DOT remarq DOT com>
Reply-To: djgpp AT delorie DOT com

hellbaron wrote:
> 
> I've been working on a big graphix project all week, everything is
> going ok, exept for this mouse function. The thing is, I would like to
> save some valuable time when executing this function by eliminating the
> delay(50), but I just cant seem to be able to substitute it with
> anything else, I tried with a simple if, but it just doesnt work..
> Please help me out!!, any feedback will be greatly apriciated, thanx in
> advance to anyone who replies to this message, and here is the function:

I've had once similar problem - the program catches mouse click, 
but on the next mouse query it gets the same click. AFAIK the reason
is that program executes faster then user releases mouse button.
So try to replace the delay() with do-nothing loop after mouse query like

while (!mouse_button_released());

Laurynas Biveinis

- Raw text -


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