X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fengine%2Fe_sound_sdl.inc;h=9436cec6b42dee983b3ce2d5ae2aef01c68e5082;hb=b6ecb2b61416583271dd444965bacb2688fef370;hp=eb42c8bfea70d0374e304fe7546847db33d60b49;hpb=5ec745243230db4b74820b894755e9f1eab0da4c;p=d2df-sdl.git diff --git a/src/engine/e_sound_sdl.inc b/src/engine/e_sound_sdl.inc index eb42c8b..9436cec 100644 --- a/src/engine/e_sound_sdl.inc +++ b/src/engine/e_sound_sdl.inc @@ -2,8 +2,7 @@ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * the Free Software Foundation, version 3 of the License ONLY. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -16,11 +15,9 @@ interface uses - sdl2, - SDL2_mixer, {$IFDEF USE_MEMPOOL}mempool,{$ENDIF} - e_log, - SysUtils; + SDL2, SDL2_mixer, envvars, + e_log, SysUtils; type TSoundRec = record @@ -181,6 +178,11 @@ begin Result := False; SoundInitialized := False; + {$IFDEF HEADLESS} + // HACK: shit this into env and hope for the best + SetEnvVar('SDL_AUDIODRIVER', 'dummy'); + {$ENDIF} + if NoOutput then begin Result := true; Exit end; // wow, this is actually MIDI player!