Browse Source

HIDAPI_DumpPacket() takes a const memory pointer

Sam Lantinga 2 years ago
parent
commit
7df571ffc6

+ 1 - 1
src/joystick/hidapi/SDL_hidapijoystick.c

@@ -97,7 +97,7 @@ static SDL_bool initialized = SDL_FALSE;
 static SDL_bool shutting_down = SDL_FALSE;
 
 void
-HIDAPI_DumpPacket(const char *prefix, Uint8 *data, int size)
+HIDAPI_DumpPacket(const char *prefix, const Uint8 *data, int size)
 {
     int i;
     char *buffer;

+ 1 - 1
src/joystick/hidapi/SDL_hidapijoystick_c.h

@@ -149,7 +149,7 @@ extern void HIDAPI_UpdateDevices(void);
 extern SDL_bool HIDAPI_JoystickConnected(SDL_HIDAPI_Device *device, SDL_JoystickID *pJoystickID);
 extern void HIDAPI_JoystickDisconnected(SDL_HIDAPI_Device *device, SDL_JoystickID joystickID);
 
-extern void HIDAPI_DumpPacket(const char *prefix, Uint8 *data, int size);
+extern void HIDAPI_DumpPacket(const char *prefix, const Uint8 *data, int size);
 
 extern float HIDAPI_RemapVal(float val, float val_min, float val_max, float output_min, float output_max);