mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-10-23 00:27:19 +00:00
Fix getSdlFdEntryIndex() for FD 0
This commit is contained in:
1 parent
effac744c7
commit
78bc2141f6
1 file changed
+2
-4
@@ -42,12 +42,10 @@ pthread_mutex_t g_FdTableLock = PTHREAD_MUTEX_INITIALIZER;
|
||||
int getSdlFdEntryIndex(bool unused)
|
||||
{
|
||||
for (int i = 0; i < MAX_SDL_FD_COUNT; i++) {
|
||||
// We slightly bend the FD rules here by treating 0
|
||||
// as invalid since that's our global default value.
|
||||
if (unused && g_SdlDrmMasterFds[i] <= 0) {
|
||||
if (unused && g_SdlDrmMasterFds[i] < 0) {
|
||||
return i;
|
||||
}
|
||||
else if (!unused && g_SdlDrmMasterFds[i] > 0) {
|
||||
else if (!unused && g_SdlDrmMasterFds[i] >= 0) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user