mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-16 09:48:26 +00:00
testnative: print events with --info event
This commit is contained in:
parent
6f6f4fbfd3
commit
ef6521aee7
3 changed files with 34 additions and 3 deletions
|
@ -615,6 +615,22 @@ int SDLTest_CommonArg(SDLTest_CommonState *state, int index)
|
|||
state->hide_cursor = SDL_TRUE;
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
if (SDL_strcasecmp(argv[index], "--info") == 0) {
|
||||
++index;
|
||||
if (!argv[index]) {
|
||||
return -1;
|
||||
}
|
||||
if (SDL_strcasecmp(argv[index], "all") == 0) {
|
||||
state->verbose |= VERBOSE_EVENT;
|
||||
return 2;
|
||||
}
|
||||
if (SDL_strcasecmp(argv[index], "event") == 0) {
|
||||
state->verbose |= VERBOSE_EVENT;
|
||||
return 2;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (state->flags & SDL_INIT_AUDIO) {
|
||||
|
@ -1555,7 +1571,7 @@ static const char *GamepadButtonName(const SDL_GamepadButton button)
|
|||
}
|
||||
}
|
||||
|
||||
static void SDLTest_PrintEvent(const SDL_Event *event)
|
||||
void SDLTest_PrintEvent(const SDL_Event *event)
|
||||
{
|
||||
switch (event->type) {
|
||||
case SDL_EVENT_SYSTEM_THEME_CHANGED:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue