Example #1
0
 /// <summary>
 /// Retrieves a gamepad input event.
 /// </summary>
 public static unsafe int XInputGetKeystroke(int dwUserIndex, int dwReserved, out Keystroke keystrokeRef)
 {
     keystrokeRef = new Keystroke();
     int keystroke;
     fixed (Keystroke* keystrokePtr = &keystrokeRef)
         keystroke = XInput.XInputGetKeystroke_(dwUserIndex, dwReserved, (void*)keystrokePtr);
     return keystroke;
 }
Example #2
0
 /// <summary>
 /// Gets the keystroke.
 /// 
 /// </summary>
 /// <param name="deviceQueryType">The flag.</param><param name="keystroke">The keystroke.</param>
 /// <returns/>
 public Result GetKeystroke(DeviceQueryType deviceQueryType, out Keystroke keystroke)
 {
     #if WINDOWS
     Result result = ErrorCodeHelper.ToResult(XInput.XInputGetKeystroke((int)this.userIndex, (int)deviceQueryType, out keystroke));
     result.CheckError();
     return result;
     #else
     keystroke = new Keystroke();
     return Result.Abord;
     #endif
 }