From 070915c688903880c053bc444cc7f161fdebd91d Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Fri, 3 Jan 2014 16:30:12 +0100 Subject: [PATCH] rnd-20140103-1-src --- Makefile | 3 +++ src/Makefile | 6 ++++++ src/conftime.h | 2 +- src/libgame/sdl.c | 2 -- src/libgame/sdl.h | 2 ++ 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e24743a5..00e7695b 100644 --- a/Makefile +++ b/Makefile @@ -90,6 +90,9 @@ mac: mac-static: @$(MAKE_CMD) PLATFORM=macosx TARGET=sdl-static +mac2-static: + @$(MAKE_CMD) PLATFORM=macosx TARGET=sdl2-static + msdos: @$(MAKE_CMD) PLATFORM=msdos diff --git a/src/Makefile b/src/Makefile index 018be6a5..ebe3091f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -120,6 +120,12 @@ SDL_LIBS = -lSDL_image -lSDL_mixer -lSDL_net -lsmpeg -lmikmod SYS_LDFLAGS = $(SDL_LIBS) $(shell sdl-config --static-libs) endif +ifeq ($(TARGET),sdl2-static) # compiling for SDL2 target (static) +SYS_CFLAGS = -DTARGET_SDL2 $(shell sdl2-config --cflags) +SDL_LIBS = -lSDL2_image -lSDL2_mixer -lSDL2_net -lsmpeg2 -lmikmod +SYS_LDFLAGS = $(SDL_LIBS) $(shell sdl2-config --static-libs) +endif + ifeq ($(TARGET),allegro) # compiling for Allegro target SYS_CFLAGS = -DTARGET_ALLEGRO -I$(CROSS_PATH_MSDOS)/include SYS_LDFLAGS = -lalleg diff --git a/src/conftime.h b/src/conftime.h index bb577629..2e16c2fc 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2013-12-28 23:17" +#define COMPILE_DATE_STRING "2014-01-01 20:20" diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index a72bdcc0..74148a4b 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -444,8 +444,6 @@ boolean SDLSetVideoMode(DrawBuffer **backbuffer, boolean fullscreen) 0xFF000000); #endif - printf("::: pitch == %d\n", new_surface->pitch); - if (new_surface == NULL) Error(ERR_WARN, "SDL_CreateRGBSurface() failed: %s", SDL_GetError()); diff --git a/src/libgame/sdl.h b/src/libgame/sdl.h index b228c009..6f130bb1 100644 --- a/src/libgame/sdl.h +++ b/src/libgame/sdl.h @@ -186,8 +186,10 @@ struct MouseCursorInfo #define KSYM_Page_Up SDLK_PAGEUP #define KSYM_Page_Down SDLK_PAGEDOWN +#if defined(TARGET_SDL2) #define KSYM_Menu SDLK_MENU #define KSYM_Back SDLK_AC_BACK +#endif #define KSYM_space SDLK_SPACE #define KSYM_exclam SDLK_EXCLAIM -- 2.34.1