CVS update (mouse motion)

The new CVS update queries the mouse position when you set the video mode,
and sends mouse focus and motion events appropriately.

In addition, I also implemented the mouse focus-loss code for Win32.
It’s a timer that runs once every 100ms and checks the mouse position.
Ugly, but it’s the only thing portable to Win95. The code contains
a WIN95_COMPATIBILITY define that, if commented, will improve performance,
but the library will no longer run on Win95 and WinNT 3.

Please test it! I haven’t tested the Win32 or BeOS code at all. :slight_smile:

1.1 prerelease coming soon…

See ya,
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

Sam Lantinga wrote …

The new CVS update queries the mouse position when you
set the video mode, and sends mouse focus and motion
events appropriately.

In addition, I also implemented the mouse focus-loss code
for Win32. It’s a timer that runs once every 100ms and checks
the mouse position. Ugly, but it’s the only thing portable to
Win95. The code contains a WIN95_COMPATIBILITY define
that, if commented, will improve performance, but the library
will no longer run on Win95 and WinNT 3.

Please test it! I haven’t tested the Win32 or BeOS code at all. :slight_smile:

It needed a couple tweaks but I got it to work. Something was getting out of
sync between the windows and sdl message queues. I changed it to work more
like the MSDN article using a static boolean in WinMessage to track when to
issue the TrackMouseEvent instead of using SDL_GetAppState.

I also used the _WIN32_WINNT macro instead of WIN95_COMPATIBILITY since it
ties in with the code in the “winuser.h” file. All you have to do is add
"_WIN32_WINNT=0x0400" to the preprocessor definitions in the project
settings.

Using the “real” TrackMouseEvent DRAMATICALLY improves performance and it
will still work on Win95 as long as you have the latest COMCTL32.DLL
installed.

  • Randi

Regimental Command
Generic Armored Combat System
http://www-users.cs.umn.edu/~relander/regcom/index.html

It needed a couple tweaks but I got it to work. Something was getting out of
sync between the windows and sdl message queues. I changed it to work more
like the MSDN article using a static boolean in WinMessage to track when to
issue the TrackMouseEvent instead of using SDL_GetAppState.

I also used the _WIN32_WINNT macro instead of WIN95_COMPATIBILITY since it
ties in with the code in the “winuser.h” file. All you have to do is add
"_WIN32_WINNT=0x0400" to the preprocessor definitions in the project
settings.

Using the “real” TrackMouseEvent DRAMATICALLY improves performance and it
will still work on Win95 as long as you have the latest COMCTL32.DLL
installed.

Can you send me the required changes?

Thanks!
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec