1
0
mirror of https://github.com/jojo61/vdr-plugin-softhdcuvid.git synced 2023-10-10 13:37:41 +02:00

Fix indentation.

This commit is contained in:
Dirk Nehring 2019-11-18 13:01:19 +01:00
parent 695a6495dd
commit 1a56d620ac
4 changed files with 413 additions and 411 deletions

View File

@ -232,8 +232,10 @@ class cSoftRemote:public cRemote, private cThread
** **
** @param code key code ** @param code key code
*/ */
void Receive(const char *code) { void Receive(const char *code)
{
cMutexLock MutexLock(&mutex); cMutexLock MutexLock(&mutex);
Command = code; Command = code;
keyReceived.Broadcast(); keyReceived.Broadcast();
} }
@ -251,6 +253,7 @@ void cSoftRemote::Action(void)
while (Running()) { while (Running()) {
cMutexLock MutexLock(&mutex); cMutexLock MutexLock(&mutex);
if (keyReceived.TimedWait(mutex, Setup.RcRepeatDelta * 3 / 2) && **Command) { if (keyReceived.TimedWait(mutex, Setup.RcRepeatDelta * 3 / 2) && **Command) {
if (strcmp(Command, LastCommand) == 0) { if (strcmp(Command, LastCommand) == 0) {
// If two keyboard events with the same command come in without an intermediate // If two keyboard events with the same command come in without an intermediate
@ -264,35 +267,30 @@ void cSoftRemote::Action(void)
cRemote::Put(Command, true); cRemote::Put(Command, true);
Repeat = true; Repeat = true;
LastTime.Set(); LastTime.Set();
} } else if (strcmp(Command, FirstCommand) == 0) {
else if (strcmp(Command, FirstCommand) == 0) {
// If the same command comes in twice with an intermediate timeout, we // If the same command comes in twice with an intermediate timeout, we
// need to delay the second command to see whether it is going to be // need to delay the second command to see whether it is going to be
// a repeat function or a separate key press: // a repeat function or a separate key press:
Delayed = true; Delayed = true;
} } else {
else {
// This is a totally new key press, so we accept it immediately: // This is a totally new key press, so we accept it immediately:
cRemote::Put(Command); cRemote::Put(Command);
Delayed = false; Delayed = false;
FirstCommand = Command; FirstCommand = Command;
FirstTime.Set(); FirstTime.Set();
} }
} } else if (Repeat) {
else if (Repeat) {
// Timeout after a repeat function, so we generate a 'release': // Timeout after a repeat function, so we generate a 'release':
cRemote::Put(LastCommand, false, true); cRemote::Put(LastCommand, false, true);
Repeat = false; Repeat = false;
} } else if (Delayed && *FirstCommand) {
else if (Delayed && *FirstCommand) {
// Timeout after two normal key presses of the same key, so accept the // Timeout after two normal key presses of the same key, so accept the
// delayed key: // delayed key:
cRemote::Put(FirstCommand); cRemote::Put(FirstCommand);
Delayed = false; Delayed = false;
FirstCommand = ""; FirstCommand = "";
FirstTime.Set(); FirstTime.Set();
} } else if (**FirstCommand && FirstTime.Elapsed() > (uint) Setup.RcRepeatDelay) {
else if (**FirstCommand && FirstTime.Elapsed() > (uint)Setup.RcRepeatDelay) {
Delayed = false; Delayed = false;
FirstCommand = ""; FirstCommand = "";
FirstTime.Set(); FirstTime.Set();
@ -303,6 +301,7 @@ void cSoftRemote::Action(void)
} }
static cSoftRemote *csoft = NULL; static cSoftRemote *csoft = NULL;
/** /**
** Feed key press as remote input (called from C part). ** Feed key press as remote input (called from C part).
** **
@ -3145,6 +3144,7 @@ void cPluginSoftHdDevice::Stop(void)
::Stop(); ::Stop();
delete csoft; delete csoft;
csoft = NULL; csoft = NULL;
} }

View File

@ -2857,6 +2857,7 @@ int get_RGB(CuvidDecoder * decoder)
if (OsdShown && decoder->grab == 2) { if (OsdShown && decoder->grab == 2) {
int x, y, h, w; int x, y, h, w;
GLint texLoc; GLint texLoc;
if (OsdShown == 1) { if (OsdShown == 1) {
if (OSDtexture) if (OSDtexture)
glDeleteTextures(1, &OSDtexture); glDeleteTextures(1, &OSDtexture);
@ -3879,6 +3880,7 @@ static void CuvidDisplayFrame(void)
if (OsdShown && valid_frame) { if (OsdShown && valid_frame) {
GLint texLoc; GLint texLoc;
int x, y, w, h; int x, y, w, h;
glBindTexture(GL_TEXTURE_2D, 0); glBindTexture(GL_TEXTURE_2D, 0);
if (OsdShown == 1) { if (OsdShown == 1) {
if (OSDtexture) if (OSDtexture)