Skip to content

Commit a5bde3a

Browse files
committed
ogc: fix OGC_JoystickGetDeviceGUID
1 parent 184cc31 commit a5bde3a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/joystick/ogc/SDL_sysjoystick.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,8 @@ static SDL_JoystickGUID OGC_JoystickGetDeviceGUID(int device_index)
497497
int index = device_index_to_joypad_index(device_index);
498498
Uint16 bus, product, version;
499499
Uint8 driver_signature, driver_data;
500-
const char *name;
501-
500+
const char *product_name;
501+
static const char *vendor_name="Nintendo";
502502
/* We invent our own product IDs, to tell our joysticks apart.
503503
* Since we want the gamepads to appear with the numeric ID in their
504504
* name, we make them unique by assigning a different product depending on
@@ -514,9 +514,9 @@ static SDL_JoystickGUID OGC_JoystickGetDeviceGUID(int device_index)
514514
driver_signature = 0;
515515
driver_data = 0;
516516

517-
name = OGC_JoystickGetDeviceName(device_index);
517+
product_name = OGC_JoystickGetDeviceName(device_index);
518518
return SDL_CreateJoystickGUID(bus, USB_VENDOR_NINTENDO, product, version,
519-
name, driver_signature, driver_data);
519+
vendor_name, product_name, driver_signature, driver_data);
520520
}
521521

522522
static SDL_JoystickID OGC_JoystickGetDeviceInstanceID(int device_index)

0 commit comments

Comments
 (0)