glfwUpdateGamepadMappings

Adds the specified SDL_GameControllerDB gamepad mappings.

This function parses the specified ASCII encoded string and updates the internal list with any gamepad mappings it finds. This string may contain either a single gamepad mapping or many mappings separated by newlines. The parser supports the full format of the gamecontrollerdb.txt source file including empty lines and comments.

See @ref gamepad_mapping for a description of the format.

If there is already a gamepad mapping for a given GUID in the internal list, it will be replaced by the one passed to this function. If the library is terminated and re-initialized the internal list will revert to the built-in default.

extern (C) @nogc nothrow __gshared
int
glfwUpdateGamepadMappings
(
const(char)* string
)

Parameters

string const(char)*

The string containing the gamepad mappings.

Return Value

Type: int

GLFW_TRUE if successful, or GLFW_FALSE if an error occurred.

Errors: Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_INVALID_VALUE.

Thread Safety

This function must only be called from the main thread.

@sa @ref gamepad @sa @ref glfwJoystickIsGamepad @sa @ref glfwGetGamepadName

Meta

Since

Added in version 3.3.

Ingroup: input