mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Make dummy compile again, if SDL is explicitly set to 0
(cherry picked from commit ba55947ee6ab36efc04598953a78a11173103bcf) # Conflicts: # src/doomtype.h # src/dummy/i_system.c
This commit is contained in:
parent
e7b493723f
commit
59ea961f58
8 changed files with 28 additions and 16 deletions
|
|
@ -31,8 +31,8 @@
|
|||
# MINGW=1, MINGW64=1 - Windows (MinGW toolchain)
|
||||
# UNIX=1 - Generic Unix like system
|
||||
# FREEBSD=1
|
||||
# SDL=1 - Use SDL backend. SDL is the only backend though
|
||||
# and thus, always enabled.
|
||||
# SDL=1 - Use SDL backend. SDL is the only implemented backend though.
|
||||
# If disabled, a dummy backend will be used.
|
||||
#
|
||||
# A list of supported GCC versions can be found in
|
||||
# Makefile.d/detect.mk -- search 'gcc_versions'.
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ all_systems:=\
|
|||
UNIX\
|
||||
LINUX\
|
||||
FREEBSD\
|
||||
SDL\
|
||||
|
||||
# check for user specified system
|
||||
ifeq (,$(filter $(all_systems),$(.VARIABLES)))
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ opts+=-I/usr/X11R6/include
|
|||
libs+=-L/usr/X11R6/lib
|
||||
endif
|
||||
|
||||
SDL=1
|
||||
SDL?=1
|
||||
|
||||
# In common usage.
|
||||
ifdef LINUX
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@ ifdef UNIX
|
|||
include Makefile.d/nix.mk
|
||||
endif
|
||||
|
||||
ifdef SDL
|
||||
ifeq ($(SDL), 1)
|
||||
include Makefile.d/sdl.mk
|
||||
else
|
||||
include Makefile.d/dummy.mk
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ libs+=-ladvapi32 -lkernel32 -lmsvcrt -luser32
|
|||
|
||||
nasm_format:=win32
|
||||
|
||||
SDL=1
|
||||
SDL?=1
|
||||
|
||||
ifndef NOHW
|
||||
opts+=-DUSE_WGL_SWAP
|
||||
|
|
@ -83,6 +83,7 @@ else
|
|||
lib:=../libs/SDL2_mixer/$(mingw)
|
||||
endif
|
||||
|
||||
ifdef SDL2
|
||||
mixer_opts:=-I$(lib)/include/SDL2
|
||||
mixer_libs:=-L$(lib)/lib
|
||||
|
||||
|
|
@ -92,6 +93,7 @@ SDL_opts:=-I$(lib)/include/SDL2\
|
|||
SDL_libs:=-L$(lib)/lib $(mixer_libs)\
|
||||
-lmingw32 -lSDL2main -lSDL2 -mwindows
|
||||
$(eval $(call _set,SDL))
|
||||
endif
|
||||
|
||||
lib:=../libs/zlib
|
||||
ZLIB_opts:=-I$(lib)
|
||||
|
|
|
|||
5
src/dummy/Sourcefile
Normal file
5
src/dummy/Sourcefile
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
i_net.c
|
||||
i_system.c
|
||||
i_main.c
|
||||
i_video.c
|
||||
i_sound.c
|
||||
|
|
@ -139,29 +139,24 @@ boolean I_LoadSong(char *data, size_t len)
|
|||
|
||||
void I_UnloadSong(void)
|
||||
{
|
||||
(void)handle;
|
||||
}
|
||||
|
||||
boolean I_PlaySong(boolean looping)
|
||||
{
|
||||
(void)handle;
|
||||
(void)looping;
|
||||
return false;
|
||||
}
|
||||
|
||||
void I_StopSong(void)
|
||||
{
|
||||
(void)handle;
|
||||
}
|
||||
|
||||
void I_PauseSong(void)
|
||||
{
|
||||
(void)handle;
|
||||
}
|
||||
|
||||
void I_ResumeSong(void)
|
||||
{
|
||||
(void)handle;
|
||||
}
|
||||
|
||||
void I_SetMusicVolume(UINT8 volume)
|
||||
|
|
@ -188,18 +183,20 @@ void I_StopFadingSong(void)
|
|||
{
|
||||
}
|
||||
|
||||
boolean I_FadeSongFromVolume(UINT8 target_volume, UINT8 source_volume, UINT32 ms, void (*callback)(void));
|
||||
boolean I_FadeSongFromVolume(UINT8 target_volume, UINT8 source_volume, UINT32 ms, void (*callback)(void))
|
||||
{
|
||||
(void)target_volume;
|
||||
(void)source_volume;
|
||||
(void)ms;
|
||||
(void)callback;
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean I_FadeSong(UINT8 target_volume, UINT32 ms, void (*callback)(void));
|
||||
boolean I_FadeSong(UINT8 target_volume, UINT32 ms, void (*callback)(void))
|
||||
{
|
||||
(void)target_volume;
|
||||
(void)ms;
|
||||
(void)callback;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
#include "../doomdef.h"
|
||||
#include "../doomtype.h"
|
||||
#include "../i_system.h"
|
||||
|
||||
FILE *logstream = NULL;
|
||||
|
||||
UINT8 graphics_started = 0;
|
||||
|
||||
UINT8 keyboard_started = 0;
|
||||
|
|
@ -94,8 +97,6 @@ void I_StartupMouse(void){}
|
|||
|
||||
void I_StartupMouse2(void){}
|
||||
|
||||
void I_StartupKeyboard(void){}
|
||||
|
||||
INT32 I_GetKey(void)
|
||||
{
|
||||
return 0;
|
||||
|
|
@ -174,12 +175,18 @@ INT32 I_ClipboardCopy(const char *data, size_t size)
|
|||
return -1;
|
||||
}
|
||||
|
||||
char *I_ClipboardPaste(void)
|
||||
const char *I_ClipboardPaste(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void I_RegisterSysCommands(void) {}
|
||||
|
||||
void I_GetCursorPosition(INT32 *x, INT32 *y)
|
||||
{
|
||||
(void)x;
|
||||
(void)y;
|
||||
}
|
||||
|
||||
#include "../sdl/dosstr.c"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue