mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-11 18:41:14 +00:00
Remove SDL3 workaround for missing mouse add events (#711)
This commit is contained in:
parent
ec3c770c61
commit
7eb1692290
@ -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 {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user