[AD] small exmidi improvement

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


While testing that midi bug report from allegro.cc, I noticed that
exmidi gets much nicer in windows with the attached patch (i.e. it
keeps playing the midi when not focused, so can be used as simple midi
player).
Index: examples/exmidi.c
===================================================================
RCS file: /cvsroot/alleg/allegro/examples/exmidi.c,v
retrieving revision 1.10
diff -u -p -r1.10 exmidi.c
--- examples/exmidi.c	31 Mar 2005 10:17:31 -0000	1.10
+++ examples/exmidi.c	25 Apr 2005 14:02:48 -0000
@@ -54,6 +54,10 @@ int main(int argc, char *argv[])
 	 return 1;
       }
    }
+   
+   /* try to continue in the background */
+   if (set_display_switch_mode(SWITCH_BACKGROUND))
+      set_display_switch_mode(SWITCH_BACKAMNESIA);
 
    set_palette(desktop_palette);
    background_color = makecol(255, 255, 255);


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/