mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-22 03:08:22 +00:00
Only include controller_type.h in SDL_joystick.c
It has a huge array of controllers and we only want it instantiated once
This commit is contained in:
@@ -40,7 +40,6 @@
|
||||
#include "SDL_timer.h"
|
||||
#include "../usb_ids.h"
|
||||
#include "../SDL_sysjoystick.h"
|
||||
#include "../controller_type.h"
|
||||
#include "../../core/windows/SDL_windows.h"
|
||||
#include "../../core/windows/SDL_hid.h"
|
||||
#include "../hidapi/SDL_hidapijoystick_c.h"
|
||||
@@ -746,7 +745,7 @@ RAWINPUT_AddDevice(HANDLE hDevice)
|
||||
device->product_id = (Uint16)rdi.hid.dwProductId;
|
||||
device->version = (Uint16)rdi.hid.dwVersionNumber;
|
||||
device->is_xinput = SDL_TRUE;
|
||||
device->is_xboxone = GuessControllerType(device->vendor_id, device->product_id) == k_eControllerType_XBoxOneController;
|
||||
device->is_xboxone = SDL_IsJoystickXboxOne(device->vendor_id, device->product_id);
|
||||
|
||||
/* Get HID Top-Level Collection Preparsed Data */
|
||||
size = 0;
|
||||
|
Reference in New Issue
Block a user