Update SDL to the latest source code (2.0.9 + e1e13e154128)

This commit is contained in:
Alex Szpakowski
2018-12-31 16:11:13 -04:00
parent 45dbeb26c3
commit 0c10f91bf8
481 changed files with 111284 additions and 21729 deletions
+45 -2
View File
@@ -999,7 +999,7 @@ SDLTest_CommonInit(SDLTest_CommonState * state)
}
if (state->logical_w && state->logical_h) {
SDL_RenderSetLogicalSize(state->renderers[i], state->logical_w, state->logical_h);
} else if (state->scale) {
} else if (state->scale != 0.) {
SDL_RenderSetScale(state->renderers[i], state->scale, state->scale);
}
if (state->verbose & VERBOSE_RENDER) {
@@ -1048,6 +1048,22 @@ SDLTest_CommonInit(SDLTest_CommonState * state)
return SDL_TRUE;
}
static const char *
DisplayOrientationName(int orientation)
{
switch (orientation)
{
#define CASE(X) case SDL_ORIENTATION_##X: return #X
CASE(UNKNOWN);
CASE(LANDSCAPE);
CASE(LANDSCAPE_FLIPPED);
CASE(PORTRAIT);
CASE(PORTRAIT_FLIPPED);
#undef CASE
default: return "???";
}
}
static const char *
ControllerAxisName(const SDL_GameControllerAxis axis)
{
@@ -1102,6 +1118,17 @@ SDLTest_PrintEvent(SDL_Event * event)
}
switch (event->type) {
case SDL_DISPLAYEVENT:
switch (event->display.event) {
case SDL_DISPLAYEVENT_ORIENTATION:
SDL_Log("SDL EVENT: Display %d changed orientation to %s", event->display.display, DisplayOrientationName(event->display.data1));
break;
default:
SDL_Log("SDL EVENT: Display %d got unknown event 0x%4.4x",
event->display.display, event->display.event);
break;
}
break;
case SDL_WINDOWEVENT:
switch (event->window.event) {
case SDL_WINDOWEVENT_SHOWN:
@@ -1349,7 +1376,18 @@ SDLTest_PrintEvent(SDL_Event * event)
case SDL_APP_DIDENTERFOREGROUND:
SDL_Log("SDL EVENT: App entered the foreground");
break;
case SDL_DROPBEGIN:
SDL_Log("SDL EVENT: Drag and drop beginning");
break;
case SDL_DROPFILE:
SDL_Log("SDL EVENT: Drag and drop file: '%s'", event->drop.file);
break;
case SDL_DROPTEXT:
SDL_Log("SDL EVENT: Drag and drop text: '%s'", event->drop.file);
break;
case SDL_DROPCOMPLETE:
SDL_Log("SDL EVENT: Drag and drop ending");
break;
case SDL_QUIT:
SDL_Log("SDL EVENT: Quit requested");
break;
@@ -1744,6 +1782,11 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done)
case SDL_MOUSEMOTION:
lastEvent = event->motion;
break;
case SDL_DROPFILE:
case SDL_DROPTEXT:
SDL_free(event->drop.file);
break;
}
}
+3
View File
@@ -206,6 +206,9 @@ SDLTest_SetTestTimeout(int timeout, void (*callback)())
/**
* \brief Timeout handler. Aborts test run and exits harness process.
*/
#if defined(__WATCOMC__)
#pragma aux SDLTest_BailOut aborts;
#endif
static SDL_NORETURN void
SDLTest_BailOut()
{
+1 -1
View File
@@ -109,7 +109,7 @@ static void SDL_TrackAllocation(void *mem, size_t size)
entry->stack[stack_index] = pc;
if (unw_get_proc_name(&cursor, sym, sizeof(sym), &offset) == 0) {
snprintf(entry->stack_names[stack_index], sizeof(entry->stack_names[stack_index]), "%s+0x%llx", sym, offset);
snprintf(entry->stack_names[stack_index], sizeof(entry->stack_names[stack_index]), "%s+0x%llx", sym, (unsigned long long)offset);
}
++stack_index;