mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 02:30:35 +00:00
Create epoll_waiting
This commit is contained in:
parent
ecbfc72e9b
commit
54655c37cd
@ -1,4 +1,5 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "epoll_common.h"
|
||||
|
||||
@ -33,3 +34,8 @@ void epoll_free(bool is_joypad)
|
||||
epoll_inited = false;
|
||||
epoll_first_inited_is_joypad = false;
|
||||
}
|
||||
|
||||
int epoll_waiting(struct epoll_event *events, int maxevents, int timeout)
|
||||
{
|
||||
return epoll_wait(g_epoll, events, maxevents, timeout);
|
||||
}
|
||||
|
@ -29,4 +29,6 @@ bool epoll_new(bool is_joypad);
|
||||
|
||||
void epoll_free(bool is_joypad);
|
||||
|
||||
int epoll_waiting(struct epoll_event *events, int maxevents, int timeout);
|
||||
|
||||
#endif
|
||||
|
@ -365,7 +365,7 @@ static void udev_input_poll(void *data)
|
||||
while (udev_mon_hotplug_available())
|
||||
udev_input_handle_hotplug(udev);
|
||||
|
||||
ret = epoll_wait(g_epoll, events, ARRAY_SIZE(events), 0);
|
||||
ret = epoll_waiting(events, ARRAY_SIZE(events), 0);
|
||||
|
||||
for (i = 0; i < ret; i++)
|
||||
{
|
||||
|
@ -194,7 +194,7 @@ static void linuxraw_joypad_poll(void)
|
||||
struct epoll_event events[MAX_USERS + 1];
|
||||
|
||||
retry:
|
||||
ret = epoll_wait(g_epoll, events, MAX_USERS + 1, 0);
|
||||
ret = epoll_waiting(events, MAX_USERS + 1, 0);
|
||||
if (ret < 0 && errno == EINTR)
|
||||
goto retry;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user