headless: Disable sound, wgetch

develop
lethosor 2018-02-04 00:17:46 -05:00
parent 638f0ab35a
commit a5cca75715
2 changed files with 5 additions and 0 deletions

@ -88,6 +88,10 @@ DFhackCExport int SDL_PollEvent(SDL::Event* event)
struct WINDOW;
DFhackCExport int wgetch(WINDOW *win)
{
if (getenv("DFHACK_HEADLESS"))
{
return 0;
}
static int (*_wgetch)(WINDOW * win) = (int (*)( WINDOW * )) dlsym(RTLD_NEXT, "wgetch");
if(!_wgetch)
{

@ -34,6 +34,7 @@ tar xf "$tardest" --strip-components=1
echo Changing settings
echo '' >> "$DF_FOLDER/data/init/init.txt"
echo '[PRINT_MODE:TEXT]' >> "$DF_FOLDER/data/init/init.txt"
echo '[SOUND:NO]' >> "$DF_FOLDER/data/init/init.txt"
echo Done
echo "$selfmd5" > receipt