mirror of https://github.com/mgba-emu/mgba.git
All: Several MSVC build fixes
This commit is contained in:
parent
f28d9d96a1
commit
c689e32856
|
@ -6,6 +6,10 @@
|
|||
#ifndef QGBA_DISPLAY
|
||||
#define QGBA_DISPLAY
|
||||
|
||||
extern "C" {
|
||||
#include "util/common.h"
|
||||
}
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include "MessagePainter.h"
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include "ui_PaletteView.h"
|
||||
|
||||
class GameController;
|
||||
|
||||
namespace QGBA {
|
||||
|
||||
class Swatch;
|
||||
|
|
|
@ -23,15 +23,22 @@
|
|||
|
||||
#include "version.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
// WinSock2 gets very angry if it's included too late
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#include <Windows.h>
|
||||
#include <sys/types.h>
|
||||
typedef intptr_t ssize_t;
|
||||
#define inline __inline
|
||||
#define PATH_MAX MAX_PATH
|
||||
#define restrict __restrict
|
||||
#define strcasecmp _stricmp
|
||||
#define strncasecmp _strnicmp
|
||||
#define ftruncate _chsize
|
||||
#define snprintf _snprintf
|
||||
#define strdup _strdup
|
||||
#define lseek _lseek
|
||||
#elif defined(__wii__)
|
||||
typedef intptr_t ssize_t;
|
||||
#else
|
||||
|
|
|
@ -158,7 +158,8 @@ struct NoIntroDB* NoIntroDBLoad(struct VFile* vf) {
|
|||
struct {
|
||||
char* key;
|
||||
struct NoIntroItem* item;
|
||||
} keyStack[KEY_STACK_SIZE] = {};
|
||||
} keyStack[KEY_STACK_SIZE];
|
||||
memset(keyStack, 0, sizeof(keyStack));
|
||||
struct Table* parent = 0;
|
||||
|
||||
size_t stackDepth = 0;
|
||||
|
|
|
@ -8,12 +8,11 @@
|
|||
|
||||
#include "util/common.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && !defined(restrict)
|
||||
#define restrict __restrict__
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
|
||||
#define SOCKET_FAILED(s) ((s) == INVALID_SOCKET)
|
||||
|
|
Loading…
Reference in New Issue