We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e62be5f commit 72bca80Copy full SHA for 72bca80
src/macosx/hidjoy.m
@@ -63,7 +63,7 @@
63
CONFIG_STATE cfg_state;
64
ALLEGRO_JOYSTICK_STATE state;
65
IOHIDDeviceRef ident;
66
- char * name;
+ char *name;
67
} ALLEGRO_JOYSTICK_OSX;
68
69
static IOHIDManagerRef hidManagerRef;
@@ -768,9 +768,9 @@ static bool reconfigure_joysticks(void)
768
CFIndex length = CFStringGetLength(str);
769
CFIndex maxSize = CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8) + 1;
770
if (joy->name) {
771
- free(joy->name);
+ al_free(joy->name);
772
}
773
- joy->name = (char *)malloc(maxSize);
+ joy->name = (char *)al_malloc(maxSize);
774
775
if (CFStringGetCString(str, joy->name, maxSize, kCFStringEncodingUTF8)) {
776
return joy->name;
0 commit comments