From 9dca47bd3c931ac2de19aa738124ba843072c2b6 Mon Sep 17 00:00:00 2001 From: DeaDDooMER Date: Sun, 13 Oct 2019 18:30:18 +0300 Subject: [PATCH] fix building with USE_SYSSTUB + USE_SDLMIXER --- src/engine/e_sound_sdl.inc | 2 +- src/engine/e_texture.pas | 1 + src/game/Doom2DF.lpr | 9 +++++++++ src/shared/a_modes.inc | 3 +++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/engine/e_sound_sdl.inc b/src/engine/e_sound_sdl.inc index 175f474..9436cec 100644 --- a/src/engine/e_sound_sdl.inc +++ b/src/engine/e_sound_sdl.inc @@ -16,7 +16,7 @@ interface uses {$IFDEF USE_MEMPOOL}mempool,{$ENDIF} - SDL2, SDL2_mixer, + SDL2, SDL2_mixer, envvars, e_log, SysUtils; type diff --git a/src/engine/e_texture.pas b/src/engine/e_texture.pas index 580a6cc..3e578c8 100644 --- a/src/engine/e_texture.pas +++ b/src/engine/e_texture.pas @@ -102,6 +102,7 @@ begin Exit; end; + Texture := 0; glGenTextures(1, @Texture); tex.id := Texture; glBindTexture(GL_TEXTURE_2D, Texture); diff --git a/src/game/Doom2DF.lpr b/src/game/Doom2DF.lpr index b5b7bae..446518f 100644 --- a/src/game/Doom2DF.lpr +++ b/src/game/Doom2DF.lpr @@ -42,6 +42,9 @@ uses {$IFDEF USE_SDL} SDL, + {$IFDEF USE_SDLMIXER} + SDL_mixer, + {$ENDIF} {$ENDIF} {$IFDEF USE_SDL2} SDL2 in '../lib/sdl2/sdl2.pas', @@ -49,6 +52,12 @@ uses SDL2_mixer in '../lib/sdl2/SDL2_mixer.pas', {$ENDIF} {$ENDIF} +{$IFDEF USE_SYSSTUB} + {$IFDEF USE_SDLMIXER} + SDL2 in '../lib/sdl2/sdl2.pas', + SDL2_mixer in '../lib/sdl2/SDL2_mixer.pas', + {$ENDIF} +{$ENDIF} {$IFDEF USE_OPENAL} AL in '../lib/openal/al.pas', diff --git a/src/shared/a_modes.inc b/src/shared/a_modes.inc index 5fc22fa..68a0672 100644 --- a/src/shared/a_modes.inc +++ b/src/shared/a_modes.inc @@ -112,6 +112,9 @@ {$IF DEFINED(USE_SYSSTUB) OR DEFINED(USE_SDL2)} {$ERROR Only one system driver must be selected!} {$ENDIF} + {$IFDEF USE_SDLMIXER} + {$ERROR SDL_mixer not supported with SDL 1.2.x} + {$ENDIF} {$ELSEIF DEFINED(USE_SDL2)} {$IF DEFINED(USE_SYSSTUB) OR DEFINED(USE_SDL)} {$ERROR Only one system driver must be selected!} -- 2.29.2