Update SDL to 2.0.18

This commit is contained in:
Alex Szpakowski
2021-12-03 18:40:24 -04:00
parent 8013eef9c5
commit 8ff9d249b2
1232 changed files with 136663 additions and 44780 deletions
+13 -3
View File
@@ -1,5 +1,5 @@
/*
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -86,6 +86,8 @@ print_modifiers(char **text, size_t *maxlen)
print_string(text, maxlen, " CAPS");
if (mod & KMOD_MODE)
print_string(text, maxlen, " MODE");
if (mod & KMOD_SCROLL)
print_string(text, maxlen, " SCROLL");
}
static void
@@ -135,9 +137,10 @@ PrintKey(SDL_Keysym * sym, SDL_bool pressed, SDL_bool repeat)
}
static void
PrintText(char *eventtype, char *text)
PrintText(const char *eventtype, const char *text)
{
char *spot, expanded[1024];
const char *spot;
char expanded[1024];
expanded[0] = '\0';
for ( spot = text; *spot; ++spot )
@@ -199,6 +202,7 @@ int
main(int argc, char *argv[])
{
SDL_Window *window;
SDL_Renderer *renderer;
/* Enable standard application logging */
SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
@@ -219,6 +223,12 @@ main(int argc, char *argv[])
quit(2);
}
/* On wayland, no window will actually show until something has
actually been displayed.
*/
renderer = SDL_CreateRenderer(window, -1, 0);
SDL_RenderPresent(renderer);
#if __IPHONEOS__
/* Creating the context creates the view, which we need to show keyboard */
SDL_GL_CreateContext(window);