no message
This commit is contained in:
parent
ce2974e5ea
commit
12ccba7427
42
src/main.c
42
src/main.c
|
@ -519,31 +519,31 @@ static void pollEvent()
|
|||
// case SDL_KEYDOWN:
|
||||
// if(processShortcuts(&event.key)) return NULL;
|
||||
// break;
|
||||
// case SDL_JOYDEVICEADDED:
|
||||
// {
|
||||
// s32 id = event.jdevice.which;
|
||||
case SDL_JOYDEVICEADDED:
|
||||
{
|
||||
s32 id = event.jdevice.which;
|
||||
|
||||
// if (id < TIC_GAMEPADS)
|
||||
// {
|
||||
// if(platform.joysticks[id])
|
||||
// SDL_JoystickClose(platform.joysticks[id]);
|
||||
if (id < TIC_GAMEPADS)
|
||||
{
|
||||
if(platform.joysticks[id])
|
||||
SDL_JoystickClose(platform.joysticks[id]);
|
||||
|
||||
// platform.joysticks[id] = SDL_JoystickOpen(id);
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
platform.joysticks[id] = SDL_JoystickOpen(id);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// case SDL_JOYDEVICEREMOVED:
|
||||
// {
|
||||
// s32 id = event.jdevice.which;
|
||||
case SDL_JOYDEVICEREMOVED:
|
||||
{
|
||||
s32 id = event.jdevice.which;
|
||||
|
||||
// if (id < TIC_GAMEPADS && platform.joysticks[id])
|
||||
// {
|
||||
// SDL_JoystickClose(platform.joysticks[id]);
|
||||
// platform.joysticks[id] = NULL;
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
if (id < TIC_GAMEPADS && platform.joysticks[id])
|
||||
{
|
||||
SDL_JoystickClose(platform.joysticks[id]);
|
||||
platform.joysticks[id] = NULL;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SDL_WINDOWEVENT:
|
||||
switch(event.window.event)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue