N3DS: Use designated initialiser for drivers. Just a sanity check that the functions are actually mapped correctly.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
diff --git a/src/joystick/n3ds/SDL_sysjoystick.c b/src/joystick/n3ds/SDL_sysjoystick.c
index ea00a6d..933f64e 100644
--- a/src/joystick/n3ds/SDL_sysjoystick.c
+++ b/src/joystick/n3ds/SDL_sysjoystick.c
@@ -279,26 +279,26 @@ N3DS_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size)
}
SDL_JoystickDriver SDL_N3DS_JoystickDriver = {
- N3DS_JoystickInit,
- N3DS_JoystickGetCount,
- N3DS_JoystickDetect,
- N3DS_JoystickGetDeviceName,
- N3DS_JoystickGetDevicePath,
- N3DS_JoystickGetDevicePlayerIndex,
- N3DS_JoystickSetDevicePlayerIndex,
- N3DS_JoystickGetDeviceGUID,
- N3DS_JoystickGetDeviceInstanceID,
- N3DS_JoystickOpen,
- N3DS_JoystickRumble,
- N3DS_JoystickRumbleTriggers,
- N3DS_JoystickGetCapabilities,
- N3DS_JoystickSetLED,
- N3DS_JoystickSendEffect,
- N3DS_JoystickSetSensorsEnabled,
- N3DS_JoystickUpdate,
- N3DS_JoystickClose,
- N3DS_JoystickQuit,
- N3DS_JoystickGetGamepadMapping
+ .Init = N3DS_JoystickInit,
+ .GetCount = N3DS_JoystickGetCount,
+ .Detect = N3DS_JoystickDetect,
+ .GetDeviceName = N3DS_JoystickGetDeviceName,
+ .GetDevicePath = N3DS_JoystickGetDevicePath,
+ .GetDevicePlayerIndex = N3DS_JoystickGetDevicePlayerIndex,
+ .SetDevicePlayerIndex = N3DS_JoystickSetDevicePlayerIndex,
+ .GetDeviceGUID = N3DS_JoystickGetDeviceGUID,
+ .GetDeviceInstanceID = N3DS_JoystickGetDeviceInstanceID,
+ .Open = N3DS_JoystickOpen,
+ .Rumble = N3DS_JoystickRumble,
+ .RumbleTriggers = N3DS_JoystickRumbleTriggers,
+ .GetCapabilities = N3DS_JoystickGetCapabilities,
+ .SetLED = N3DS_JoystickSetLED,
+ .SendEffect = N3DS_JoystickSendEffect,
+ .SetSensorsEnabled = N3DS_JoystickSetSensorsEnabled,
+ .Update = N3DS_JoystickUpdate,
+ .Close = N3DS_JoystickClose,
+ .Quit = N3DS_JoystickQuit,
+ .GetGamepadMapping = N3DS_JoystickGetGamepadMapping
};
#endif /* SDL_JOYSTICK_N3DS */
diff --git a/src/sensor/n3ds/SDL_n3dssensor.c b/src/sensor/n3ds/SDL_n3dssensor.c
index a435ae2..ea22ef2 100644
--- a/src/sensor/n3ds/SDL_n3dssensor.c
+++ b/src/sensor/n3ds/SDL_n3dssensor.c
@@ -200,17 +200,17 @@ N3DS_SensorQuit(void)
}
SDL_SensorDriver SDL_N3DS_SensorDriver = {
- N3DS_SensorInit,
- N3DS_SensorGetCount,
- N3DS_SensorDetect,
- N3DS_SensorGetDeviceName,
- N3DS_SensorGetDeviceType,
- N3DS_SensorGetDeviceNonPortableType,
- N3DS_SensorGetDeviceInstanceID,
- N3DS_SensorOpen,
- N3DS_SensorUpdate,
- N3DS_SensorClose,
- N3DS_SensorQuit,
+ .Init = N3DS_SensorInit,
+ .GetCount = N3DS_SensorGetCount,
+ .Detect = N3DS_SensorDetect,
+ .GetDeviceName = N3DS_SensorGetDeviceName,
+ .GetDeviceType = N3DS_SensorGetDeviceType,
+ .GetDeviceNonPortableType = N3DS_SensorGetDeviceNonPortableType,
+ .GetDeviceInstanceID = N3DS_SensorGetDeviceInstanceID,
+ .Open = N3DS_SensorOpen,
+ .Update = N3DS_SensorUpdate,
+ .Close = N3DS_SensorClose,
+ .Quit = N3DS_SensorQuit,
};
#endif /* SDL_SENSOR_N3DS */