Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduced KNULLI flag, hid some irrelevant menu options, added RGB sanity check #24

Open
wants to merge 1 commit into
base: knulli
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ option(BCM "BCM host" OFF)

option(BATOCERA "Set to ON to enable BATOCERA specific code" OFF)
option(RETROBAT "Set to ON to enable RETROBAT specific code" OFF)
option(KNULLI "Set to ON to enable KNULLI specific code" OFF)

option(ENABLE_FILEMANAGER "Set to ON to enable f1 shortcut for filesystem" OFF)
option(DISABLE_KODI "Set to ON to disable kodi in menu" OFF)
Expand Down Expand Up @@ -97,6 +98,11 @@ if(RETROBAT)
add_definitions(-DRETROBAT)
endif()

if(KNULLI)
MESSAGE("Knulli build")
add_definitions(-DKNULLI)
endif()

# disable kodi menu
if(DISABLE_KODI)
MESSAGE("Kodi disabled")
Expand Down
12 changes: 10 additions & 2 deletions es-app/src/guis/GuiMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,9 @@ GuiMenu::GuiMenu(Window *window, bool animate) : GuiComponent(window), mMenu(win
ApiSystem::getInstance()->isScriptingSupported(ApiSystem::UPGRADE))
addEntry(_("UPDATES & DOWNLOADS"), true, [this] { openUpdatesSettings(); }, "iconUpdates");

// Tools (Knulli-specific)
#ifdef KNULLI
addEntry(_("DEVICE SETTINGS"), true, [this] { openDeviceSettings(); }, "iconSystem");
#endif
addEntry(_("SYSTEM SETTINGS").c_str(), true, [this] { openSystemSettings(); }, "iconSystem");
}
else
Expand Down Expand Up @@ -1238,6 +1239,7 @@ void GuiMenu::openUpdatesSettings()
});
}

#ifndef KNULLI
if (ApiSystem::getInstance()->isScriptingSupported(ApiSystem::UPGRADE))
{
updateGui->addGroup(_("SOFTWARE UPDATES"));
Expand Down Expand Up @@ -1289,7 +1291,7 @@ void GuiMenu::openUpdatesSettings()
}
});
}

#endif
mWindow->pushGui(updateGui);
}

Expand Down Expand Up @@ -1673,6 +1675,7 @@ void GuiMenu::openSystemSettings()
}
});

#ifndef KNULLI
// splash
auto optionsSplash = std::make_shared<OptionListComponent<std::string> >(mWindow, _("BOOT SPLASH"), false);

Expand Down Expand Up @@ -1714,6 +1717,7 @@ void GuiMenu::openSystemSettings()
SystemConf::getInstance()->saveSystemConf();
}
});
#endif
#else
if (!ApiSystem::getInstance()->isScriptingSupported(ApiSystem::GAMESETTINGS))
{
Expand Down Expand Up @@ -1840,12 +1844,16 @@ void GuiMenu::openSystemSettings()
}

#ifdef BATOCERA
#ifndef KNULLI
s->addEntry(_("DMD"), true, [this] { openDmdSettings(); });
#endif
#endif

#ifdef BATOCERA
#ifndef KNULLI
s->addEntry(_("MULTISCREENS"), true, [this] { openMultiScreensSettings(); });
#endif
#endif

#ifdef BATOCERA
#ifdef X86_64
Expand Down
8 changes: 8 additions & 0 deletions es-app/src/guis/knulli/GuiRgbSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,25 @@ std::shared_ptr<OptionListComponent<std::string>> GuiRgbSettings::createModeOpti
optionsLedMode->add(_("NONE"), "0", selectedLedMode == "0");
if (isH700 || isA133) {
optionsLedMode->add(_("STATIC"), "1", selectedLedMode == "1");
} else if (selectedLedMode == "1") {
selectedLedMode = DEFAULT_LED_MODE;
}
if (isH700) {
optionsLedMode->add(_("BREATHING (FAST)"), "2", selectedLedMode == "2");
} else if (selectedLedMode == "2") {
selectedLedMode = DEFAULT_LED_MODE;
}
if (isH700 || isA133) {
optionsLedMode->add(_("BREATHING (MEDIUM)"), "3", selectedLedMode == "3");
} else if (selectedLedMode == "3") {
selectedLedMode = DEFAULT_LED_MODE;
}
if (isH700) {
optionsLedMode->add(_("BREATHING (SLOW)"), "4", selectedLedMode == "4");
optionsLedMode->add(_("SINGLE RAINBOW"), "5", selectedLedMode == "5");
optionsLedMode->add(_("MULTI RAINBOW"), "6", selectedLedMode == "6");
} else if (selectedLedMode == "4" || selectedLedMode == "5" || selectedLedMode == "6") {
selectedLedMode = DEFAULT_LED_MODE;
}

addWithDescription(_("MODE"), _("Set the default LED animation. (Not all of the settings below are applicable to every mode.)"), optionsLedMode);
Expand Down