| ␉␉␉) == "1";␊ |
| ␉␉␉if (SDL2_KeyboardUtil.UseScancodes)␊ |
| ␉␉␉{␊ |
| ␉␉␉␉Log("Using scancodes instead of keycodes!");␊ |
| ␉␉␉␉FNAPlatform.Log("Using scancodes instead of keycodes!");␊ |
| ␉␉␉}␊ |
| ␊ |
| ␉␉␉// Active Key List␊ |
|
| ␉␉␉}␊ |
| ␉␉␉catch(DllNotFoundException e)␊ |
| ␉␉␉{␊ |
| ␉␉␉␉Log("OpenAL not found! Need FNA.dll.config?");␊ |
| ␉␉␉␉FNAPlatform.Log("OpenAL not found! Need FNA.dll.config?");␊ |
| ␉␉␉␉throw e;␊ |
| ␉␉␉}␊ |
| ␉␉␉catch(Exception)␊ |
|
| ␉␉␉␉{␊ |
| ␉␉␉␉␉if (SDL.SDL_GL_SetSwapInterval(-1) != -1)␊ |
| ␉␉␉␉␉{␊ |
| ␉␉␉␉␉␉Log("Using EXT_swap_control_tear VSync!");␊ |
| ␉␉␉␉␉␉FNAPlatform.Log("Using EXT_swap_control_tear VSync!");␊ |
| ␉␉␉␉␉}␊ |
| ␉␉␉␉␉else␊ |
| ␉␉␉␉␉{␊ |
| ␉␉␉␉␉␉Log("EXT_swap_control_tear unsupported. Fall back to standard VSync.");␊ |
| ␉␉␉␉␉␉FNAPlatform.Log("EXT_swap_control_tear unsupported. Fall back to standard VSync.");␊ |
| ␉␉␉␉␉␉SDL.SDL_ClearError();␊ |
| ␉␉␉␉␉␉SDL.SDL_GL_SetSwapInterval(1);␊ |
| ␉␉␉␉␉}␊ |
|
| ␉␉␉␉INTERNAL_haptics[which] = SDL.SDL_HapticOpenFromJoystick(thisJoystick);␊ |
| ␉␉␉␉if (INTERNAL_haptics[which] == IntPtr.Zero)␊ |
| ␉␉␉␉{␊ |
| ␉␉␉␉␉Log("HAPTIC OPEN ERROR: " + SDL.SDL_GetError());␊ |
| ␉␉␉␉␉FNAPlatform.Log("HAPTIC OPEN ERROR: " + SDL.SDL_GetError());␊ |
| ␉␉␉␉}␊ |
| ␉␉␉}␊ |
| ␉␉␉if (INTERNAL_haptics[which] != IntPtr.Zero)␊ |
|
| ␉␉␉}␊ |
| ␊ |
| ␉␉␉// Print controller information to stdout.␊ |
| ␉␉␉Log(␊ |
| ␉␉␉FNAPlatform.Log(␊ |
| ␉␉␉␉"Controller " + which.ToString() + ": " +␊ |
| ␉␉␉␉SDL.SDL_GameControllerName(INTERNAL_devices[which])␊ |
| ␉␉␉);␊ |
|
| ␉␉␉// A lot of errors can happen here, but honestly, they can be ignored...␊ |
| ␉␉␉SDL.SDL_ClearError();␊ |
| ␊ |
| ␉␉␉Log("Removed device, player: " + output.ToString());␊ |
| ␉␉␉FNAPlatform.Log("Removed device, player: " + output.ToString());␊ |
| ␉␉}␊ |
| ␊ |
| ␉␉// GetState can convert stick values to button values␊ |