SDL: Enable HIDAPI PS3 support by default on macOS

From 645b0f6abf7c6f034f13d44d5e10ca739bf009b2 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 24 Aug 2022 01:30:29 -0700
Subject: [PATCH] Enable HIDAPI PS3 support by default on macOS

---
 src/joystick/hidapi/SDL_hidapi_ps3.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/joystick/hidapi/SDL_hidapi_ps3.c b/src/joystick/hidapi/SDL_hidapi_ps3.c
index 867a79721c7..ba20e28edd8 100644
--- a/src/joystick/hidapi/SDL_hidapi_ps3.c
+++ b/src/joystick/hidapi/SDL_hidapi_ps3.c
@@ -79,12 +79,15 @@ HIDAPI_DriverPS3_UnregisterHints(SDL_HintCallback callback, void *userdata)
 static SDL_bool
 HIDAPI_DriverPS3_IsEnabled(void)
 {
-#if 1 /* This is not enabled by default, it needs much more testing */
-    return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_PS3, SDL_FALSE);
-#else
+#ifdef __MACOSX__
     return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_PS3,
                SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI,
                    SDL_HIDAPI_DEFAULT));
+#else
+    /* Linux already has good PS3 drivers and controller initialization fails on Windows,
+     * so don't bother using this driver on other platforms.
+     */
+    return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_PS3, SDL_FALSE);
 #endif
 }