fixed REALLY bad threading bugs with audio
[fishladder.git] / vg / vg.h
diff --git a/vg/vg.h b/vg/vg.h
index bd518c48bf6cea24de85413027c300f945f9b01c..33f177cedb5e210a691351551efe9bdae59e7c7b 100644 (file)
--- a/vg/vg.h
+++ b/vg/vg.h
@@ -47,6 +47,7 @@ float vg_time_delta;
 #include "vg/vg_tex.h"
 #include "vg/vg_input.h"
 #include "vg/vg_ui.h"
+#include "vg/vg_debug.h"
 
 #include "steam/steamworks_thin.h"
 
@@ -206,8 +207,6 @@ static void vg_init( int argc, char *argv[], const char *window_name )
                }
        }
        
-       vg_audio_init();
-       vg_register_exit( &vg_audio_free, "vg_audio_free" );
        vg_lines_init();
        vg_register_exit( &vg_lines_free, "vg_lines_free" );
        ui_default_init();
@@ -220,6 +219,9 @@ static void vg_init( int argc, char *argv[], const char *window_name )
        {
                vg_start();
        
+               vg_audio_init();
+               vg_register_exit( &vg_audio_free, "vg_audio_free" );
+       
                // Main gameloop
                while( !glfwWindowShouldClose( vg_window ) )
                {