mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
glcd: re-add driver selection
Origin commit data
------------------
Branch: ni/coolstream
Commit: 8605be5228
Author: vanhofen <vanhofen@gmx.de>
Date: 2020-06-22 (Mon, 22 Jun 2020)
Origin message was:
------------------
- glcd: re-add driver selection
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -786,7 +786,11 @@ void cGLCD::Run(void)
|
||||
break;
|
||||
|
||||
int warmUp = 10;
|
||||
lcd = GLCD::CreateDriver(GLCD::Config.driverConfigs[0].id, &GLCD::Config.driverConfigs[0]);
|
||||
|
||||
if ((g_settings.glcd_selected_config < 0) || (g_settings.glcd_selected_config > GetConfigSize() - 1))
|
||||
g_settings.glcd_selected_config = 0;
|
||||
|
||||
lcd = GLCD::CreateDriver(GLCD::Config.driverConfigs[g_settings.glcd_selected_config].id, &GLCD::Config.driverConfigs[g_settings.glcd_selected_config]);
|
||||
if (!lcd) {
|
||||
#ifdef GLCD_DEBUG
|
||||
fprintf(stderr, "CreateDriver failed.\n");
|
||||
@@ -1705,3 +1709,14 @@ int cGLCD::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t /* data */)
|
||||
return messages_return::unhandled;
|
||||
}
|
||||
|
||||
int cGLCD::GetConfigSize()
|
||||
{
|
||||
return (int) GLCD::Config.driverConfigs.size();
|
||||
}
|
||||
|
||||
std::string cGLCD::GetConfigName(int driver)
|
||||
{
|
||||
if ((driver < 0) || (driver > GetConfigSize() - 1))
|
||||
driver = 0;
|
||||
return GLCD::Config.driverConfigs[driver].name;
|
||||
}
|
||||
|
Reference in New Issue
Block a user