DRYer
This commit is contained in:
parent
0d465f71a3
commit
9aab18d724
1 changed files with 3 additions and 2 deletions
5
glfw/backend_utils.h
vendored
5
glfw/backend_utils.h
vendored
|
|
@ -69,9 +69,10 @@ typedef struct {
|
||||||
bool repeats;
|
bool repeats;
|
||||||
} Timer;
|
} Timer;
|
||||||
|
|
||||||
|
#define MAX_NUM_OF_WATCHED_FDS 64
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct pollfd fds[32];
|
struct pollfd fds[MAX_NUM_OF_WATCHED_FDS];
|
||||||
#ifdef HAS_EVENT_FD
|
#ifdef HAS_EVENT_FD
|
||||||
int wakeupFd;
|
int wakeupFd;
|
||||||
#else
|
#else
|
||||||
|
|
@ -84,7 +85,7 @@ typedef struct {
|
||||||
#endif
|
#endif
|
||||||
bool wakeup_data_read, wakeup_fd_ready, key_repeat_fd_ready;
|
bool wakeup_data_read, wakeup_fd_ready, key_repeat_fd_ready;
|
||||||
nfds_t watches_count, timers_count;
|
nfds_t watches_count, timers_count;
|
||||||
Watch watches[32];
|
Watch watches[MAX_NUM_OF_WATCHED_FDS];
|
||||||
Timer timers[128];
|
Timer timers[128];
|
||||||
} EventLoopData;
|
} EventLoopData;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue