Raw mouse input and alternatives. #4230
-
|
To handle full-screen scenario's I've switched to using raw mouse input via Win32, as I need hardware mouse deltas. But it seems to be getting overloaded by high mouse input polling rates. I think mice come installed at 1000Hz by default these days, so raw-input isn't fit for purpose. I've read that GetRawInputBuffer side-steps the windows message loop, removes the messages and can handle high polling rates. Is that true? And are there any other methods that are recommended? For example, what's the situation with XInput, DirectInput, or other mechanisms for getting mouse deltas? If GetRawInputBuffer is a solution, is there a WindowsAppSDK equivalent? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
|
GetRawInputBuffer removes the message from the Message Queue structure (MLIST mlInput) in Kernel |
Beta Was this translation helpful? Give feedback.
-
I did a quick test (just XGameRuntimeInitialize + GameInputCreate then IGameInput.GetCurrentTimestamp to test a simple method) and it only works in x64, the "GameInput Service" must be installed too and I had to add a MicrosoftGame.Config file (otherwise I get E_GAME_MISSING_GAME_CONFIG error) |
Beta Was this translation helpful? Give feedback.
-
|
GameInput appears unsuitable for use in the Windows App SDK due to the license: microsoft/GDK#72 If it were part of the Windows App SDK, it would be a violation of the license terms to use the Windows App SDK in many apps that currently do, unless the GDK were relicensed by Microsoft. |
Beta Was this translation helpful? Give feedback.



Hmm, well, I'll just edit this completely to revise the post.
According to the March 2024 release:
In otherwords, the GameInput is distributed as part of the CUs for all supported versions of Windows. This means for supported versions of Windows, you should use the 26100 version of the SDK, then the only license that you need to worry about is the Windows SDK license.
It is only really some of the older versions that could be a problem here. This is because of the presence or lack thereof, of the GameInput libraries. If they got a CU after May 2020, then …