mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 12:15:37 +00:00
[Input] Added SetVibration() API skeleton
This commit is contained in:
parent
ec43b9ff85
commit
8649e4a044
|
@ -65,5 +65,22 @@ namespace OpenTK.Input
|
||||||
{
|
{
|
||||||
return driver.GetState(index);
|
return driver.GetState(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the vibration intensity for the left and right motors of this <see cref="GamePad"/>
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>
|
||||||
|
/// <c>true</c>, if vibration was set, <c>false</c> otherwise. This method can return false
|
||||||
|
/// if the <c>GamePad</c> hardware does not support vibration or if it cannot respond to
|
||||||
|
/// the command for any reason. Do not loop until this becomes true, but rather ignore
|
||||||
|
/// a return value of false.
|
||||||
|
/// </returns>
|
||||||
|
/// <param name="index">A zero-based device index for the <c>GamePad</c> device to affect</param>
|
||||||
|
/// <param name="left">The vibration intensity for the left motor, between 0.0 and 1.0.</param>
|
||||||
|
/// <param name="right">The vibration intensity for the right motor, between 0.0 and 1.0.</param>
|
||||||
|
public static bool SetVibration(int index, float left, float right)
|
||||||
|
{
|
||||||
|
return driver.SetVibration(index, left, right);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,5 +19,7 @@ namespace OpenTK.Input
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <para>If no device exists at the specified index, the return value is <see cref="System.String.Empty"/>.</para></remarks>
|
/// <para>If no device exists at the specified index, the return value is <see cref="System.String.Empty"/>.</para></remarks>
|
||||||
string GetName(int index);
|
string GetName(int index);
|
||||||
|
|
||||||
|
bool SetVibration(int index, float left, float right);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,6 +168,11 @@ namespace OpenTK.Platform
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool SetVibration(int index, float left, float right)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
#region Private Members
|
#region Private Members
|
||||||
|
|
||||||
GamePadConfiguration GetConfiguration(Guid guid)
|
GamePadConfiguration GetConfiguration(Guid guid)
|
||||||
|
|
|
@ -567,6 +567,11 @@ namespace OpenTK.Platform.SDL2
|
||||||
{
|
{
|
||||||
return gamepad_driver.GetName(index);
|
return gamepad_driver.GetName(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool SetVibration(int index, float left, float right)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -87,7 +87,12 @@ namespace OpenTK.Platform.Windows
|
||||||
|
|
||||||
public string GetName(int index)
|
public string GetName(int index)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
return String.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool SetVibration(int index, float left, float right)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -263,17 +263,22 @@ namespace OpenTK.Platform.X11
|
||||||
|
|
||||||
public GamePadCapabilities GetCapabilities(int index)
|
public GamePadCapabilities GetCapabilities(int index)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
return new GamePadCapabilities();
|
||||||
}
|
}
|
||||||
|
|
||||||
public GamePadState GetState(int index)
|
public GamePadState GetState(int index)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
return new GamePadState();
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetName(int index)
|
public string GetName(int index)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
return String.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool SetVibration(int index, float left, float right)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -282,17 +287,17 @@ namespace OpenTK.Platform.X11
|
||||||
|
|
||||||
JoystickState IJoystickDriver2.GetState(int index)
|
JoystickState IJoystickDriver2.GetState(int index)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
return new JoystickState();
|
||||||
}
|
}
|
||||||
|
|
||||||
JoystickCapabilities IJoystickDriver2.GetCapabilities(int index)
|
JoystickCapabilities IJoystickDriver2.GetCapabilities(int index)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
return new JoystickCapabilities();
|
||||||
}
|
}
|
||||||
|
|
||||||
Guid IJoystickDriver2.GetGuid(int index)
|
Guid IJoystickDriver2.GetGuid(int index)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
return new Guid();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Reference in a new issue