mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
nglcd: add toggle power function
Origin commit data
------------------
Commit: 863dee245d
Author: vanhofen <vanhofen@gmx.de>
Date: 2020-06-16 (Tue, 16 Jun 2020)
Origin message was:
------------------
- nglcd: add toggle power function
This commit is contained in:
@@ -77,6 +77,7 @@ nGLCD::nGLCD() {
|
||||
percent_bar = 0;
|
||||
percent_space = 0;
|
||||
percent_logo = 0;
|
||||
power_state = 1;
|
||||
Scale = 0;
|
||||
bitmap = NULL;
|
||||
blitFlag = true;
|
||||
@@ -941,6 +942,18 @@ void nGLCD::SetBrightness(unsigned int b)
|
||||
nglcd->SetBrightness(b);
|
||||
}
|
||||
|
||||
void nGLCD::TogglePower()
|
||||
{
|
||||
if (nglcd)
|
||||
{
|
||||
nglcd->power_state = 1 - nglcd->power_state;
|
||||
if (nglcd->power_state)
|
||||
nglcd->Resume();
|
||||
else
|
||||
nglcd->Suspend();
|
||||
}
|
||||
}
|
||||
|
||||
void nGLCD::Blit()
|
||||
{
|
||||
if (nglcd)
|
||||
|
@@ -60,6 +60,7 @@ class nGLCD
|
||||
int percent_bar;
|
||||
int percent_logo;
|
||||
int percent_space;
|
||||
int power_state;
|
||||
GLCD::cBitmap * bitmap;
|
||||
std::string Channel;
|
||||
std::string Epg;
|
||||
@@ -138,6 +139,7 @@ class nGLCD
|
||||
static void Exit();
|
||||
static void Blit();
|
||||
static void SetBrightness(unsigned int b);
|
||||
static void TogglePower();
|
||||
int GetConfigSize();
|
||||
std::string GetConfigName(int);
|
||||
void UpdateBrightness();
|
||||
|
Reference in New Issue
Block a user