@ -864,12 +864,14 @@ void Console::msleep (unsigned int msec)
usleep((msec % 1000000) * 1000);
}
void Console::hide()
bool Console::hide()
{
//Warmist: don't know if it's possible...
return false;
void Console::show()
bool Console::show()
@ -590,12 +590,14 @@ void Console::msleep (unsigned int msec)
Sleep(msec);
ShowWindow( GetConsoleWindow(), SW_HIDE );
return true;
ShowWindow( GetConsoleWindow(), SW_RESTORE );
@ -790,11 +790,21 @@ command_result Core::runCommand(color_ostream &con, const std::string &first, ve
else if(first=="hide")
getConsole().hide();
if (!getConsole().hide())
con.printerr("Could not hide console\n");
return CR_FAILURE;
return CR_OK;
else if(first=="show")
getConsole().show();
if (!getConsole().show())
con.printerr("Could not show console\n");
else
@ -158,8 +158,8 @@ namespace DFHack
bool is_console() { return true; }
void hide();
void show();
bool hide();
bool show();
private:
Private * d;
tthread::recursive_mutex * wlock;