Immediately minimize the goofy window in testaudiohotplug.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 19 Mar 2015 22:20:12 -0400
changeset 9402 bd133a872458
parent 9401 529007547fb6
child 9403 09e50e5fab64
Immediately minimize the goofy window in testaudiohotplug.
test/testaudiohotplug.c
--- a/test/testaudiohotplug.c	Thu Mar 19 22:11:20 2015 -0400
+++ b/test/testaudiohotplug.c	Thu Mar 19 22:20:12 2015 -0400
@@ -131,7 +131,8 @@
         return (1);
     }
 
-    SDL_CreateWindow("testaudiohotplug", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, 0);
+    /* Some targets (Mac CoreAudio) need an event queue for audio hotplug, so make and immediately hide a window. */
+    SDL_MinimizeWindow(SDL_CreateWindow("testaudiohotplug", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, 0));
 
     if (argc > 1) {
         SDL_strlcpy(filename, argv[1], sizeof(filename));