|
|
@ -1692,14 +1692,21 @@ bool Core::Init()
|
|
|
|
if (is_headless)
|
|
|
|
if (is_headless)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#ifdef LINUX_BUILD
|
|
|
|
#ifdef LINUX_BUILD
|
|
|
|
auto endwin = (int(*)(void))dlsym(RTLD_DEFAULT, "endwin");
|
|
|
|
if (is_text_mode)
|
|
|
|
if (endwin)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
endwin();
|
|
|
|
auto endwin = (int(*)(void))dlsym(RTLD_DEFAULT, "endwin");
|
|
|
|
|
|
|
|
if (endwin)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
endwin();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
cerr << "endwin(): bind failed" << endl;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cerr << "endwin(): bind failed" << endl;
|
|
|
|
cerr << "Headless mode requires PRINT_MODE:TEXT" << endl;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
cerr << "Headless mode not supported on Windows" << endl;
|
|
|
|
cerr << "Headless mode not supported on Windows" << endl;
|
|
|
|