|
@@ -1743,6 +1743,10 @@ void SDLTest_PrintEvent(const SDL_Event *event)
|
|
|
SDL_Log("SDL EVENT: Keyboard: text editing \"%s\" in window %" SDL_PRIu32,
|
|
|
event->edit.text, event->edit.windowID);
|
|
|
break;
|
|
|
+ case SDL_EVENT_TEXT_EDITING_CANDIDATES:
|
|
|
+ SDL_Log("SDL EVENT: Keyboard: text editing candidates in window %" SDL_PRIu32,
|
|
|
+ event->edit.windowID);
|
|
|
+ break;
|
|
|
case SDL_EVENT_TEXT_INPUT:
|
|
|
SDL_Log("SDL EVENT: Keyboard: text input \"%s\" in window %" SDL_PRIu32,
|
|
|
event->text.text, event->text.windowID);
|
|
@@ -1786,6 +1790,12 @@ void SDLTest_PrintEvent(const SDL_Event *event)
|
|
|
SDL_Log("SDL EVENT: Joystick %" SDL_PRIu32 " removed",
|
|
|
event->jdevice.which);
|
|
|
break;
|
|
|
+ case SDL_EVENT_JOYSTICK_AXIS_MOTION:
|
|
|
+ SDL_Log("SDL EVENT: Joystick %" SDL_PRIu32 " axis %d value: %d",
|
|
|
+ event->jaxis.which,
|
|
|
+ event->jaxis.axis,
|
|
|
+ event->jaxis.value);
|
|
|
+ break;
|
|
|
case SDL_EVENT_JOYSTICK_BALL_MOTION:
|
|
|
SDL_Log("SDL EVENT: Joystick %" SDL_PRIs32 ": ball %d moved by %d,%d",
|
|
|
event->jball.which, event->jball.ball, event->jball.xrel,
|
|
@@ -1834,6 +1844,10 @@ void SDLTest_PrintEvent(const SDL_Event *event)
|
|
|
SDL_Log("SDL EVENT: Joystick %" SDL_PRIu32 ": button %d released",
|
|
|
event->jbutton.which, event->jbutton.button);
|
|
|
break;
|
|
|
+ case SDL_EVENT_JOYSTICK_BATTERY_UPDATED:
|
|
|
+ SDL_Log("SDL EVENT: Joystick %" SDL_PRIu32 ": battery at %d percent",
|
|
|
+ event->jbattery.which, event->jbattery.percent);
|
|
|
+ break;
|
|
|
case SDL_EVENT_GAMEPAD_ADDED:
|
|
|
SDL_Log("SDL EVENT: Gamepad %" SDL_PRIu32 " attached",
|
|
|
event->gdevice.which);
|
|
@@ -1842,6 +1856,10 @@ void SDLTest_PrintEvent(const SDL_Event *event)
|
|
|
SDL_Log("SDL EVENT: Gamepad %" SDL_PRIu32 " removed",
|
|
|
event->gdevice.which);
|
|
|
break;
|
|
|
+ case SDL_EVENT_GAMEPAD_REMAPPED:
|
|
|
+ SDL_Log("SDL EVENT: Gamepad %" SDL_PRIu32 " mapping changed",
|
|
|
+ event->gdevice.which);
|
|
|
+ break;
|
|
|
case SDL_EVENT_GAMEPAD_AXIS_MOTION:
|
|
|
SDL_Log("SDL EVENT: Gamepad %" SDL_PRIu32 " axis %d ('%s') value: %d",
|
|
|
event->gaxis.which,
|
|
@@ -1923,6 +1941,76 @@ void SDLTest_PrintEvent(const SDL_Event *event)
|
|
|
case SDL_EVENT_DROP_COMPLETE:
|
|
|
SDL_Log("SDL EVENT: Drag and drop ending");
|
|
|
break;
|
|
|
+ case SDL_EVENT_AUDIO_DEVICE_ADDED:
|
|
|
+ SDL_Log("SDL EVENT: Audio %s device %" SDL_PRIu32 " available",
|
|
|
+ event->adevice.recording ? "recording" : "playback",
|
|
|
+ event->adevice.which);
|
|
|
+ break;
|
|
|
+ case SDL_EVENT_AUDIO_DEVICE_REMOVED:
|
|
|
+ SDL_Log("SDL EVENT: Audio %s device %" SDL_PRIu32 " removed",
|
|
|
+ event->adevice.recording ? "recording" : "playback",
|
|
|
+ event->adevice.which);
|
|
|
+ break;
|
|
|
+ case SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED:
|
|
|
+ SDL_Log("SDL EVENT: Audio %s device %" SDL_PRIu32 " format changed",
|
|
|
+ event->adevice.recording ? "recording" : "playback",
|
|
|
+ event->adevice.which);
|
|
|
+ break;
|
|
|
+ case SDL_EVENT_CAMERA_DEVICE_ADDED:
|
|
|
+ SDL_Log("SDL EVENT: Camera device %" SDL_PRIu32 " available",
|
|
|
+ event->cdevice.which);
|
|
|
+ break;
|
|
|
+ case SDL_EVENT_CAMERA_DEVICE_REMOVED:
|
|
|
+ SDL_Log("SDL EVENT: Camera device %" SDL_PRIu32 " removed",
|
|
|
+ event->cdevice.which);
|
|
|
+ break;
|
|
|
+ case SDL_EVENT_CAMERA_DEVICE_APPROVED:
|
|
|
+ SDL_Log("SDL EVENT: Camera device %" SDL_PRIu32 " permission granted",
|
|
|
+ event->cdevice.which);
|
|
|
+ break;
|
|
|
+ case SDL_EVENT_CAMERA_DEVICE_DENIED:
|
|
|
+ SDL_Log("SDL EVENT: Camera device %" SDL_PRIu32 " permission denied",
|
|
|
+ event->cdevice.which);
|
|
|
+ break;
|
|
|
+ case SDL_EVENT_SENSOR_UPDATE:
|
|
|
+ SDL_Log("SDL EVENT: Sensor update for %" SDL_PRIu32,
|
|
|
+ event->sensor.which);
|
|
|
+ break;
|
|
|
+ case SDL_EVENT_PEN_PROXIMITY_IN:
|
|
|
+ SDL_Log("SDL EVENT: Pen %" SDL_PRIu32 " entered proximity",
|
|
|
+ event->pproximity.which);
|
|
|
+ break;
|
|
|
+ case SDL_EVENT_PEN_PROXIMITY_OUT:
|
|
|
+ SDL_Log("SDL EVENT: Pen %" SDL_PRIu32 " left proximity",
|
|
|
+ event->ptouch.which);
|
|
|
+ break;
|
|
|
+ case SDL_EVENT_PEN_DOWN:
|
|
|
+ SDL_Log("SDL EVENT: Pen %" SDL_PRIu32 " touched down at %g,%g",
|
|
|
+ event->ptouch.which, event->ptouch.x, event->ptouch.y);
|
|
|
+ break;
|
|
|
+ case SDL_EVENT_PEN_UP:
|
|
|
+ SDL_Log("SDL EVENT: Pen %" SDL_PRIu32 " lifted off at %g,%g",
|
|
|
+ event->ptouch.which, event->ptouch.x, event->ptouch.y);
|
|
|
+ break;
|
|
|
+ case SDL_EVENT_PEN_BUTTON_DOWN:
|
|
|
+ SDL_Log("SDL EVENT: Pen %" SDL_PRIu32 " button %d pressed at %g,%g",
|
|
|
+ event->pbutton.which, event->pbutton.button, event->pbutton.x, event->pbutton.y);
|
|
|
+ break;
|
|
|
+ case SDL_EVENT_PEN_BUTTON_UP:
|
|
|
+ SDL_Log("SDL EVENT: Pen %" SDL_PRIu32 " button %d released at %g,%g",
|
|
|
+ event->pbutton.which, event->pbutton.button, event->pbutton.x, event->pbutton.y);
|
|
|
+ break;
|
|
|
+ case SDL_EVENT_PEN_MOTION:
|
|
|
+ SDL_Log("SDL EVENT: Pen %" SDL_PRIu32 " moved to %g,%g",
|
|
|
+ event->pmotion.which, event->pmotion.x, event->pmotion.y);
|
|
|
+ break;
|
|
|
+ case SDL_EVENT_PEN_AXIS:
|
|
|
+ SDL_Log("SDL EVENT: Pen %" SDL_PRIu32 " axis %d changed to %.2f",
|
|
|
+ event->paxis.which, event->paxis.axis, event->paxis.value);
|
|
|
+ break;
|
|
|
+ case SDL_EVENT_LOCALE_CHANGED:
|
|
|
+ SDL_Log("SDL EVENT: Locale changed");
|
|
|
+ break;
|
|
|
case SDL_EVENT_QUIT:
|
|
|
SDL_Log("SDL EVENT: Quit requested");
|
|
|
break;
|
|
@@ -1930,7 +2018,7 @@ void SDLTest_PrintEvent(const SDL_Event *event)
|
|
|
SDL_Log("SDL EVENT: User event %" SDL_PRIs32, event->user.code);
|
|
|
break;
|
|
|
default:
|
|
|
- SDL_Log("Unknown event 0x%4.4" SDL_PRIu32, event->type);
|
|
|
+ SDL_Log("Unknown event 0x%4.4" SDL_PRIx32, event->type);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -2116,8 +2204,11 @@ SDL_AppResult SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const
|
|
|
int i;
|
|
|
|
|
|
if (state->verbose & VERBOSE_EVENT) {
|
|
|
- if (((event->type != SDL_EVENT_MOUSE_MOTION) &&
|
|
|
- (event->type != SDL_EVENT_FINGER_MOTION)) ||
|
|
|
+ if ((event->type != SDL_EVENT_MOUSE_MOTION &&
|
|
|
+ event->type != SDL_EVENT_FINGER_MOTION &&
|
|
|
+ event->type != SDL_EVENT_PEN_MOTION &&
|
|
|
+ event->type != SDL_EVENT_PEN_AXIS &&
|
|
|
+ event->type != SDL_EVENT_JOYSTICK_AXIS_MOTION) ||
|
|
|
(state->verbose & VERBOSE_MOTION)) {
|
|
|
SDLTest_PrintEvent(event);
|
|
|
}
|