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:
parent
695a6495dd
commit
1a56d620ac
@ -232,8 +232,10 @@ class cSoftRemote:public cRemote, private cThread
|
||||
**
|
||||
** @param code key code
|
||||
*/
|
||||
void Receive(const char *code) {
|
||||
void Receive(const char *code)
|
||||
{
|
||||
cMutexLock MutexLock(&mutex);
|
||||
|
||||
Command = code;
|
||||
keyReceived.Broadcast();
|
||||
}
|
||||
@ -251,6 +253,7 @@ void cSoftRemote::Action(void)
|
||||
|
||||
while (Running()) {
|
||||
cMutexLock MutexLock(&mutex);
|
||||
|
||||
if (keyReceived.TimedWait(mutex, Setup.RcRepeatDelta * 3 / 2) && **Command) {
|
||||
if (strcmp(Command, LastCommand) == 0) {
|
||||
// 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);
|
||||
Repeat = true;
|
||||
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
|
||||
// need to delay the second command to see whether it is going to be
|
||||
// a repeat function or a separate key press:
|
||||
Delayed = true;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// This is a totally new key press, so we accept it immediately:
|
||||
cRemote::Put(Command);
|
||||
Delayed = false;
|
||||
FirstCommand = Command;
|
||||
FirstTime.Set();
|
||||
}
|
||||
}
|
||||
else if (Repeat) {
|
||||
} else if (Repeat) {
|
||||
// Timeout after a repeat function, so we generate a 'release':
|
||||
cRemote::Put(LastCommand, false, true);
|
||||
Repeat = false;
|
||||
}
|
||||
else if (Delayed && *FirstCommand) {
|
||||
} else if (Delayed && *FirstCommand) {
|
||||
// Timeout after two normal key presses of the same key, so accept the
|
||||
// delayed key:
|
||||
cRemote::Put(FirstCommand);
|
||||
Delayed = false;
|
||||
FirstCommand = "";
|
||||
FirstTime.Set();
|
||||
}
|
||||
else if (**FirstCommand && FirstTime.Elapsed() > (uint)Setup.RcRepeatDelay) {
|
||||
} else if (**FirstCommand && FirstTime.Elapsed() > (uint) Setup.RcRepeatDelay) {
|
||||
Delayed = false;
|
||||
FirstCommand = "";
|
||||
FirstTime.Set();
|
||||
@ -303,6 +301,7 @@ void cSoftRemote::Action(void)
|
||||
}
|
||||
|
||||
static cSoftRemote *csoft = NULL;
|
||||
|
||||
/**
|
||||
** Feed key press as remote input (called from C part).
|
||||
**
|
||||
@ -3145,6 +3144,7 @@ void cPluginSoftHdDevice::Stop(void)
|
||||
|
||||
::Stop();
|
||||
delete csoft;
|
||||
|
||||
csoft = NULL;
|
||||
}
|
||||
|
||||
|
2
video.c
2
video.c
@ -2857,6 +2857,7 @@ int get_RGB(CuvidDecoder * decoder)
|
||||
if (OsdShown && decoder->grab == 2) {
|
||||
int x, y, h, w;
|
||||
GLint texLoc;
|
||||
|
||||
if (OsdShown == 1) {
|
||||
if (OSDtexture)
|
||||
glDeleteTextures(1, &OSDtexture);
|
||||
@ -3879,6 +3880,7 @@ static void CuvidDisplayFrame(void)
|
||||
if (OsdShown && valid_frame) {
|
||||
GLint texLoc;
|
||||
int x, y, w, h;
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
if (OsdShown == 1) {
|
||||
if (OSDtexture)
|
||||
|
Loading…
Reference in New Issue
Block a user