diff --git a/src/events/SDL_events.c b/src/events/SDL_events.c index 3ecaed71b5..aeb2283cdc 100644 --- a/src/events/SDL_events.c +++ b/src/events/SDL_events.c @@ -472,8 +472,8 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) } else { plusstr[0] = '\0'; } - (void)SDL_snprintf(details, sizeof(details), "%s (timestamp=%u windowid=%u code=%d data1=%p data2=%p)", - plusstr, (uint)event->user.timestamp, (uint)event->user.windowID, + (void)SDL_snprintf(details, sizeof(details), "%s (timestamp=%" SDL_PRIu64 " windowid=%u code=%d data1=%p data2=%p)", + plusstr, event->user.timestamp, (uint)event->user.windowID, (int)event->user.code, event->user.data1, event->user.data2); } @@ -485,7 +485,7 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) SDL_strlcpy(details, " (THIS IS PROBABLY A BUG!)", sizeof(details)); break; SDL_EVENT_CASE(SDL_EVENT_QUIT) - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u)", (uint)event->quit.timestamp); + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 ")", event->quit.timestamp); break; SDL_EVENT_CASE(SDL_EVENT_TERMINATING) break; @@ -511,8 +511,8 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) #define SDL_RENDEREVENT_CASE(x) \ case x: \ SDL_strlcpy(name, #x, sizeof(name)); \ - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u event=%s windowid=%u)", \ - (uint)event->display.timestamp, name, (uint)event->render.windowID); \ + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " event=%s windowid=%u)", \ + event->display.timestamp, name, (uint)event->render.windowID); \ break SDL_RENDEREVENT_CASE(SDL_EVENT_RENDER_TARGETS_RESET); SDL_RENDEREVENT_CASE(SDL_EVENT_RENDER_DEVICE_RESET); @@ -521,8 +521,8 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) #define SDL_DISPLAYEVENT_CASE(x) \ case x: \ SDL_strlcpy(name, #x, sizeof(name)); \ - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u display=%u event=%s data1=%d, data2=%d)", \ - (uint)event->display.timestamp, (uint)event->display.displayID, name, (int)event->display.data1, (int)event->display.data2); \ + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " display=%u event=%s data1=%d, data2=%d)", \ + event->display.timestamp, (uint)event->display.displayID, name, (int)event->display.data1, (int)event->display.data2); \ break SDL_DISPLAYEVENT_CASE(SDL_EVENT_DISPLAY_ORIENTATION); SDL_DISPLAYEVENT_CASE(SDL_EVENT_DISPLAY_ADDED); @@ -537,8 +537,8 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) #define SDL_WINDOWEVENT_CASE(x) \ case x: \ SDL_strlcpy(name, #x, sizeof(name)); \ - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u windowid=%u event=%s data1=%d data2=%d)", \ - (uint)event->window.timestamp, (uint)event->window.windowID, name, (int)event->window.data1, (int)event->window.data2); \ + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " windowid=%u event=%s data1=%d data2=%d)", \ + event->window.timestamp, (uint)event->window.windowID, name, (int)event->window.data1, (int)event->window.data2); \ break SDL_WINDOWEVENT_CASE(SDL_EVENT_WINDOW_SHOWN); SDL_WINDOWEVENT_CASE(SDL_EVENT_WINDOW_HIDDEN); @@ -567,7 +567,7 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) SDL_WINDOWEVENT_CASE(SDL_EVENT_WINDOW_HDR_STATE_CHANGED); #undef SDL_WINDOWEVENT_CASE -#define PRINT_KEYDEV_EVENT(event) (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%u)", (uint)event->kdevice.timestamp, (uint)event->kdevice.which) +#define PRINT_KEYDEV_EVENT(event) (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " which=%u)", event->kdevice.timestamp, (uint)event->kdevice.which) SDL_EVENT_CASE(SDL_EVENT_KEYBOARD_ADDED) PRINT_KEYDEV_EVENT(event); break; @@ -577,8 +577,8 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) #undef PRINT_KEYDEV_EVENT #define PRINT_KEY_EVENT(event) \ - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u windowid=%u which=%u state=%s repeat=%s scancode=%u keycode=%u mod=0x%x)", \ - (uint)event->key.timestamp, (uint)event->key.windowID, (uint)event->key.which, \ + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " windowid=%u which=%u state=%s repeat=%s scancode=%u keycode=%u mod=0x%x)", \ + event->key.timestamp, (uint)event->key.windowID, (uint)event->key.which, \ event->key.down ? "pressed" : "released", \ event->key.repeat ? "true" : "false", \ (uint)event->key.scancode, \ @@ -593,26 +593,26 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) #undef PRINT_KEY_EVENT SDL_EVENT_CASE(SDL_EVENT_TEXT_EDITING) - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u windowid=%u text='%s' start=%d length=%d)", - (uint)event->edit.timestamp, (uint)event->edit.windowID, + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " windowid=%u text='%s' start=%d length=%d)", + event->edit.timestamp, (uint)event->edit.windowID, event->edit.text, (int)event->edit.start, (int)event->edit.length); break; SDL_EVENT_CASE(SDL_EVENT_TEXT_EDITING_CANDIDATES) - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u windowid=%u num_candidates=%d selected_candidate=%d)", - (uint)event->edit_candidates.timestamp, (uint)event->edit_candidates.windowID, + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " windowid=%u num_candidates=%d selected_candidate=%d)", + event->edit_candidates.timestamp, (uint)event->edit_candidates.windowID, (int)event->edit_candidates.num_candidates, (int)event->edit_candidates.selected_candidate); break; SDL_EVENT_CASE(SDL_EVENT_TEXT_INPUT) - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u windowid=%u text='%s')", (uint)event->text.timestamp, (uint)event->text.windowID, event->text.text); + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " windowid=%u text='%s')", event->text.timestamp, (uint)event->text.windowID, event->text.text); break; SDL_EVENT_CASE(SDL_EVENT_SCREEN_KEYBOARD_SHOWN) break; SDL_EVENT_CASE(SDL_EVENT_SCREEN_KEYBOARD_HIDDEN) break; -#define PRINT_MOUSEDEV_EVENT(event) (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%u)", (uint)event->mdevice.timestamp, (uint)event->mdevice.which) +#define PRINT_MOUSEDEV_EVENT(event) (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " which=%u)", event->mdevice.timestamp, (uint)event->mdevice.which) SDL_EVENT_CASE(SDL_EVENT_MOUSE_ADDED) PRINT_MOUSEDEV_EVENT(event); break; @@ -622,16 +622,16 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) #undef PRINT_MOUSEDEV_EVENT SDL_EVENT_CASE(SDL_EVENT_MOUSE_MOTION) - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u windowid=%u which=%u state=%u x=%g y=%g xrel=%g yrel=%g)", - (uint)event->motion.timestamp, (uint)event->motion.windowID, + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " windowid=%u which=%u state=%u x=%g y=%g xrel=%g yrel=%g)", + event->motion.timestamp, (uint)event->motion.windowID, (uint)event->motion.which, (uint)event->motion.state, event->motion.x, event->motion.y, event->motion.xrel, event->motion.yrel); break; #define PRINT_MBUTTON_EVENT(event) \ - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u windowid=%u which=%u button=%u state=%s clicks=%u x=%g y=%g)", \ - (uint)event->button.timestamp, (uint)event->button.windowID, \ + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " windowid=%u which=%u button=%u state=%s clicks=%u x=%g y=%g)", \ + event->button.timestamp, (uint)event->button.windowID, \ (uint)event->button.which, (uint)event->button.button, \ event->button.down ? "pressed" : "released", \ (uint)event->button.clicks, event->button.x, event->button.y) @@ -644,34 +644,34 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) #undef PRINT_MBUTTON_EVENT SDL_EVENT_CASE(SDL_EVENT_MOUSE_WHEEL) - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u windowid=%u which=%u x=%g y=%g integer_x=%d integer_y=%d direction=%s)", - (uint)event->wheel.timestamp, (uint)event->wheel.windowID, + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " windowid=%u which=%u x=%g y=%g integer_x=%d integer_y=%d direction=%s)", + event->wheel.timestamp, (uint)event->wheel.windowID, (uint)event->wheel.which, event->wheel.x, event->wheel.y, (int)event->wheel.integer_x, (int)event->wheel.integer_y, event->wheel.direction == SDL_MOUSEWHEEL_NORMAL ? "normal" : "flipped"); break; SDL_EVENT_CASE(SDL_EVENT_JOYSTICK_AXIS_MOTION) - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d axis=%u value=%d)", - (uint)event->jaxis.timestamp, (int)event->jaxis.which, + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " which=%d axis=%u value=%d)", + event->jaxis.timestamp, (int)event->jaxis.which, (uint)event->jaxis.axis, (int)event->jaxis.value); break; SDL_EVENT_CASE(SDL_EVENT_JOYSTICK_BALL_MOTION) - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d ball=%u xrel=%d yrel=%d)", - (uint)event->jball.timestamp, (int)event->jball.which, + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " which=%d ball=%u xrel=%d yrel=%d)", + event->jball.timestamp, (int)event->jball.which, (uint)event->jball.ball, (int)event->jball.xrel, (int)event->jball.yrel); break; SDL_EVENT_CASE(SDL_EVENT_JOYSTICK_HAT_MOTION) - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d hat=%u value=%u)", - (uint)event->jhat.timestamp, (int)event->jhat.which, + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " which=%d hat=%u value=%u)", + event->jhat.timestamp, (int)event->jhat.which, (uint)event->jhat.hat, (uint)event->jhat.value); break; #define PRINT_JBUTTON_EVENT(event) \ - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d button=%u state=%s)", \ - (uint)event->jbutton.timestamp, (int)event->jbutton.which, \ + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " which=%d button=%u state=%s)", \ + event->jbutton.timestamp, (int)event->jbutton.which, \ (uint)event->jbutton.button, event->jbutton.down ? "pressed" : "released") SDL_EVENT_CASE(SDL_EVENT_JOYSTICK_BUTTON_DOWN) PRINT_JBUTTON_EVENT(event); @@ -682,12 +682,12 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) #undef PRINT_JBUTTON_EVENT SDL_EVENT_CASE(SDL_EVENT_JOYSTICK_BATTERY_UPDATED) - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d state=%u percent=%d)", - (uint)event->jbattery.timestamp, (int)event->jbattery.which, + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " which=%d state=%u percent=%d)", + event->jbattery.timestamp, (int)event->jbattery.which, event->jbattery.state, event->jbattery.percent); break; -#define PRINT_JOYDEV_EVENT(event) (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d)", (uint)event->jdevice.timestamp, (int)event->jdevice.which) +#define PRINT_JOYDEV_EVENT(event) (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " which=%d)", event->jdevice.timestamp, (int)event->jdevice.which) SDL_EVENT_CASE(SDL_EVENT_JOYSTICK_ADDED) PRINT_JOYDEV_EVENT(event); break; @@ -700,14 +700,14 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) #undef PRINT_JOYDEV_EVENT SDL_EVENT_CASE(SDL_EVENT_GAMEPAD_AXIS_MOTION) - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d axis=%u value=%d)", - (uint)event->gaxis.timestamp, (int)event->gaxis.which, + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " which=%d axis=%u value=%d)", + event->gaxis.timestamp, (int)event->gaxis.which, (uint)event->gaxis.axis, (int)event->gaxis.value); break; #define PRINT_CBUTTON_EVENT(event) \ - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d button=%u state=%s)", \ - (uint)event->gbutton.timestamp, (int)event->gbutton.which, \ + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " which=%d button=%u state=%s)", \ + event->gbutton.timestamp, (int)event->gbutton.which, \ (uint)event->gbutton.button, event->gbutton.down ? "pressed" : "released") SDL_EVENT_CASE(SDL_EVENT_GAMEPAD_BUTTON_DOWN) PRINT_CBUTTON_EVENT(event); @@ -717,7 +717,7 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) break; #undef PRINT_CBUTTON_EVENT -#define PRINT_GAMEPADDEV_EVENT(event) (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d)", (uint)event->gdevice.timestamp, (int)event->gdevice.which) +#define PRINT_GAMEPADDEV_EVENT(event) (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " which=%d)", event->gdevice.timestamp, (int)event->gdevice.which) SDL_EVENT_CASE(SDL_EVENT_GAMEPAD_ADDED) PRINT_GAMEPADDEV_EVENT(event); break; @@ -736,8 +736,8 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) #undef PRINT_GAMEPADDEV_EVENT #define PRINT_CTOUCHPAD_EVENT(event) \ - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d touchpad=%d finger=%d x=%f y=%f pressure=%f)", \ - (uint)event->gtouchpad.timestamp, (int)event->gtouchpad.which, \ + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " which=%d touchpad=%d finger=%d x=%f y=%f pressure=%f)", \ + event->gtouchpad.timestamp, (int)event->gtouchpad.which, \ (int)event->gtouchpad.touchpad, (int)event->gtouchpad.finger, \ event->gtouchpad.x, event->gtouchpad.y, event->gtouchpad.pressure) SDL_EVENT_CASE(SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN) @@ -752,14 +752,14 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) #undef PRINT_CTOUCHPAD_EVENT SDL_EVENT_CASE(SDL_EVENT_GAMEPAD_SENSOR_UPDATE) - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d sensor=%d data[0]=%f data[1]=%f data[2]=%f)", - (uint)event->gsensor.timestamp, (int)event->gsensor.which, (int)event->gsensor.sensor, + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " which=%d sensor=%d data[0]=%f data[1]=%f data[2]=%f)", + event->gsensor.timestamp, (int)event->gsensor.which, (int)event->gsensor.sensor, event->gsensor.data[0], event->gsensor.data[1], event->gsensor.data[2]); break; #define PRINT_FINGER_EVENT(event) \ - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u touchid=%" SDL_PRIu64 " fingerid=%" SDL_PRIu64 " x=%f y=%f dx=%f dy=%f pressure=%f)", \ - (uint)event->tfinger.timestamp, event->tfinger.touchID, \ + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " touchid=%" SDL_PRIu64 " fingerid=%" SDL_PRIu64 " x=%f y=%f dx=%f dy=%f pressure=%f)", \ + event->tfinger.timestamp, event->tfinger.touchID, \ event->tfinger.fingerID, event->tfinger.x, event->tfinger.y, \ event->tfinger.dx, event->tfinger.dy, event->tfinger.pressure) SDL_EVENT_CASE(SDL_EVENT_FINGER_DOWN) @@ -777,8 +777,8 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) #undef PRINT_FINGER_EVENT #define PRINT_PINCH_EVENT(event) \ - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u scale=%f)", \ - (uint)event->pinch.timestamp, event->pinch.scale) + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " scale=%f)", \ + event->pinch.timestamp, event->pinch.scale) SDL_EVENT_CASE(SDL_EVENT_PINCH_BEGIN) PRINT_PINCH_EVENT(event); break; @@ -791,8 +791,8 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) #undef PRINT_PINCH_EVENT #define PRINT_PTOUCH_EVENT(event) \ - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u windowid=%u which=%u pen_state=%u x=%g y=%g eraser=%s state=%s)", \ - (uint)event->ptouch.timestamp, (uint)event->ptouch.windowID, (uint)event->ptouch.which, (uint)event->ptouch.pen_state, event->ptouch.x, event->ptouch.y, \ + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " windowid=%u which=%u pen_state=%u x=%g y=%g eraser=%s state=%s)", \ + event->ptouch.timestamp, (uint)event->ptouch.windowID, (uint)event->ptouch.which, (uint)event->ptouch.pen_state, event->ptouch.x, event->ptouch.y, \ event->ptouch.eraser ? "yes" : "no", event->ptouch.down ? "down" : "up"); SDL_EVENT_CASE(SDL_EVENT_PEN_DOWN) PRINT_PTOUCH_EVENT(event); @@ -803,8 +803,8 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) #undef PRINT_PTOUCH_EVENT #define PRINT_PPROXIMITY_EVENT(event) \ - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u windowid=%u which=%u)", \ - (uint)event->pproximity.timestamp, (uint)event->pproximity.windowID, (uint)event->pproximity.which); + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " windowid=%u which=%u)", \ + event->pproximity.timestamp, (uint)event->pproximity.windowID, (uint)event->pproximity.which); SDL_EVENT_CASE(SDL_EVENT_PEN_PROXIMITY_IN) PRINT_PPROXIMITY_EVENT(event); break; @@ -814,19 +814,19 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) #undef PRINT_PPROXIMITY_EVENT SDL_EVENT_CASE(SDL_EVENT_PEN_AXIS) - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u windowid=%u which=%u pen_state=%u x=%g y=%g axis=%s value=%g)", - (uint)event->paxis.timestamp, (uint)event->paxis.windowID, (uint)event->paxis.which, (uint)event->paxis.pen_state, event->paxis.x, event->paxis.y, + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " windowid=%u which=%u pen_state=%u x=%g y=%g axis=%s value=%g)", + event->paxis.timestamp, (uint)event->paxis.windowID, (uint)event->paxis.which, (uint)event->paxis.pen_state, event->paxis.x, event->paxis.y, ((((int) event->paxis.axis) >= 0) && (event->paxis.axis < SDL_arraysize(pen_axisnames))) ? pen_axisnames[event->paxis.axis] : "[UNKNOWN]", event->paxis.value); break; SDL_EVENT_CASE(SDL_EVENT_PEN_MOTION) - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u windowid=%u which=%u pen_state=%u x=%g y=%g)", - (uint)event->pmotion.timestamp, (uint)event->pmotion.windowID, (uint)event->pmotion.which, (uint)event->pmotion.pen_state, event->pmotion.x, event->pmotion.y); + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " windowid=%u which=%u pen_state=%u x=%g y=%g)", + event->pmotion.timestamp, (uint)event->pmotion.windowID, (uint)event->pmotion.which, (uint)event->pmotion.pen_state, event->pmotion.x, event->pmotion.y); break; #define PRINT_PBUTTON_EVENT(event) \ - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u windowid=%u which=%u pen_state=%u x=%g y=%g button=%u state=%s)", \ - (uint)event->pbutton.timestamp, (uint)event->pbutton.windowID, (uint)event->pbutton.which, (uint)event->pbutton.pen_state, event->pbutton.x, event->pbutton.y, \ + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " windowid=%u which=%u pen_state=%u x=%g y=%g button=%u state=%s)", \ + event->pbutton.timestamp, (uint)event->pbutton.windowID, (uint)event->pbutton.which, (uint)event->pbutton.pen_state, event->pbutton.x, event->pbutton.y, \ (uint)event->pbutton.button, event->pbutton.down ? "down" : "up"); SDL_EVENT_CASE(SDL_EVENT_PEN_BUTTON_DOWN) PRINT_PBUTTON_EVENT(event); @@ -836,7 +836,7 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) break; #undef PRINT_PBUTTON_EVENT -#define PRINT_DROP_EVENT(event) (void)SDL_snprintf(details, sizeof(details), " (data='%s' timestamp=%u windowid=%u x=%f y=%f)", event->drop.data, (uint)event->drop.timestamp, (uint)event->drop.windowID, event->drop.x, event->drop.y) +#define PRINT_DROP_EVENT(event) (void)SDL_snprintf(details, sizeof(details), " (data='%s' timestamp=%" SDL_PRIu64 " windowid=%u x=%f y=%f)", event->drop.data, event->drop.timestamp, (uint)event->drop.windowID, event->drop.x, event->drop.y) SDL_EVENT_CASE(SDL_EVENT_DROP_FILE) PRINT_DROP_EVENT(event); break; @@ -854,7 +854,7 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) break; #undef PRINT_DROP_EVENT -#define PRINT_AUDIODEV_EVENT(event) (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%u recording=%s)", (uint)event->adevice.timestamp, (uint)event->adevice.which, event->adevice.recording ? "true" : "false") +#define PRINT_AUDIODEV_EVENT(event) (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " which=%u recording=%s)", event->adevice.timestamp, (uint)event->adevice.which, event->adevice.recording ? "true" : "false") SDL_EVENT_CASE(SDL_EVENT_AUDIO_DEVICE_ADDED) PRINT_AUDIODEV_EVENT(event); break; @@ -866,7 +866,7 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) break; #undef PRINT_AUDIODEV_EVENT -#define PRINT_CAMERADEV_EVENT(event) (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%u)", (uint)event->cdevice.timestamp, (uint)event->cdevice.which) +#define PRINT_CAMERADEV_EVENT(event) (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " which=%u)", event->cdevice.timestamp, (uint)event->cdevice.which) SDL_EVENT_CASE(SDL_EVENT_CAMERA_DEVICE_ADDED) PRINT_CAMERADEV_EVENT(event); break; @@ -882,8 +882,8 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen) #undef PRINT_CAMERADEV_EVENT SDL_EVENT_CASE(SDL_EVENT_SENSOR_UPDATE) - (void)SDL_snprintf(details, sizeof(details), " (timestamp=%u which=%d data[0]=%f data[1]=%f data[2]=%f data[3]=%f data[4]=%f data[5]=%f)", - (uint)event->sensor.timestamp, (int)event->sensor.which, + (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " which=%d data[0]=%f data[1]=%f data[2]=%f data[3]=%f data[4]=%f data[5]=%f)", + event->sensor.timestamp, (int)event->sensor.which, event->sensor.data[0], event->sensor.data[1], event->sensor.data[2], event->sensor.data[3], event->sensor.data[4], event->sensor.data[5]); break;