mirror of https://github.com/raysan5/raylib
Added gamepad functions as generic for all platforms
This commit is contained in:
parent
ddca525132
commit
6ebfec99c5
18
src/rcore.c
18
src/rcore.c
|
@ -2023,8 +2023,6 @@ void SetExitKey(int key)
|
|||
//----------------------------------------------------------------------------------
|
||||
|
||||
// NOTE: Functions with a platform-specific implementation on rcore_<platform>.c
|
||||
//int GetGamepadAxisCount(int gamepad) **
|
||||
//const char *GetGamepadName(int gamepad) **
|
||||
//int SetGamepadMappings(const char *mappings)
|
||||
|
||||
// Check if a gamepad is available
|
||||
|
@ -2038,10 +2036,10 @@ bool IsGamepadAvailable(int gamepad)
|
|||
}
|
||||
|
||||
// Get gamepad internal name id
|
||||
//const char *GetGamepadName(int gamepad)
|
||||
//{
|
||||
// return CORE.Input.Gamepad.ready[gamepad];
|
||||
//}
|
||||
const char *GetGamepadName(int gamepad)
|
||||
{
|
||||
return CORE.Input.Gamepad.name[gamepad];
|
||||
}
|
||||
|
||||
// Check if a gamepad button has been pressed once
|
||||
bool IsGamepadButtonPressed(int gamepad, int button)
|
||||
|
@ -2094,10 +2092,10 @@ int GetGamepadButtonPressed(void)
|
|||
}
|
||||
|
||||
// Get gamepad axis count
|
||||
//int GetGamepadAxisCount(int gamepad)
|
||||
//{
|
||||
// return CORE.Input.Gamepad.axisCount;
|
||||
//}
|
||||
int GetGamepadAxisCount(int gamepad)
|
||||
{
|
||||
return CORE.Input.Gamepad.axisCount;
|
||||
}
|
||||
|
||||
// Get axis movement vector for a gamepad
|
||||
float GetGamepadAxisMovement(int gamepad, int axis)
|
||||
|
|
|
@ -635,18 +635,6 @@ void OpenURL(const char *url)
|
|||
// Module Functions Definition: Inputs
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Get gamepad internal name id
|
||||
const char *GetGamepadName(int gamepad)
|
||||
{
|
||||
return CORE.Input.Gamepad.name[gamepad];
|
||||
}
|
||||
|
||||
// Get gamepad axis count
|
||||
int GetGamepadAxisCount(int gamepad)
|
||||
{
|
||||
return CORE.Input.Gamepad.axisCount;
|
||||
}
|
||||
|
||||
// Set internal gamepad mappings
|
||||
int SetGamepadMappings(const char *mappings)
|
||||
{
|
||||
|
|
|
@ -1222,18 +1222,6 @@ void OpenURL(const char *url)
|
|||
// Module Functions Definition: Inputs
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Get gamepad internal name id
|
||||
const char *GetGamepadName(int gamepad)
|
||||
{
|
||||
return CORE.Input.Gamepad.name[gamepad];
|
||||
}
|
||||
|
||||
// Get gamepad axis count
|
||||
int GetGamepadAxisCount(int gamepad)
|
||||
{
|
||||
return CORE.Input.Gamepad.axisCount;
|
||||
}
|
||||
|
||||
// Set internal gamepad mappings
|
||||
int SetGamepadMappings(const char *mappings)
|
||||
{
|
||||
|
|
|
@ -739,18 +739,6 @@ void OpenURL(const char *url)
|
|||
// Module Functions Definition: Inputs
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Get gamepad internal name id
|
||||
const char *GetGamepadName(int gamepad)
|
||||
{
|
||||
return CORE.Input.Gamepad.name[gamepad];
|
||||
}
|
||||
|
||||
// Get gamepad axis count
|
||||
int GetGamepadAxisCount(int gamepad)
|
||||
{
|
||||
return CORE.Input.Gamepad.axisCount;
|
||||
}
|
||||
|
||||
// Set internal gamepad mappings
|
||||
int SetGamepadMappings(const char *mappings)
|
||||
{
|
||||
|
|
|
@ -563,18 +563,6 @@ void OpenURL(const char *url)
|
|||
// Module Functions Definition: Inputs
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Get gamepad internal name id
|
||||
const char *GetGamepadName(int gamepad)
|
||||
{
|
||||
return CORE.Input.Gamepad.name[gamepad];
|
||||
}
|
||||
|
||||
// Get gamepad axis count
|
||||
int GetGamepadAxisCount(int gamepad)
|
||||
{
|
||||
return CORE.Input.Gamepad.axisCount;
|
||||
}
|
||||
|
||||
// Set internal gamepad mappings
|
||||
int SetGamepadMappings(const char *mappings)
|
||||
{
|
||||
|
|
|
@ -697,18 +697,6 @@ void OpenURL(const char *url)
|
|||
// Module Functions Definition: Inputs
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Get gamepad internal name id
|
||||
const char *GetGamepadName(int gamepad)
|
||||
{
|
||||
return CORE.Input.Gamepad.name[gamepad];
|
||||
}
|
||||
|
||||
// Get gamepad axis count
|
||||
int GetGamepadAxisCount(int gamepad)
|
||||
{
|
||||
return CORE.Input.Gamepad.axisCount;
|
||||
}
|
||||
|
||||
// Set internal gamepad mappings
|
||||
int SetGamepadMappings(const char *mappings)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue