|
@@ -472,8 +472,8 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen)
|
|
|
} else {
|
|
} else {
|
|
|
plusstr[0] = '\0';
|
|
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);
|
|
(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));
|
|
SDL_strlcpy(details, " (THIS IS PROBABLY A BUG!)", sizeof(details));
|
|
|
break;
|
|
break;
|
|
|
SDL_EVENT_CASE(SDL_EVENT_QUIT)
|
|
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;
|
|
break;
|
|
|
SDL_EVENT_CASE(SDL_EVENT_TERMINATING)
|
|
SDL_EVENT_CASE(SDL_EVENT_TERMINATING)
|
|
|
break;
|
|
break;
|
|
@@ -511,8 +511,8 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen)
|
|
|
#define SDL_RENDEREVENT_CASE(x) \
|
|
#define SDL_RENDEREVENT_CASE(x) \
|
|
|
case x: \
|
|
case x: \
|
|
|
SDL_strlcpy(name, #x, sizeof(name)); \
|
|
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
|
|
break
|
|
|
SDL_RENDEREVENT_CASE(SDL_EVENT_RENDER_TARGETS_RESET);
|
|
SDL_RENDEREVENT_CASE(SDL_EVENT_RENDER_TARGETS_RESET);
|
|
|
SDL_RENDEREVENT_CASE(SDL_EVENT_RENDER_DEVICE_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) \
|
|
#define SDL_DISPLAYEVENT_CASE(x) \
|
|
|
case x: \
|
|
case x: \
|
|
|
SDL_strlcpy(name, #x, sizeof(name)); \
|
|
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
|
|
break
|
|
|
SDL_DISPLAYEVENT_CASE(SDL_EVENT_DISPLAY_ORIENTATION);
|
|
SDL_DISPLAYEVENT_CASE(SDL_EVENT_DISPLAY_ORIENTATION);
|
|
|
SDL_DISPLAYEVENT_CASE(SDL_EVENT_DISPLAY_ADDED);
|
|
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) \
|
|
#define SDL_WINDOWEVENT_CASE(x) \
|
|
|
case x: \
|
|
case x: \
|
|
|
SDL_strlcpy(name, #x, sizeof(name)); \
|
|
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
|
|
break
|
|
|
SDL_WINDOWEVENT_CASE(SDL_EVENT_WINDOW_SHOWN);
|
|
SDL_WINDOWEVENT_CASE(SDL_EVENT_WINDOW_SHOWN);
|
|
|
SDL_WINDOWEVENT_CASE(SDL_EVENT_WINDOW_HIDDEN);
|
|
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);
|
|
SDL_WINDOWEVENT_CASE(SDL_EVENT_WINDOW_HDR_STATE_CHANGED);
|
|
|
#undef SDL_WINDOWEVENT_CASE
|
|
#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)
|
|
SDL_EVENT_CASE(SDL_EVENT_KEYBOARD_ADDED)
|
|
|
PRINT_KEYDEV_EVENT(event);
|
|
PRINT_KEYDEV_EVENT(event);
|
|
|
break;
|
|
break;
|
|
@@ -577,8 +577,8 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen)
|
|
|
#undef PRINT_KEYDEV_EVENT
|
|
#undef PRINT_KEYDEV_EVENT
|
|
|
|
|
|
|
|
#define PRINT_KEY_EVENT(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.down ? "pressed" : "released", \
|
|
|
event->key.repeat ? "true" : "false", \
|
|
event->key.repeat ? "true" : "false", \
|
|
|
(uint)event->key.scancode, \
|
|
(uint)event->key.scancode, \
|
|
@@ -593,26 +593,26 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen)
|
|
|
#undef PRINT_KEY_EVENT
|
|
#undef PRINT_KEY_EVENT
|
|
|
|
|
|
|
|
SDL_EVENT_CASE(SDL_EVENT_TEXT_EDITING)
|
|
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);
|
|
event->edit.text, (int)event->edit.start, (int)event->edit.length);
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
SDL_EVENT_CASE(SDL_EVENT_TEXT_EDITING_CANDIDATES)
|
|
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);
|
|
(int)event->edit_candidates.num_candidates, (int)event->edit_candidates.selected_candidate);
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
SDL_EVENT_CASE(SDL_EVENT_TEXT_INPUT)
|
|
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;
|
|
break;
|
|
|
SDL_EVENT_CASE(SDL_EVENT_SCREEN_KEYBOARD_SHOWN)
|
|
SDL_EVENT_CASE(SDL_EVENT_SCREEN_KEYBOARD_SHOWN)
|
|
|
break;
|
|
break;
|
|
|
SDL_EVENT_CASE(SDL_EVENT_SCREEN_KEYBOARD_HIDDEN)
|
|
SDL_EVENT_CASE(SDL_EVENT_SCREEN_KEYBOARD_HIDDEN)
|
|
|
break;
|
|
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)
|
|
SDL_EVENT_CASE(SDL_EVENT_MOUSE_ADDED)
|
|
|
PRINT_MOUSEDEV_EVENT(event);
|
|
PRINT_MOUSEDEV_EVENT(event);
|
|
|
break;
|
|
break;
|
|
@@ -622,16 +622,16 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen)
|
|
|
#undef PRINT_MOUSEDEV_EVENT
|
|
#undef PRINT_MOUSEDEV_EVENT
|
|
|
|
|
|
|
|
SDL_EVENT_CASE(SDL_EVENT_MOUSE_MOTION)
|
|
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,
|
|
(uint)event->motion.which, (uint)event->motion.state,
|
|
|
event->motion.x, event->motion.y,
|
|
event->motion.x, event->motion.y,
|
|
|
event->motion.xrel, event->motion.yrel);
|
|
event->motion.xrel, event->motion.yrel);
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
#define PRINT_MBUTTON_EVENT(event) \
|
|
#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, \
|
|
(uint)event->button.which, (uint)event->button.button, \
|
|
|
event->button.down ? "pressed" : "released", \
|
|
event->button.down ? "pressed" : "released", \
|
|
|
(uint)event->button.clicks, event->button.x, event->button.y)
|
|
(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
|
|
#undef PRINT_MBUTTON_EVENT
|
|
|
|
|
|
|
|
SDL_EVENT_CASE(SDL_EVENT_MOUSE_WHEEL)
|
|
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,
|
|
(uint)event->wheel.which, event->wheel.x, event->wheel.y,
|
|
|
(int)event->wheel.integer_x, (int)event->wheel.integer_y,
|
|
(int)event->wheel.integer_x, (int)event->wheel.integer_y,
|
|
|
event->wheel.direction == SDL_MOUSEWHEEL_NORMAL ? "normal" : "flipped");
|
|
event->wheel.direction == SDL_MOUSEWHEEL_NORMAL ? "normal" : "flipped");
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
SDL_EVENT_CASE(SDL_EVENT_JOYSTICK_AXIS_MOTION)
|
|
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);
|
|
(uint)event->jaxis.axis, (int)event->jaxis.value);
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
SDL_EVENT_CASE(SDL_EVENT_JOYSTICK_BALL_MOTION)
|
|
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);
|
|
(uint)event->jball.ball, (int)event->jball.xrel, (int)event->jball.yrel);
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
SDL_EVENT_CASE(SDL_EVENT_JOYSTICK_HAT_MOTION)
|
|
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);
|
|
(uint)event->jhat.hat, (uint)event->jhat.value);
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
#define PRINT_JBUTTON_EVENT(event) \
|
|
#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")
|
|
(uint)event->jbutton.button, event->jbutton.down ? "pressed" : "released")
|
|
|
SDL_EVENT_CASE(SDL_EVENT_JOYSTICK_BUTTON_DOWN)
|
|
SDL_EVENT_CASE(SDL_EVENT_JOYSTICK_BUTTON_DOWN)
|
|
|
PRINT_JBUTTON_EVENT(event);
|
|
PRINT_JBUTTON_EVENT(event);
|
|
@@ -682,12 +682,12 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen)
|
|
|
#undef PRINT_JBUTTON_EVENT
|
|
#undef PRINT_JBUTTON_EVENT
|
|
|
|
|
|
|
|
SDL_EVENT_CASE(SDL_EVENT_JOYSTICK_BATTERY_UPDATED)
|
|
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);
|
|
event->jbattery.state, event->jbattery.percent);
|
|
|
break;
|
|
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)
|
|
SDL_EVENT_CASE(SDL_EVENT_JOYSTICK_ADDED)
|
|
|
PRINT_JOYDEV_EVENT(event);
|
|
PRINT_JOYDEV_EVENT(event);
|
|
|
break;
|
|
break;
|
|
@@ -700,14 +700,14 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen)
|
|
|
#undef PRINT_JOYDEV_EVENT
|
|
#undef PRINT_JOYDEV_EVENT
|
|
|
|
|
|
|
|
SDL_EVENT_CASE(SDL_EVENT_GAMEPAD_AXIS_MOTION)
|
|
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);
|
|
(uint)event->gaxis.axis, (int)event->gaxis.value);
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
#define PRINT_CBUTTON_EVENT(event) \
|
|
#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")
|
|
(uint)event->gbutton.button, event->gbutton.down ? "pressed" : "released")
|
|
|
SDL_EVENT_CASE(SDL_EVENT_GAMEPAD_BUTTON_DOWN)
|
|
SDL_EVENT_CASE(SDL_EVENT_GAMEPAD_BUTTON_DOWN)
|
|
|
PRINT_CBUTTON_EVENT(event);
|
|
PRINT_CBUTTON_EVENT(event);
|
|
@@ -717,7 +717,7 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen)
|
|
|
break;
|
|
break;
|
|
|
#undef PRINT_CBUTTON_EVENT
|
|
#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)
|
|
SDL_EVENT_CASE(SDL_EVENT_GAMEPAD_ADDED)
|
|
|
PRINT_GAMEPADDEV_EVENT(event);
|
|
PRINT_GAMEPADDEV_EVENT(event);
|
|
|
break;
|
|
break;
|
|
@@ -736,8 +736,8 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen)
|
|
|
#undef PRINT_GAMEPADDEV_EVENT
|
|
#undef PRINT_GAMEPADDEV_EVENT
|
|
|
|
|
|
|
|
#define PRINT_CTOUCHPAD_EVENT(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, \
|
|
(int)event->gtouchpad.touchpad, (int)event->gtouchpad.finger, \
|
|
|
event->gtouchpad.x, event->gtouchpad.y, event->gtouchpad.pressure)
|
|
event->gtouchpad.x, event->gtouchpad.y, event->gtouchpad.pressure)
|
|
|
SDL_EVENT_CASE(SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN)
|
|
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
|
|
#undef PRINT_CTOUCHPAD_EVENT
|
|
|
|
|
|
|
|
SDL_EVENT_CASE(SDL_EVENT_GAMEPAD_SENSOR_UPDATE)
|
|
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]);
|
|
event->gsensor.data[0], event->gsensor.data[1], event->gsensor.data[2]);
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
#define PRINT_FINGER_EVENT(event) \
|
|
#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.fingerID, event->tfinger.x, event->tfinger.y, \
|
|
|
event->tfinger.dx, event->tfinger.dy, event->tfinger.pressure)
|
|
event->tfinger.dx, event->tfinger.dy, event->tfinger.pressure)
|
|
|
SDL_EVENT_CASE(SDL_EVENT_FINGER_DOWN)
|
|
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
|
|
#undef PRINT_FINGER_EVENT
|
|
|
|
|
|
|
|
#define PRINT_PINCH_EVENT(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)
|
|
SDL_EVENT_CASE(SDL_EVENT_PINCH_BEGIN)
|
|
|
PRINT_PINCH_EVENT(event);
|
|
PRINT_PINCH_EVENT(event);
|
|
|
break;
|
|
break;
|
|
@@ -791,8 +791,8 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen)
|
|
|
#undef PRINT_PINCH_EVENT
|
|
#undef PRINT_PINCH_EVENT
|
|
|
|
|
|
|
|
#define PRINT_PTOUCH_EVENT(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");
|
|
event->ptouch.eraser ? "yes" : "no", event->ptouch.down ? "down" : "up");
|
|
|
SDL_EVENT_CASE(SDL_EVENT_PEN_DOWN)
|
|
SDL_EVENT_CASE(SDL_EVENT_PEN_DOWN)
|
|
|
PRINT_PTOUCH_EVENT(event);
|
|
PRINT_PTOUCH_EVENT(event);
|
|
@@ -803,8 +803,8 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen)
|
|
|
#undef PRINT_PTOUCH_EVENT
|
|
#undef PRINT_PTOUCH_EVENT
|
|
|
|
|
|
|
|
#define PRINT_PPROXIMITY_EVENT(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)
|
|
SDL_EVENT_CASE(SDL_EVENT_PEN_PROXIMITY_IN)
|
|
|
PRINT_PPROXIMITY_EVENT(event);
|
|
PRINT_PPROXIMITY_EVENT(event);
|
|
|
break;
|
|
break;
|
|
@@ -814,19 +814,19 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen)
|
|
|
#undef PRINT_PPROXIMITY_EVENT
|
|
#undef PRINT_PPROXIMITY_EVENT
|
|
|
|
|
|
|
|
SDL_EVENT_CASE(SDL_EVENT_PEN_AXIS)
|
|
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);
|
|
((((int) event->paxis.axis) >= 0) && (event->paxis.axis < SDL_arraysize(pen_axisnames))) ? pen_axisnames[event->paxis.axis] : "[UNKNOWN]", event->paxis.value);
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
SDL_EVENT_CASE(SDL_EVENT_PEN_MOTION)
|
|
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;
|
|
break;
|
|
|
|
|
|
|
|
#define PRINT_PBUTTON_EVENT(event) \
|
|
#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");
|
|
(uint)event->pbutton.button, event->pbutton.down ? "down" : "up");
|
|
|
SDL_EVENT_CASE(SDL_EVENT_PEN_BUTTON_DOWN)
|
|
SDL_EVENT_CASE(SDL_EVENT_PEN_BUTTON_DOWN)
|
|
|
PRINT_PBUTTON_EVENT(event);
|
|
PRINT_PBUTTON_EVENT(event);
|
|
@@ -836,7 +836,7 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen)
|
|
|
break;
|
|
break;
|
|
|
#undef PRINT_PBUTTON_EVENT
|
|
#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)
|
|
SDL_EVENT_CASE(SDL_EVENT_DROP_FILE)
|
|
|
PRINT_DROP_EVENT(event);
|
|
PRINT_DROP_EVENT(event);
|
|
|
break;
|
|
break;
|
|
@@ -854,7 +854,7 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen)
|
|
|
break;
|
|
break;
|
|
|
#undef PRINT_DROP_EVENT
|
|
#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)
|
|
SDL_EVENT_CASE(SDL_EVENT_AUDIO_DEVICE_ADDED)
|
|
|
PRINT_AUDIODEV_EVENT(event);
|
|
PRINT_AUDIODEV_EVENT(event);
|
|
|
break;
|
|
break;
|
|
@@ -866,7 +866,7 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen)
|
|
|
break;
|
|
break;
|
|
|
#undef PRINT_AUDIODEV_EVENT
|
|
#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)
|
|
SDL_EVENT_CASE(SDL_EVENT_CAMERA_DEVICE_ADDED)
|
|
|
PRINT_CAMERADEV_EVENT(event);
|
|
PRINT_CAMERADEV_EVENT(event);
|
|
|
break;
|
|
break;
|
|
@@ -882,8 +882,8 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen)
|
|
|
#undef PRINT_CAMERADEV_EVENT
|
|
#undef PRINT_CAMERADEV_EVENT
|
|
|
|
|
|
|
|
SDL_EVENT_CASE(SDL_EVENT_SENSOR_UPDATE)
|
|
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[0], event->sensor.data[1], event->sensor.data[2],
|
|
|
event->sensor.data[3], event->sensor.data[4], event->sensor.data[5]);
|
|
event->sensor.data[3], event->sensor.data[4], event->sensor.data[5]);
|
|
|
break;
|
|
break;
|