Remove SDL3 workaround for missing mouse add events (#711)

This commit is contained in:
Christian Semmler 2025-09-13 09:14:42 -07:00 committed by GitHub
parent ec3c770c61
commit 7eb1692290
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -345,23 +345,6 @@ SDL_AppResult SDL_AppInit(void** appstate, int argc, char** argv)
// Get reference to window // Get reference to window
*appstate = g_isle->GetWindowHandle(); *appstate = g_isle->GetWindowHandle();
// Currently, SDL doesn't send SDL_EVENT_MOUSE_ADDED at startup (unlike for gamepads)
// This will probably be fixed in the future: https://github.com/libsdl-org/SDL/issues/12815
{
int count;
SDL_MouseID* mice = SDL_GetMice(&count);
if (mice) {
for (int i = 0; i < count; i++) {
if (InputManager()) {
InputManager()->AddMouse(mice[i]);
}
}
SDL_free(mice);
}
}
#ifdef __EMSCRIPTEN__ #ifdef __EMSCRIPTEN__
SDL_AddEventWatch( SDL_AddEventWatch(
[](void* userdata, SDL_Event* event) -> bool { [](void* userdata, SDL_Event* event) -> bool {