Skip to content

Commit

Permalink
Removed unnecessary setlocale() on Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 30, 2019
1 parent a9482a1 commit 98ce0e5
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/hidapi/mac/hid.c
Expand Up @@ -29,7 +29,6 @@
#include <IOKit/hid/IOHIDKeys.h>
#include <CoreFoundation/CoreFoundation.h>
#include <wchar.h>
#include <locale.h>
#include <pthread.h>
#include <sys/time.h>
#include <unistd.h>
Expand Down Expand Up @@ -448,8 +447,6 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id,
CFIndex num_devices;
int i;

setlocale(LC_ALL,"");

/* Set up the HID Manager if it hasn't been done */
if (hid_init() < 0)
return NULL;
Expand Down Expand Up @@ -1153,8 +1150,6 @@ int main(void)
IOHIDDeviceRef *device_array = calloc(num_devices, sizeof(IOHIDDeviceRef));
CFSetGetValues(device_set, (const void **) device_array);

setlocale(LC_ALL, "");

for (i = 0; i < num_devices; i++) {
IOHIDDeviceRef dev = device_array[i];
printf("Device: %p\n", dev);
Expand Down

0 comments on commit 98ce0e5

Please sign in to comment.