[AD] small exmidi improvement |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: [AD] small exmidi improvement
- From: Elias Pschernig <allefant@xxxxxxxxxx>
- Date: Mon, 25 Apr 2005 16:22:16 +0200
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type; b=Cv+vFPcDvlmllZha9BzX6DI2HuXYBX5Cmmc/mjc0j1i8gZMBdhCO+uTsxdpwpkOIvdG7o/tN4Wxy7xWIYOKNXLuuR4pCfCtBf62RcP7V5hCh/cIiSIz2D4MVO77mVskBsN+i4deroeMcO2nx1VvIaKiVeAsGc1JbFKOy/6muJew=
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);