| 42 | } |
| 43 | |
| 44 | void GuiMenu::executeCommand(std::string command) |
| 45 | { |
| 46 | if(command == "exit") |
| 47 | { |
| 48 | //push SDL quit event |
| 49 | SDL_Event* event = new SDL_Event(); |
| 50 | event->type = SDL_QUIT; |
| 51 | SDL_PushEvent(event); |
| 52 | }else if(command == "es_reload") |
| 53 | { |
| 54 | //reload the game list |
| 55 | SystemData::loadConfig(SystemData::getConfigPath(), false); |
| 56 | mParent->setSystemId(0); |
| 57 | }else if(command == "es_settings") |
| 58 | { |
| 59 | mWindow->pushGui(new GuiSettingsMenu(mWindow)); |
| 60 | delete this; |
| 61 | }else{ |
| 62 | if(system(command.c_str()) != 0) |
| 63 | { |
| 64 | LOG(LogWarning) << "(warning: command terminated with nonzero result!)"; |
| 65 | } |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | void GuiMenu::populateList() |
| 70 | { |
nothing calls this directly
no test coverage detected