From abd8ea09de4cc4cd5face802c05330975a1feb69 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 28 Aug 2024 10:34:34 -0700
Subject: [PATCH] Fixed warning C6001: Using uninitialized memory 'devices'.
---
src/video/windows/SDL_windowsrawinput.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/video/windows/SDL_windowsrawinput.c b/src/video/windows/SDL_windowsrawinput.c
index 77c226f12fd5d..9a003af30ea87 100644
--- a/src/video/windows/SDL_windowsrawinput.c
+++ b/src/video/windows/SDL_windowsrawinput.c
@@ -63,6 +63,8 @@ static DWORD WINAPI WIN_RawInputThread(LPVOID param)
return 0;
}
+ SDL_zeroa(devices);
+
if (data->flags & ENABLE_RAW_MOUSE_INPUT) {
devices[count].usUsagePage = USB_USAGEPAGE_GENERIC_DESKTOP;
devices[count].usUsage = USB_USAGE_GENERIC_MOUSE;