mirror of
https://github.com/ocornut/imgui.git
synced 2025-12-20 05:15:36 +00:00
Win32: Revert 1.92.4 change of comparing dwPacketNumber. (#8556)
This commit is contained in:
@@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
// CHANGELOG
|
// CHANGELOG
|
||||||
// (minor and older changes stripped away, please see git history for details)
|
// (minor and older changes stripped away, please see git history for details)
|
||||||
|
// 2025-10-19: Inputs: Revert previous change to allow for io.ClearInputKeys() on focus-out not losing gamepad state.
|
||||||
// 2025-09-23: Inputs: Minor optimization not submitting gamepad input if packet number has not changed.
|
// 2025-09-23: Inputs: Minor optimization not submitting gamepad input if packet number has not changed.
|
||||||
// 2025-09-18: Call platform_io.ClearPlatformHandlers() on shutdown.
|
// 2025-09-18: Call platform_io.ClearPlatformHandlers() on shutdown.
|
||||||
// 2025-04-30: Inputs: Fixed an issue where externally losing mouse capture (due to e.g. focus loss) would fail to claim it again the next subsequent click. (#8594)
|
// 2025-04-30: Inputs: Fixed an issue where externally losing mouse capture (due to e.g. focus loss) would fail to claim it again the next subsequent click. (#8594)
|
||||||
@@ -125,7 +126,6 @@ struct ImGui_ImplWin32_Data
|
|||||||
HMODULE XInputDLL;
|
HMODULE XInputDLL;
|
||||||
PFN_XInputGetCapabilities XInputGetCapabilities;
|
PFN_XInputGetCapabilities XInputGetCapabilities;
|
||||||
PFN_XInputGetState XInputGetState;
|
PFN_XInputGetState XInputGetState;
|
||||||
DWORD XInputPacketNumber;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ImGui_ImplWin32_Data() { memset((void*)this, 0, sizeof(*this)); }
|
ImGui_ImplWin32_Data() { memset((void*)this, 0, sizeof(*this)); }
|
||||||
@@ -357,9 +357,6 @@ static void ImGui_ImplWin32_UpdateGamepads(ImGuiIO& io)
|
|||||||
if (!bd->HasGamepad || bd->XInputGetState == nullptr || bd->XInputGetState(0, &xinput_state) != ERROR_SUCCESS)
|
if (!bd->HasGamepad || bd->XInputGetState == nullptr || bd->XInputGetState(0, &xinput_state) != ERROR_SUCCESS)
|
||||||
return;
|
return;
|
||||||
io.BackendFlags |= ImGuiBackendFlags_HasGamepad;
|
io.BackendFlags |= ImGuiBackendFlags_HasGamepad;
|
||||||
if (bd->XInputPacketNumber != 0 && bd->XInputPacketNumber == xinput_state.dwPacketNumber)
|
|
||||||
return;
|
|
||||||
bd->XInputPacketNumber = xinput_state.dwPacketNumber;
|
|
||||||
|
|
||||||
#define IM_SATURATE(V) (V < 0.0f ? 0.0f : V > 1.0f ? 1.0f : V)
|
#define IM_SATURATE(V) (V < 0.0f ? 0.0f : V > 1.0f ? 1.0f : V)
|
||||||
#define MAP_BUTTON(KEY_NO, BUTTON_ENUM) { io.AddKeyEvent(KEY_NO, (gamepad.wButtons & BUTTON_ENUM) != 0); }
|
#define MAP_BUTTON(KEY_NO, BUTTON_ENUM) { io.AddKeyEvent(KEY_NO, (gamepad.wButtons & BUTTON_ENUM) != 0); }
|
||||||
|
|||||||
@@ -76,6 +76,9 @@ Other Changes:
|
|||||||
When using Emscripten 4.0.10+, backend now defaults to IMGUI_IMPL_WEBGPU_BACKEND_DAWN
|
When using Emscripten 4.0.10+, backend now defaults to IMGUI_IMPL_WEBGPU_BACKEND_DAWN
|
||||||
instead of IMGUI_IMPL_WEBGPU_BACKEND_WGPU, if neither are specified.
|
instead of IMGUI_IMPL_WEBGPU_BACKEND_WGPU, if neither are specified.
|
||||||
(note: examples application were not updated yet)
|
(note: examples application were not updated yet)
|
||||||
|
- Win32: Revert 1.92.4 change of comparing dwPacketNumber, which prevents
|
||||||
|
refreshing accurate gamepad info after focus-out + io.ClearInputsKey(). (#8556)
|
||||||
|
|
||||||
- Examples:
|
- Examples:
|
||||||
- GLFW+WebGPU: removed unnecessary ImGui_ImplWGPU_InvalidateDeviceObjects() call
|
- GLFW+WebGPU: removed unnecessary ImGui_ImplWGPU_InvalidateDeviceObjects() call
|
||||||
during surface resize. (#8381)
|
during surface resize. (#8381)
|
||||||
|
|||||||
Reference in New Issue
Block a user