Make joystick platform code init on demand

This makes joystick support initialize the first time a joystick
function is called, including those gamepad functions that are layered
on top of joystick functions.

Related to #1284.
Related to #1646.
This commit is contained in:
Camilla Löwy
2020-07-12 18:31:29 +02:00
parent f760b124ca
commit 782e6b6cef
19 changed files with 101 additions and 49 deletions
-2
View File
@@ -551,7 +551,6 @@ int _glfwPlatformInit(void)
return GLFW_FALSE;
_glfwInitTimerNS();
_glfwInitJoysticksNS();
_glfwPollMonitorsNS();
@@ -605,7 +604,6 @@ void _glfwPlatformTerminate(void)
free(_glfw.ns.clipboardString);
_glfwTerminateNSGL();
_glfwTerminateJoysticksNS();
} // autoreleasepool
}