![]() |
|
Allegro 4.2.2 on OSX |
montdidier
Member #10,238
September 2008
|
I didn't have much luck last time I posted a question related to this, so I've tried to more clearly explain my question. I'm currently porting a title to OSX. It's been a relatively smooth process and the game is running pretty The problem has been mostly related to the interaction between two osx_mouse_handler in qzmouse.m osx_mouse_position in qzmouse.m link below http://alleg.svn.sourceforge.net/viewvc/alleg/allegro/tags/v4-2-2/src/macosx/qzmouse.m?view=markup So osx_mouse_position gets called every frame to stop the mouse These lines below in osx_mouse_position have made the process a little mymickey_x = mymickey_y = 0; osx_mouse_warped = TRUE; Also later in osx_mouse_handler there is if (osx_mouse_warped) { osx_mouse_warped = FALSE; return; }
before any of the mouse_b, mouse_x or mouse_y gets updated. So I've hacked my allegro included in the game to basically not reset However, I'm wondering why it was important in the first place to care I'm not an allegro expert by any means, it's the first time I have I guess my question boils down to, is it bad to call mouse_position every frame, and if so, why and why does it seem to work happily on windows? Anyway. I much appreciate any time you spend in answering my question, Thank you! Chris K. |
Don Freeman
Member #5,110
October 2004
![]() |
I'm sorry I do not have a MAC to know how to help you...hopefully me bumping this will spark some of the more seasoned "experts" here to help you. Sorry I couldn't help...:'( -- |
Evert
Member #794
November 2000
![]() |
Sorry, I did have a quick look at this the other day. Quote: I guess my question boils down to, is it bad to call mouse_position every frame, and if so, why and why does it seem to work happily on windows? It seems that OS X does not send mouse movement events after the mouse has left the window (or "tracking rectangle" I think it's called), so the only way to get infinite mouse mickeys is indeed to constantly warp the mouse to the centre of the window. This is also true of X11 (but not Windows, if I recall correctly), where Allegro will warp the mouse mutton for you once you start polling for mouse mickeys. I'm guessing it should (optionally) do that in OS X as well. It's quite possible that no one has looked at it or tried it before in OS X. There are a few drawbacks to this, however. First of all, it can be really annoying in windowed applications, although you can usually "jerk" the mouse out of the window. |
Peter Hull
Member #1,136
March 2001
|
This is a duplicate of this one. Pete
|
|