Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > CGGetLastMouseDelta

CGGetLastMouseDelta
Thread Tools
Fresh-Faced Recruit
Join Date: May 2002
Status: Offline
Reply With Quote
May 4, 2002, 08:29 PM
 
I'm writing a full screen OpenGL app and am having problems with cursor control.

I've hidden the Mac cursor and I'm using an Event Loop Timer to poll mouse deltas to update my own cursor.

The reason I do this is that I've found updating the screen on mouse moves results in jerky animation.

I don't remember the precise function call, but in OS 8, when you queried the system for the mouse deltas, the variables would be reset to zero, so that if you called it again, you wouldn't get stale values.

CGGetLastMouseDelta doesn't seem to do that, so even if I don't move the mouse, successive calls to this function return the same values.

Is there any way to reset those values?

I'm developing on X.1.4.

Thanks.
     
Grizzled Veteran
Join Date: Apr 2001
Status: Offline
Reply With Quote
May 4, 2002, 11:07 PM
 
How about:

if ( newValue == oldValue )
//ignore newValue
else
//use new value

Wade
     
tigakub  (op)
Fresh-Faced Recruit
Join Date: May 2002
Status: Offline
Reply With Quote
May 4, 2002, 11:25 PM
 
::slap:: (the sound of me slapping my forehead)

thanks: caffine can jack you up but it does nothing for your thought processes

but still ... the unlikely possibility that subsequent values could actually be the same makes me a little uncomfortable ... seems like there SHOULD be a way to reset those values ... the OS does it, so why can't I?
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:54 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2