Only allow input packets to be queued between start and stop
This commit is contained in:
parent
f6927475cf
commit
6010367637
1 changed files with 6 additions and 3 deletions
|
|
@ -49,7 +49,6 @@ int initializeInputStream(void) {
|
|||
|
||||
LbqInitializeLinkedBlockingQueue(&packetQueue, 30);
|
||||
|
||||
initialized = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -72,8 +71,6 @@ void destroyInputStream(void) {
|
|||
|
||||
entry = nextEntry;
|
||||
}
|
||||
|
||||
initialized = 0;
|
||||
}
|
||||
|
||||
static int addPkcs7PaddingInPlace(unsigned char* plaintext, int plaintextLen) {
|
||||
|
|
@ -423,6 +420,9 @@ int startInputStream(void) {
|
|||
return err;
|
||||
}
|
||||
|
||||
// Allow input packets to be queued now
|
||||
initialized = 1;
|
||||
|
||||
// GFE will not send haptics events without this magic packet first
|
||||
sendEnableHaptics();
|
||||
|
||||
|
|
@ -431,6 +431,9 @@ int startInputStream(void) {
|
|||
|
||||
// Stops the input stream
|
||||
int stopInputStream(void) {
|
||||
// No more packets should be queued now
|
||||
initialized = 0;
|
||||
|
||||
// Signal the input send thread
|
||||
LbqSignalQueueShutdown(&packetQueue);
|
||||
PltInterruptThread(&inputSendThread);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue