early-access version 2281
This commit is contained in:
14
externals/SDL/test/checkkeys.c
vendored
14
externals/SDL/test/checkkeys.c
vendored
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user