mirror of
https://github.com/glfw/glfw.git
synced 2026-09-17 22:32:50 +00:00
Add support for SDL_GameControllerDB
This adds support for importing and applying mappings from the SDL_GameControllerDB database. Related to #900.
This commit is contained in:
+6
-1
@@ -26,6 +26,7 @@
|
||||
//========================================================================
|
||||
|
||||
#include "internal.h"
|
||||
#include "mappings.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@@ -111,6 +112,10 @@ static void terminate(void)
|
||||
_glfw.monitors = NULL;
|
||||
_glfw.monitorCount = 0;
|
||||
|
||||
free(_glfw.mappings);
|
||||
_glfw.mappings = NULL;
|
||||
_glfw.mappingCount = 0;
|
||||
|
||||
_glfwTerminateVulkan();
|
||||
_glfwPlatformTerminate();
|
||||
|
||||
@@ -209,8 +214,8 @@ GLFWAPI int glfwInit(void)
|
||||
_glfw.initialized = GLFW_TRUE;
|
||||
_glfw.timer.offset = _glfwPlatformGetTimerValue();
|
||||
|
||||
// Not all window hints have zero as their default value
|
||||
glfwDefaultWindowHints();
|
||||
glfwUpdateGamepadMappings(_glfwDefaultMappings);
|
||||
|
||||
return GLFW_TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user