DEADSOFTWARE

fix building with USE_SYSSTUB + USE_SDLMIXER
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Sun, 13 Oct 2019 15:30:18 +0000 (18:30 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Sun, 13 Oct 2019 15:30:18 +0000 (18:30 +0300)
src/engine/e_sound_sdl.inc
src/engine/e_texture.pas
src/game/Doom2DF.lpr
src/shared/a_modes.inc

index 175f4743f966649b11b87f20332213900945246d..9436cec6b42dee983b3ce2d5ae2aef01c68e5082 100644 (file)
@@ -16,7 +16,7 @@ interface
 
 uses
   {$IFDEF USE_MEMPOOL}mempool,{$ENDIF}
-  SDL2, SDL2_mixer,
+  SDL2, SDL2_mixer, envvars,
   e_log, SysUtils;
 
 type
index 580a6ccb55dd849b745c7a4ac66d78d6e01fe16d..3e578c8088d25b39612a400bded3946147606d2c 100644 (file)
@@ -102,6 +102,7 @@ begin
     Exit;
   end;
 
+  Texture := 0;
   glGenTextures(1, @Texture);
   tex.id := Texture;
   glBindTexture(GL_TEXTURE_2D, Texture);
index b5b7bae947b82277e1c9dd8a34eddf758cfac026..446518f02e16db6c01989c97d732d0b464e0f081 100644 (file)
@@ -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',
index 5fc22fa018c259b594338a0df0fa089adce3572b..68a06725be44bc6a09c866a23cc415a39205b2d6 100644 (file)
   {$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!}