Use an std::vector for PollFDs instead of handling it manually

Lowered poll() timeout to 50, to fix (work around?) slider stutter.
This commit is contained in:
2020-12-05 21:59:37 +01:00
parent ec7cba644c
commit 6b257887b7
2 changed files with 13 additions and 43 deletions

View File

@@ -48,6 +48,8 @@
#include <list>
#include <queue>
#include <unordered_map>
#include <vector>
#include <algorithm>
#include "Defines.hpp"
#include "settings.hpp"
@@ -197,9 +199,7 @@ protected:
std::mutex activeCrit;
const size_t STARTFDSCOUNT = 8; // number of initial PollFD slots
size_t fdsSize; // size of PollFD array in bytes
int nfds; // number of populated PollFD slots
PollFD *fds;
std::vector<PollFD> fds;
SOCKET sock;
uint16_t port;