diff --git a/Makefile.win32 b/Makefile.win32 index d55f526fb6..556d6b7142 100644 --- a/Makefile.win32 +++ b/Makefile.win32 @@ -1,13 +1,12 @@ TARGET = ssnes.exe JTARGET = ssnes-joyconfig.exe -OBJ = ssnes.o file.o driver.o conf/config_file.o settings.o dynamic.o message.o rewind.o movie.o autosave.o gfx/gfx_common.o bps.o ups.o strl.o screenshot.o +OBJ = ssnes.o file.o driver.o conf/config_file.o settings.o dynamic.o message.o rewind.o movie.o autosave.o gfx/gfx_common.o bps.o ups.o strl.o screenshot.o audio/hermite.o JOBJ = conf/config_file.o tools/main-stub.o tools/ssnes-joyconfig.o CC = gcc CXX = g++ HAVE_DINPUT = 1 -HAVE_SRC = 0 HAVE_SDL = 1 HAVE_SDL_IMAGE = 1 HAVE_XML = 1 @@ -27,17 +26,9 @@ LIBS = -lm DEFINES = -I. -DHAVE_CONFIGFILE LDFLAGS = -L. -static-libgcc -s -SRC_LIBS = -lsamplerate-0 SDL_LIBS = -lSDL SDL_CFLAGS = -ISDL -ifeq ($(HAVE_SRC), 1) - LIBS += $(SRC_LIBS) - DEFINES += $(SRC_CFLAGS) -DHAVE_SRC -else - OBJ += audio/hermite.o -endif - ifeq ($(HAVE_SDL), 1) OBJ += gfx/sdl.o gfx/gl.o input/sdl.o audio/sdl.o fifo_buffer.o LIBS += $(SDL_LIBS) -lopengl32 diff --git a/Makefile.win64 b/Makefile.win64 index e08446616e..ef6b8095ca 100644 --- a/Makefile.win64 +++ b/Makefile.win64 @@ -1,13 +1,12 @@ TARGET = ssnes.exe JTARGET = ssnes-joyconfig.exe -OBJ = ssnes.o file.o driver.o conf/config_file.o settings.o dynamic.o message.o rewind.o movie.o autosave.o gfx/gfx_common.o bps.o ups.o strl.o screenshot.o +OBJ = ssnes.o file.o driver.o conf/config_file.o settings.o dynamic.o message.o rewind.o movie.o autosave.o gfx/gfx_common.o bps.o ups.o strl.o screenshot.o audio/hermite.o JOBJ = conf/config_file.o tools/main-stub.o tools/ssnes-joyconfig.o CC = gcc CXX = g++ HAVE_DINPUT = 1 -HAVE_SRC = 0 HAVE_SDL = 1 HAVE_XML = 0 HAVE_FREETYPE = 0 @@ -25,17 +24,9 @@ LIBS = -lm DEFINES = -I. -DHAVE_CONFIGFILE LDFLAGS = -L. -static-libgcc -s -SRC_LIBS = -lsamplerate-0 -SDL_LIBS = -lmingw32 -lSDL -lSDLmain -lwinmm -mwindows -lm -luser32 -lgdi32 -lwinmm -ldxguid +SDL_LIBS = -lSDL SDL_CFLAGS = -ISDL -ifeq ($(HAVE_SRC), 1) - LIBS += $(SRC_LIBS) - DEFINES += $(SRC_CFLAGS) -DHAVE_SRC -else - OBJ += audio/hermite.o -endif - ifeq ($(HAVE_SDL), 1) OBJ += gfx/sdl.o gfx/gl.o input/sdl.o audio/sdl.o fifo_buffer.o LIBS += $(SDL_LIBS) -lopengl32 diff --git a/input/dinput.c b/input/dinput.c index c7377c38fd..4370ce6e66 100644 --- a/input/dinput.c +++ b/input/dinput.c @@ -15,10 +15,10 @@ * If not, see . */ +#include "ssnes_dinput.h" #include "SDL.h" #include "SDL_syswm.h" #include -#include "ssnes_dinput.h" #include #include #include @@ -45,7 +45,7 @@ void sdl_dinput_free(sdl_dinput_t *di) static BOOL CALLBACK enum_axes_cb(const DIDEVICEOBJECTINSTANCE *inst, void *p) { - IDirectInputDevice8 *joypad = p; + LPDIRECTINPUTDEVICE8 joypad = p; DIPROPRANGE range; memset(&range, 0, sizeof(range)); diff --git a/input/ssnes_dinput.h b/input/ssnes_dinput.h index 57411bffff..662be9f48e 100644 --- a/input/ssnes_dinput.h +++ b/input/ssnes_dinput.h @@ -30,8 +30,8 @@ typedef struct sdl_dinput { HWND hWnd; - IDirectInput8 *ctx; - IDirectInputDevice8 *joypad[MAX_PLAYERS]; + LPDIRECTINPUT8 ctx; + LPDIRECTINPUTDEVICE8 joypad[MAX_PLAYERS]; unsigned joypad_cnt; DIJOYSTATE2 joy_state[MAX_PLAYERS]; } sdl_dinput_t; diff --git a/netplay.c b/netplay.c index e581bafd2f..3430996b14 100644 --- a/netplay.c +++ b/netplay.c @@ -25,10 +25,12 @@ #include #ifdef _WIN32 +#ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 +#endif #define WIN32_LEAN_AND_MEAN -#include #include +#include #include // Woohoo, Winsock has headers from the STONE AGE! :D #define close(x) closesocket(x)