upgrade SDL to version 2.0.8
[platform/upstream/SDL.git] / test / testaudiohotplug.c
index 374cbb2..becd40d 100755 (executable)
@@ -86,7 +86,7 @@ iteration()
     SDL_Event e;
     SDL_AudioDeviceID dev;
     while (SDL_PollEvent(&e)) {
-        if (e.type == SDL_QUIT) {
+        if (e.type == SDL_QUIT || e.key.keysym.sym == 0) {
             done = 1;
         } else if (e.type == SDL_KEYUP) {
             if (e.key.keysym.sym == SDLK_ESCAPE)
@@ -132,7 +132,6 @@ loop()
         iteration();
 }
 #endif
-
 int
 main(int argc, char *argv[])
 {
@@ -154,7 +153,7 @@ main(int argc, char *argv[])
     if (argc > 1) {
         SDL_strlcpy(filename, argv[1], sizeof(filename));
     } else {
-        SDL_strlcpy(filename, "sample.wav", sizeof(filename));
+        SDL_strlcpy(filename, "./res/sample.wav", sizeof(filename));
     }
     /* Load the wave file into memory */
     if (SDL_LoadWAV(filename, &spec, &sound, &soundlen) == NULL) {