wasapi: Patched to compile on C89 systems, and use SDL_ceilf instead of ceilf.
2 Copyright (C) 2013 Apoorv Upreti <apoorvupreti@gmail.com>
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
12 /* Quits, hangs or crashes based on the command line options passed. */
17 static SDLTest_CommonState *state;
20 static SDL_bool crash;
23 main(int argc, char** argv)
28 state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);
32 state->window_flags |= SDL_WINDOW_RESIZABLE;
38 for(i = 1; i < argc; )
41 consumed = SDLTest_CommonArg(state, i);
45 if(SDL_strcasecmp(argv[i], "--exit-code") == 0)
49 exit_code = SDL_atoi(argv[i + 1]);
53 else if(SDL_strcasecmp(argv[i], "--hang") == 0)
58 else if(SDL_strcasecmp(argv[i], "--crash") == 0)
67 static const char *options = { "[--exit-code N]", "[--crash]", "[--hang]", NULL };
68 SDLTest_CommonLogUsage(state, argv[0], options);
69 SDLTest_CommonQuit(state);
75 if(!SDLTest_CommonInit(state))
77 SDLTest_CommonQuit(state);
81 /* infinite loop to hang the process */
85 /* dereference NULL pointer to crash process */
96 while(SDL_PollEvent(&event))
97 SDLTest_CommonEvent(state, &event, &done);