bool Util::TDMIsRunning() { // Traverse the /proc folder, this sets the flag to TRUE if the process was found for (fs::directory_iterator i = fs::directory_iterator(PROC_FOLDER); i != fs::directory_iterator(); ++i) { if (CheckProcessFile(i->path().leaf().string(), TDM_PROCESS_NAME)) // grayman - looking for tdm now instead of doom3 { return true; } } return false; }
bool Util::DarkRadiantIsRunning() { // Traverse the /proc folder, this sets the flag to TRUE if the process was found for (fs::directory_iterator i = fs::directory_iterator(PROC_FOLDER); i != fs::directory_iterator(); ++i) { if (CheckProcessFile(i->path().leaf().string(), "darkradiant")) { return true; } } return false; }
bool Util::caesariaIsRunning() { // Traverse the /proc folder, this sets the flag to TRUE if the process was found vfs::Entries procs = vfs::Directory(systemProcFolder).entries(); foreach( i, procs ) { if( CheckProcessFile( i->name.toString(), caesariaProcessName) ) // grayman - looking for caesaria { return true; } } return false; }