Fixed crash in demo if no songs.

This commit is contained in:
Chris Danford
2003-01-19 21:05:03 +00:00
parent 2e10cb86df
commit d84e10f9d2
4 changed files with 23 additions and 5 deletions
+6
View File
@@ -199,10 +199,16 @@ static void BoostAppPri()
return;
}
#ifndef ABOVE_NORMAL_PRIORITY_CLASS
#define ABOVE_NORMAL_PRIORITY_CLASS 0x00008000
#endif
DWORD pri = HIGH_PRIORITY_CLASS;
if(version.dwMajorVersion >= 5)
pri = ABOVE_NORMAL_PRIORITY_CLASS;
#include <winbase.h>
/* Be sure to boost the app, not the thread, to make sure the
* sound thread stays higher priority than the main thread. */
SetPriorityClass(GetCurrentProcess(), pri);