fix msvc build

svn path=/trunk/; revision=38664
This commit is contained in:
Christoph von Wittich 2009-01-09 14:38:59 +00:00
parent bd89b2d7b5
commit 12e91a347c
2 changed files with 17 additions and 8 deletions

View file

@ -2,6 +2,7 @@
#include <stdio.h>
#include <stdarg.h>
#include <windows.h>
void logmsg(char* string, ...)
{
@ -9,11 +10,19 @@ void logmsg(char* string, ...)
FILE* debug_file = fopen("c:\\audiosrv-debug.txt", "a");
va_start(args, string);
vfprintf(debug_file, string, args);
va_end(args);
fclose(debug_file);
if (debug_file)
{
va_start(args, string);
vfprintf(debug_file, string, args);
va_end(args);
fclose(debug_file);
}
else
{
char buf[256];
va_start(args, string);
vsprintf(buf, string, args);
OutputDebugStringA(buf);
va_end(args);
}
}

View file

@ -35,7 +35,7 @@ typedef struct
DWORD size; /* Size of the shared mem */
DWORD max_size; /* Amount of mem available */
DWORD device_count; /* Number of devices */
PnP_AudioDevice first_device[];
PnP_AudioDevice *first_device;
} PnP_AudioHeader;