summaryrefslogtreecommitdiff
path: root/src/instru2light.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/instru2light.c')
-rw-r--r--src/instru2light.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/instru2light.c b/src/instru2light.c
index 33892b5..a72fd0f 100644
--- a/src/instru2light.c
+++ b/src/instru2light.c
@@ -29,6 +29,8 @@ gint *audio_vumeter_val, *light_h, *light_s, *light_v, *light_r, *light_g, *ligh
void my_process(float *data, size_t nsamples, size_t nchan);
int main (int argc, char **argv) {
+ int dmx_init_res;
+
GtkWidget *mainwin;
gint vals_for_vumeters[7]={0,0,0,0,0,0,0}; //sound,h,s,v,r,g,b
//Some handy references to the previous array items to make things clear whenever possible
@@ -50,7 +52,7 @@ int main (int argc, char **argv) {
mainwin=win_main_build();
gtk_widget_show_all (mainwin);
- dmx_init();
+ dmx_init_res=dmx_init();
printf("debug : main my_process==%p\n", my_process);
printf("debug : main (void *)my_process==%p\n", (void *)my_process);
@@ -60,7 +62,8 @@ int main (int argc, char **argv) {
gtk_main ();
gdk_threads_leave();
- dmx_deinit();
+
+ if (dmx_init_res==0) dmx_deinit();
return 0;
}