log controller open errors
parent
e9aacb44da
commit
86322e9373
|
@ -87,8 +87,17 @@ namespace MoonWorks.Input
|
||||||
{
|
{
|
||||||
if (!GamepadExists(slot))
|
if (!GamepadExists(slot))
|
||||||
{
|
{
|
||||||
gamepads[slot].Handle = SDL.SDL_GameControllerOpen(index);
|
var openResult = SDL.SDL_GameControllerOpen(index);
|
||||||
System.Console.WriteLine($"Gamepad added to slot {slot}!");
|
if (openResult == 0)
|
||||||
|
{
|
||||||
|
System.Console.WriteLine($"Error opening gamepad!");
|
||||||
|
System.Console.WriteLine(SDL.SDL_GetError());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gamepads[slot].Handle = SDL.SDL_GameControllerOpen(index);
|
||||||
|
System.Console.WriteLine($"Gamepad added to slot {slot}!");
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue