engine: platform: sdl: exclude fake game controller found on Android emulator
This commit is contained in:
parent
a060d7aefd
commit
8a0c2577ed
1 changed files with 12 additions and 0 deletions
|
@ -171,6 +171,18 @@ static void SDLash_GameControllerAdded( int device_index )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// this "game controller" only exists on Android within emulator and tries to map
|
||||||
|
// keyboard events into game controller events, which as you can expect, doesn't
|
||||||
|
// work and I don't understand the intention here. When debugging Xash in Android
|
||||||
|
// Studio emulator, just enable hardware input passthrough.
|
||||||
|
#if XASH_ANDROID
|
||||||
|
if( !Q_strcmp( SDL_GameControllerName( gc ), "qwerty2" ))
|
||||||
|
{
|
||||||
|
SDL_GameControllerClose( gc );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif // XASH_ANDROID
|
||||||
|
|
||||||
list = Mem_Realloc( host.mempool, g_gamepads, sizeof( *list ) * ( g_num_gamepads + 1 ));
|
list = Mem_Realloc( host.mempool, g_gamepads, sizeof( *list ) * ( g_num_gamepads + 1 ));
|
||||||
list[g_num_gamepads++] = gc;
|
list[g_num_gamepads++] = gc;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue