Re: [AD] Using system mouse cursor |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Evert Glebbeek wrote:
I did, however, completely rebuild AllegroGL (since that's what my
program uses) and it cleared up some of the problems, but the mouse
still seems to be eratic when reentering the game window. It'll stutter
around, sometimes fixing itself after a few moments and other times not.
Are you using the mickeys at all? Or just with reading the mouse position
and displaying it on the screen?
I've used the mickeys function directly and I've tried just
repositioning the mouse and getting the difference myself. They both
have stuttering problems, though the mickeys function moreso.
I think this makes sense for windowed mode at least. I'd like the mouse to
have two modes: a mickey mode and a normal mode. Mickey mode disables the
hardware cursor and re-enables the mouse warping.
I'm not sure if we can do this. Unless you want to create a function
that explicitly locks the cursor to the middle of the program window and
still allows movement reporting. If that's the case, then we'd still
remove the warping hack as it exists now and let the get_mouse_mickeys
function have undefined behavior at the window's edge.
PS. BTW, what would happen if a program tracked the mouse via
get_mouse_mickeys and drew it manually? Like if they want to implement
some kind of mouse smoothing feature (like many FPSs do nowadays).
AFAICS, the mouse would enter "mickey mode" and then get stuck in one
spot. The warp hack assumes the user won't be calling get_mouse_mickeys
if they're drawing it manually.
The mouse_x and mouse_y variables (positioning Allegro's mouse) continue to
be updated normally. I'm not sure if that's what you meant?
I wasn't fully aware it did that, but it would still behave differently.
Under such circumstances, the mouse would not be able to leave the
program window unless there was a fast mouse jerk so that it moves out
of the window before Allegro catches it again, because "mickey mode" has
the OS cursor locked in place.
- Kitty Cat