Skip to content

Commit

Permalink
ogc: fix OGC_JoystickGetDeviceGUID
Browse files Browse the repository at this point in the history
  • Loading branch information
WinterMute committed Oct 24, 2024
1 parent 184cc31 commit a5bde3a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/joystick/ogc/SDL_sysjoystick.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,8 @@ static SDL_JoystickGUID OGC_JoystickGetDeviceGUID(int device_index)
int index = device_index_to_joypad_index(device_index);
Uint16 bus, product, version;
Uint8 driver_signature, driver_data;
const char *name;

const char *product_name;
static const char *vendor_name="Nintendo";
/* We invent our own product IDs, to tell our joysticks apart.
* Since we want the gamepads to appear with the numeric ID in their
* name, we make them unique by assigning a different product depending on
Expand All @@ -514,9 +514,9 @@ static SDL_JoystickGUID OGC_JoystickGetDeviceGUID(int device_index)
driver_signature = 0;
driver_data = 0;

name = OGC_JoystickGetDeviceName(device_index);
product_name = OGC_JoystickGetDeviceName(device_index);
return SDL_CreateJoystickGUID(bus, USB_VENDOR_NINTENDO, product, version,
name, driver_signature, driver_data);
vendor_name, product_name, driver_signature, driver_data);
}

static SDL_JoystickID OGC_JoystickGetDeviceInstanceID(int device_index)
Expand Down

0 comments on commit a5bde3a

Please sign in to comment.