Added gamepad functions as generic for all platforms

This commit is contained in:
Ray 2023-10-11 11:14:03 +02:00
parent ddca525132
commit 6ebfec99c5
6 changed files with 8 additions and 70 deletions

View File

@ -2023,8 +2023,6 @@ void SetExitKey(int key)
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// NOTE: Functions with a platform-specific implementation on rcore_<platform>.c // 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) //int SetGamepadMappings(const char *mappings)
// Check if a gamepad is available // Check if a gamepad is available
@ -2038,10 +2036,10 @@ bool IsGamepadAvailable(int gamepad)
} }
// Get gamepad internal name id // Get gamepad internal name id
//const char *GetGamepadName(int gamepad) const char *GetGamepadName(int gamepad)
//{ {
// return CORE.Input.Gamepad.ready[gamepad]; return CORE.Input.Gamepad.name[gamepad];
//} }
// Check if a gamepad button has been pressed once // Check if a gamepad button has been pressed once
bool IsGamepadButtonPressed(int gamepad, int button) bool IsGamepadButtonPressed(int gamepad, int button)
@ -2094,10 +2092,10 @@ int GetGamepadButtonPressed(void)
} }
// Get gamepad axis count // Get gamepad axis count
//int GetGamepadAxisCount(int gamepad) int GetGamepadAxisCount(int gamepad)
//{ {
// return CORE.Input.Gamepad.axisCount; return CORE.Input.Gamepad.axisCount;
//} }
// Get axis movement vector for a gamepad // Get axis movement vector for a gamepad
float GetGamepadAxisMovement(int gamepad, int axis) float GetGamepadAxisMovement(int gamepad, int axis)

View File

@ -635,18 +635,6 @@ void OpenURL(const char *url)
// Module Functions Definition: Inputs // 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 // Set internal gamepad mappings
int SetGamepadMappings(const char *mappings) int SetGamepadMappings(const char *mappings)
{ {

View File

@ -1222,18 +1222,6 @@ void OpenURL(const char *url)
// Module Functions Definition: Inputs // 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 // Set internal gamepad mappings
int SetGamepadMappings(const char *mappings) int SetGamepadMappings(const char *mappings)
{ {

View File

@ -739,18 +739,6 @@ void OpenURL(const char *url)
// Module Functions Definition: Inputs // 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 // Set internal gamepad mappings
int SetGamepadMappings(const char *mappings) int SetGamepadMappings(const char *mappings)
{ {

View File

@ -563,18 +563,6 @@ void OpenURL(const char *url)
// Module Functions Definition: Inputs // 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 // Set internal gamepad mappings
int SetGamepadMappings(const char *mappings) int SetGamepadMappings(const char *mappings)
{ {

View File

@ -697,18 +697,6 @@ void OpenURL(const char *url)
// Module Functions Definition: Inputs // 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 // Set internal gamepad mappings
int SetGamepadMappings(const char *mappings) int SetGamepadMappings(const char *mappings)
{ {