MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / executeCommand

Method executeCommand

src/components/GuiMenu.cpp:44–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void 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
69void GuiMenu::populateList()
70{

Callers

nothing calls this directly

Calls 2

setSystemIdMethod · 0.80
pushGuiMethod · 0.80

Tested by

no test coverage detected