From 55a5337834a9c26861e3f6db790c8949adef8e20 Mon Sep 17 00:00:00 2001 From: staphen Date: Wed, 14 Feb 2024 19:39:12 -0500 Subject: [PATCH] Remove hardcoded SDL controller mapping from UWP build --- uwp-project/src/SDL_winrt_main_NonXAML.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/uwp-project/src/SDL_winrt_main_NonXAML.cpp b/uwp-project/src/SDL_winrt_main_NonXAML.cpp index 145ef964ae2..1b6b07f6812 100644 --- a/uwp-project/src/SDL_winrt_main_NonXAML.cpp +++ b/uwp-project/src/SDL_winrt_main_NonXAML.cpp @@ -5,8 +5,6 @@ #include #include #include -#include -#include /* At least one file in any SDL/WinRT app appears to require compilation with C++/CX, otherwise a Windows Metadata file won't get created, and @@ -60,26 +58,6 @@ void OnBackRequested(Platform::Object^, Windows::UI::Core::BackRequestedEventArg void onInitialized() { Windows::UI::Core::SystemNavigationManager::GetForCurrentView()->BackRequested += ref new Windows::Foundation::EventHandler(OnBackRequested); - - // workaround untill new config is released - std::string controllerMapping = ",*,a:b1,b:b0,x:b3,y:b2,back:b6,start:b7,leftstick:b8,rightstick:b9,leftshoulder:b4,rightshoulder:b5,dpup:b10,dpdown:b12,dpleft:b13,dpright:b11,leftx:a1,lefty:a0~,rightx:a3,righty:a2~,lefttrigger:a4,righttrigger:a5,platform:WinRT"; - - for(int i = 0; i < SDL_NumJoysticks(); ++i) - { - SDL_JoystickType type = SDL_JoystickGetDeviceType(i); - - if(type == SDL_JOYSTICK_POWER_UNKNOWN) - continue; - - SDL_JoystickGUID guid = SDL_JoystickGetDeviceGUID(i); - - if(!guid.data) - continue; - - char guidString[33]; - SDL_JoystickGetGUIDString(guid, guidString, 33); - SDL_GameControllerAddMapping((guidString + controllerMapping).c_str()); - } } int CALLBACK WinMain(HINSTANCE, HINSTANCE, LPSTR, int)