bool SystemView::input(InputConfig* config, Input input) { if(input.value != 0) { if(config->getDeviceId() == DEVICE_KEYBOARD && input.value && input.id == SDLK_r && SDL_GetModState() & KMOD_LCTRL && Settings::getInstance()->getBool("Debug")) { LOG(LogInfo) << " Reloading SystemList view"; // reload themes for(auto it = mEntries.begin(); it != mEntries.end(); it++) it->object->loadTheme(); populate(); updateHelpPrompts(); return true; } if(config->isMappedTo("left", input)) { listInput(-1); return true; } if(config->isMappedTo("right", input)) { listInput(1); return true; } if(config->isMappedTo("a", input)) { stopScrolling(); SystemData *systemData = getSelected(); // decide whether to show game list or launch the command directly if ( !systemData->getDirectLaunch() ) { ViewController::get()->goToGameList(getSelected()); }else{ systemData->launchGame( mWindow, nullptr ); } return true; } }else{ if(config->isMappedTo("left", input) || config->isMappedTo("right", input)) listInput(0); } return GuiComponent::input(config, input); }
bool SystemView::input(InputConfig* config, Input input) { if(input.value != 0) { if(config->getDeviceId() == DEVICE_KEYBOARD && input.value && input.id == SDLK_r && SDL_GetModState() & KMOD_LCTRL && Settings::getInstance()->getBool("Debug")) { LOG(LogInfo) << " Reloading all"; ViewController::get()->reloadAll(); return true; } switch (mCarousel.type) { case VERTICAL: case VERTICAL_WHEEL: if (config->isMappedTo("up", input)) { listInput(-1); return true; } if (config->isMappedTo("down", input)) { listInput(1); return true; } break; case HORIZONTAL: case HORIZONTAL_WHEEL: default: if (config->isMappedTo("left", input)) { listInput(-1); return true; } if (config->isMappedTo("right", input)) { listInput(1); return true; } break; } if(config->isMappedTo("a", input)) { stopScrolling(); ViewController::get()->goToGameList(getSelected()); return true; } if (config->isMappedTo("x", input)) { // get random system // go to system setCursor(SystemData::getRandomSystem()); return true; } }else{ if(config->isMappedTo("left", input) || config->isMappedTo("right", input) || config->isMappedTo("up", input) || config->isMappedTo("down", input)) listInput(0); if(!UIModeController::getInstance()->isUIModeKid() && config->isMappedTo("select", input) && Settings::getInstance()->getBool("ScreenSaverControls")) { mWindow->startScreenSaver(); mWindow->renderScreenSaver(); return true; } } return GuiComponent::input(config, input); }