enable to build WIN32CROSS=1 API=sdl2

This commit is contained in:
Thomas Bernard 2019-01-22 12:09:17 +01:00
parent 7a2aa2811f
commit 5377b8c9fe
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C
2 changed files with 9 additions and 1 deletions

View File

@ -452,6 +452,7 @@ endif
CROSS_CC ?= $(shell which i686-w64-mingw32-gcc || which mingw32-gcc)
CROSS_PKGCONFIG ?= $(shell which i686-w64-mingw32-pkg-config || which mingw32-pkg-config || which $(PKG_CONFIG))
CROSS_SDLCONFIG ?= $(shell which ../3rdparty/usr/bin/sdl-config || which /usr/local/cross-tools/i386-mingw32/bin/sdl-config)
CROSS_SDL2CONFIG ?= $(shell which ../3rdparty/usr/bin/sdl2-config || which /usr/local/cross-tools/i386-mingw32/bin/sdl2-config)
CROSS_PKG_CONFIG_PATH ?= $(shell if [ -d ../3rdparty/usr ] ; then echo "$${PWD}/../3rdparty/usr/lib/pkgconfig" ; fi )
CC = $(CROSS_CC)
CROSS_STRIP ?= $(shell which i686-w64-mingw32-strip || which mingw32-strip)
@ -463,6 +464,10 @@ endif
COPT += -Dmain=SDL_main $(shell $(CROSS_SDLCONFIG) --cflags)
LOPT += -lSDLmain -lSDL $(shell $(CROSS_SDLCONFIG) --libs) -lSDL_image
endif
ifeq ($(API),sdl2)
COPT += $(shell $(CROSS_SDL2CONFIG) --cflags)
LOPT += $(shell $(CROSS_SDL2CONFIG) --libs) -lSDL2_image
endif
ifeq (,$(CROSS_PKGCONFIG))
COPT += -D__no_pnglib__ -D__no_tifflib__
else
@ -481,6 +486,9 @@ endif
ifeq ($(API),sdl)
PLATFORMFILES += bin/SDL.dll bin/SDL_image.dll
endif
ifeq ($(API),sdl2)
PLATFORMFILES += bin/SDL2.dll bin/SDL2_image.dll
endif
else
ifdef GP2XCROSS
#cross compile an exec for the gp2x

View File

@ -1374,7 +1374,7 @@ int Get_input(int sleep_time)
#endif
case SDL_SYSWMEVENT:
#ifdef __WIN32__
#if defined(USE_SDL) && defined(__WIN32__)
if(event.syswm.msg->msg == WM_DROPFILES)
{
int file_count;