mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 14:37:08 +00:00
evdev_gun: enable udev code on BSDs
libudev is supported on DragonFly and FreeBSD, similar to libevdev.
NetBSD and OpenBSD can simply disable both via -DUSE_LIBEVDEV=OFF.
This reverts commit 337ee77a99.
This commit is contained in:
parent
8b453e6a3b
commit
a748508bc9
2 changed files with 1 additions and 7 deletions
|
|
@ -7,9 +7,7 @@
|
|||
#include "evdev_gun_handler.h"
|
||||
#include "util/logs.hpp"
|
||||
|
||||
#ifdef __linux__ // Too lazy to make this work for BSD
|
||||
#include <libudev.h>
|
||||
#endif
|
||||
|
||||
#include <libevdev/libevdev.h>
|
||||
#include <fcntl.h>
|
||||
|
|
@ -95,11 +93,9 @@ evdev_gun_handler::~evdev_gun_handler()
|
|||
close(fd);
|
||||
}
|
||||
}
|
||||
#ifdef __linux__
|
||||
if (m_udev != nullptr)
|
||||
udev_unref(m_udev);
|
||||
evdev_log.notice("Lightgun: Shutdown udev initialization");
|
||||
#endif
|
||||
}
|
||||
|
||||
int evdev_gun_handler::get_button(u32 gunno, gun_button button) const
|
||||
|
|
@ -204,7 +200,6 @@ bool evdev_gun_handler::init()
|
|||
|
||||
m_devices.clear();
|
||||
|
||||
#ifdef __linux__
|
||||
evdev_log.notice("Lightgun: Begin udev initialization");
|
||||
|
||||
m_udev = udev_new();
|
||||
|
|
@ -317,7 +312,6 @@ bool evdev_gun_handler::init()
|
|||
{
|
||||
evdev_log.error("Lightgun: Failed udev enumeration");
|
||||
}
|
||||
#endif
|
||||
|
||||
m_is_init = true;
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue