MSVC and Windows SDK compatibility

This commit is contained in:
David Hrdlička
2020-04-04 12:45:47 +02:00
parent 8bcacb1a59
commit 9acb489a1d
20 changed files with 68 additions and 37 deletions

View File

@@ -641,7 +641,8 @@ void adgold_timer_poll(void *p)
static void adgold_get_buffer(int32_t *buffer, int len, void *p)
{
adgold_t *adgold = (adgold_t *)p;
int16_t adgold_buffer[len*2];
int16_t* adgold_buffer = malloc(sizeof(int16_t) * len * 2);
if (adgold_buffer == NULL) fatal("adgold_buffer = NULL");
int c;
@@ -747,6 +748,8 @@ static void adgold_get_buffer(int32_t *buffer, int len, void *p)
adgold->opl.pos = 0;
adgold->pos = 0;
free(adgold_buffer);
}

View File

@@ -3,6 +3,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#define _USE_MATH_DEFINES
#include <math.h>
#define HAVE_STDARG_H
#include <86box/86box.h>

View File

@@ -5,6 +5,7 @@
#include <string.h>
#include <stdlib.h>
#include <wchar.h>
#define _USE_MATH_DEFINES
#include <math.h>
#define HAVE_STDARG_H
#include <86box/86box.h>

View File

@@ -4,6 +4,7 @@
486-50 - 32kHz
Pentium - 45kHz*/
#define _USE_MATH_DEFINES
#include <math.h>
#include <stdarg.h>
#include <stdint.h>