Add missing VS2012 test projects; update VS2010 and VS2012 solutions; update keybord suite for VS compiler warnings
2 Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
13 /* Simple test of the SDL threading code */
20 #include "SDL_thread.h"
24 /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
33 ThreadFunc(void *data)
35 printf("Started thread %s: My thread id is %lu\n",
36 (char *) data, SDL_ThreadID());
38 printf("Thread '%s' is alive!\n", (char *) data);
41 printf("Thread '%s' exiting!\n", (char *) data);
48 printf("Killed with SIGTERM, waiting 5 seconds to exit\n");
55 main(int argc, char *argv[])
59 /* Load the SDL library */
60 if (SDL_Init(0) < 0) {
61 fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
66 thread = SDL_CreateThread(ThreadFunc, "One", "#1");
68 fprintf(stderr, "Couldn't create thread: %s\n", SDL_GetError());
72 printf("Waiting for thread #1\n");
74 SDL_WaitThread(thread, NULL);
77 signal(SIGTERM, killed);
78 thread = SDL_CreateThread(ThreadFunc, "Two", "#2");
80 fprintf(stderr, "Couldn't create thread: %s\n", SDL_GetError());
85 SDL_Quit(); /* Never reached */
86 return (0); /* Never reached */