mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-01 06:44:27 +08:00
Removed test binding for space key
This pops up at the most inconvenient times, and space is handy for other functions in various test programs.
This commit is contained in:
@@ -2013,7 +2013,6 @@ static void FullscreenTo(SDLTest_CommonState *state, int index, int windowId)
|
|||||||
void SDLTest_CommonEvent(SDLTest_CommonState *state, SDL_Event *event, int *done)
|
void SDLTest_CommonEvent(SDLTest_CommonState *state, SDL_Event *event, int *done)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
static SDL_MouseMotionEvent lastEvent;
|
|
||||||
|
|
||||||
if (state->verbose & VERBOSE_EVENT) {
|
if (state->verbose & VERBOSE_EVENT) {
|
||||||
if (((event->type != SDL_EVENT_MOUSE_MOTION) &&
|
if (((event->type != SDL_EVENT_MOUSE_MOTION) &&
|
||||||
@@ -2390,16 +2389,6 @@ void SDLTest_CommonEvent(SDLTest_CommonState *state, SDL_Event *event, int *done
|
|||||||
case SDLK_ESCAPE:
|
case SDLK_ESCAPE:
|
||||||
*done = 1;
|
*done = 1;
|
||||||
break;
|
break;
|
||||||
case SDLK_SPACE:
|
|
||||||
{
|
|
||||||
char message[256];
|
|
||||||
SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
|
|
||||||
|
|
||||||
(void)SDL_snprintf(message, sizeof(message), "(%g, %g), rel (%g, %g)\n",
|
|
||||||
lastEvent.x, lastEvent.y, lastEvent.xrel, lastEvent.yrel);
|
|
||||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_INFORMATION, "Last mouse position", message, window);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2408,9 +2397,6 @@ void SDLTest_CommonEvent(SDLTest_CommonState *state, SDL_Event *event, int *done
|
|||||||
case SDL_EVENT_QUIT:
|
case SDL_EVENT_QUIT:
|
||||||
*done = 1;
|
*done = 1;
|
||||||
break;
|
break;
|
||||||
case SDL_EVENT_MOUSE_MOTION:
|
|
||||||
lastEvent = event->motion;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SDL_EVENT_DROP_FILE:
|
case SDL_EVENT_DROP_FILE:
|
||||||
case SDL_EVENT_DROP_TEXT:
|
case SDL_EVENT_DROP_TEXT:
|
||||||
|
|||||||
Reference in New Issue
Block a user