Get rid of runloop.h dependencies inside input/ dir

This commit is contained in:
twinaphex 2016-12-02 06:07:45 +01:00
parent dd5736b273
commit 021559a877
10 changed files with 3 additions and 35 deletions

View File

@ -49,7 +49,6 @@
#include "../input_keymaps.h"
#include "../../configuration.h"
#include "../../runloop.h"
#include "../../verbosity.h"
typedef struct udev_input udev_input_t;

View File

@ -16,7 +16,6 @@
#include <stdlib.h>
#include "../../runloop.h"
#include "../input_defines.h"
#include "../input_hid_driver.h"

View File

@ -24,7 +24,6 @@
#include "../../tasks/tasks_internal.h"
#include "../../configuration.h"
#include "../../runloop.h"
#include "../../configuration.h"
#include "../../retroarch.h"
#include "../../command.h"

View File

@ -33,7 +33,6 @@
#include "../input_joypad_driver.h"
#include "../input_keymaps.h"
#include "../../configuration.h"
#include "../../runloop.h"
#include "../../verbosity.h"
struct dinput_joypad

View File

@ -33,7 +33,6 @@
#include "../common/epoll_common.h"
#include "../input_driver.h"
#include "../../configuration.h"
#include "../../runloop.h"
#include "../../verbosity.h"
#include "../../tasks/tasks_internal.h"
@ -104,17 +103,6 @@ static bool linuxraw_joypad_init_pad(const char *path, struct linuxraw_joypad *p
JSIOCGNAME(sizeof(settings->input.device_names[0])), pad->ident) >= 0)
{
RARCH_LOG("[Device]: Found pad: %s on %s.\n", pad->ident, path);
if (linuxraw_hotplug)
{
char msg[512];
msg[0] = '\0';
snprintf(msg, sizeof(msg), "Device connected. #%u (%s).",
(unsigned)(pad - linuxraw_pads), pad->ident);
runloop_msg_queue_push(msg, 0, 60, false);
}
}
else
RARCH_ERR("[Device]: Didn't find ident of %s.\n", path);

View File

@ -37,7 +37,6 @@
#include "../common/udev_common.h"
#include "../../configuration.h"
#include "../../runloop.h"
#include "../../verbosity.h"
/* Udev/evdev Linux joypad driver.
@ -311,7 +310,7 @@ static int udev_add_pad(struct udev_device *dev, unsigned p, int fd, const char
return ret;
}
static void udev_check_device(struct udev_device *dev, const char *path, bool hotplugged)
static void udev_check_device(struct udev_device *dev, const char *path)
{
int ret;
int pad, fd;
@ -351,16 +350,6 @@ static void udev_check_device(struct udev_device *dev, const char *path, bool ho
break;
case 0:
default:
if (hotplugged)
{
char msg[255];
msg[0] = '\0';
snprintf(msg, sizeof(msg), "Device connected: #%u (%s).", pad, path);
runloop_msg_queue_push(msg, 0, 60, false);
RARCH_LOG("[udev]: %s\n", msg);
}
break;
}
}
@ -426,7 +415,7 @@ static void udev_joypad_handle_hotplug(struct udev_device *dev)
if (string_is_equal(action, "add"))
{
RARCH_LOG("[udev]: Hotplug add: %s.\n", devnode);
udev_check_device(dev, devnode, true);
udev_check_device(dev, devnode);
}
else if (string_is_equal(action, "remove"))
{
@ -560,7 +549,7 @@ static bool udev_joypad_init(void *data)
const char *devnode = udev_device_get_devnode(dev);
if (devnode)
udev_check_device(dev, devnode, false);
udev_check_device(dev, devnode);
udev_device_unref(dev);
}

View File

@ -24,7 +24,6 @@
#include "../input_driver.h"
#include "../../tasks/tasks_internal.h"
#include "../../configuration.h"
#include "../../runloop.h"
#include "../../configuration.h"
#include "../../retroarch.h"
#include "../../command.h"

View File

@ -39,10 +39,8 @@
#include "../input_config.h"
#include "../../configuration.h"
#include "../../runloop.h"
#include "../../verbosity.h"
/* Check if the definitions do not already exist.
* Official and mingw xinput headers have different include guards.
*/

View File

@ -31,7 +31,6 @@
#include "../configuration.h"
#include "../driver.h"
#include "../retroarch.h"
#include "../runloop.h"
#include "../movie.h"
#include "../list_special.h"
#include "../verbosity.h"

View File

@ -40,7 +40,6 @@
#include "../configuration.h"
#include "../msg_hash.h"
#include "../runloop.h"
#include "../verbosity.h"
#define DEFAULT_NETWORK_GAMEPAD_PORT 55400