mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 22:14:17 +00:00
Minor fixes to udev input drivers. Add support for canary builds to lakka updater stuff (#15818)
* Input: Udev: Fix touch support building against older kernel headers * Input: Udev: Fix Touch Deep Debug compile issues * Input: Joypad: Udev: Joypad: Add Change detection for udev events This is handy with controllers like the Nintendo Joycons that have a daemon app in the background to handle combining them into one controller(Joycond) Since the device was already added, but joycond clamped permissions on evdev retroarch was never updating the controller input change, this fixes that issue. Note: Needs a patch in joycond as well, to send change uevent. This shouldnt cause any issues with other controllers, as the kernel probably will never send change events for these device types. * Lakka: Add canary builds to updater
This commit is contained in:
parent
535898da0d
commit
5356afc750
@ -1050,6 +1050,10 @@ ifeq ($(HAVE_LAKKA_NIGHTLY), 1)
|
|||||||
DEFINES += -DHAVE_LAKKA_NIGHTLY
|
DEFINES += -DHAVE_LAKKA_NIGHTLY
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(HAVE_LAKKA_CANARY), "")
|
||||||
|
DEFINES += -DHAVE_LAKKA_CANARY=\"${HAVE_LAKKA_CANARY}\"
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||||
OBJ += menu/menu_setting.o \
|
OBJ += menu/menu_setting.o \
|
||||||
menu/menu_driver.o \
|
menu/menu_driver.o \
|
||||||
|
@ -75,7 +75,9 @@ RETRO_BEGIN_DECLS
|
|||||||
#define FILE_PATH_LOBBY_LIBRETRO_URL "http://lobby.libretro.com/"
|
#define FILE_PATH_LOBBY_LIBRETRO_URL "http://lobby.libretro.com/"
|
||||||
#define FILE_PATH_CORE_THUMBNAILS_URL "http://thumbnails.libretro.com"
|
#define FILE_PATH_CORE_THUMBNAILS_URL "http://thumbnails.libretro.com"
|
||||||
#define FILE_PATH_CORE_THUMBNAILPACKS_URL "http://thumbnailpacks.libretro.com"
|
#define FILE_PATH_CORE_THUMBNAILPACKS_URL "http://thumbnailpacks.libretro.com"
|
||||||
#ifdef HAVE_LAKKA_NIGHTLY
|
#ifdef HAVE_LAKKA_CANARY
|
||||||
|
#define FILE_PATH_LAKKA_URL HAVE_LAKKA_CANARY
|
||||||
|
#elif HAVE_LAKKA_NIGHTLY
|
||||||
#define FILE_PATH_LAKKA_URL "http://nightly.builds.lakka.tv/.updater"
|
#define FILE_PATH_LAKKA_URL "http://nightly.builds.lakka.tv/.updater"
|
||||||
#else
|
#else
|
||||||
#define FILE_PATH_LAKKA_URL "http://le.builds.lakka.tv"
|
#define FILE_PATH_LAKKA_URL "http://le.builds.lakka.tv"
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
#include <linux/kd.h>
|
#include <linux/kd.h>
|
||||||
|
#include <linux/version.h>
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
#include <dev/evdev/input.h>
|
#include <dev/evdev/input.h>
|
||||||
#endif
|
#endif
|
||||||
@ -119,12 +120,11 @@
|
|||||||
/* UDEV_TOUCH_PRINTF_DEBUG */
|
/* UDEV_TOUCH_PRINTF_DEBUG */
|
||||||
|
|
||||||
#ifdef UDEV_TOUCH_DEEP_DEBUG
|
#ifdef UDEV_TOUCH_DEEP_DEBUG
|
||||||
#define RARCH_DDBG(msg, ...) do{ \
|
#define RARCH_DDBG(...) do{ \
|
||||||
RARCH_DBG(msg, __VA_ARGS__); \
|
RARCH_DBG(__VA_ARGS__); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#else
|
#else
|
||||||
/* TODO - Since C89 doesn't allow variadic macros, we have an empty function instead... */
|
#define RARCH_DDBG(msg, ...)
|
||||||
void RARCH_DDBG(const char *fmt, ...) { }
|
|
||||||
#endif
|
#endif
|
||||||
/* UDEV_TOUCH_DEEP_DEBUG */
|
/* UDEV_TOUCH_DEEP_DEBUG */
|
||||||
|
|
||||||
@ -956,8 +956,13 @@ static void udev_handle_mouse(void *data,
|
|||||||
*/
|
*/
|
||||||
static void udev_touch_event_ts_copy(const struct input_event *event, udev_touch_ts_t *ts)
|
static void udev_touch_event_ts_copy(const struct input_event *event, udev_touch_ts_t *ts)
|
||||||
{
|
{
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,16,0)
|
||||||
ts->s = event->input_event_sec;
|
ts->s = event->input_event_sec;
|
||||||
ts->us = event->input_event_usec;
|
ts->us = event->input_event_usec;
|
||||||
|
#else
|
||||||
|
ts->s = event->time.tv_sec;
|
||||||
|
ts->us = event->time.tv_usec;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -506,6 +506,12 @@ static void udev_joypad_poll(void)
|
|||||||
/* Hotplug removal */
|
/* Hotplug removal */
|
||||||
else if (string_is_equal(action, "remove"))
|
else if (string_is_equal(action, "remove"))
|
||||||
udev_joypad_remove_device(devnode);
|
udev_joypad_remove_device(devnode);
|
||||||
|
/* Device change */
|
||||||
|
else if (string_is_equal(action, "change"))
|
||||||
|
{
|
||||||
|
udev_joypad_remove_device(devnode);
|
||||||
|
udev_check_device(dev, devnode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
udev_device_unref(dev);
|
udev_device_unref(dev);
|
||||||
|
@ -247,6 +247,7 @@ static int (funcname)(const char *path, const char *label, unsigned type, size_t
|
|||||||
#ifdef HAVE_LAKKA
|
#ifdef HAVE_LAKKA
|
||||||
static char *lakka_get_project(void)
|
static char *lakka_get_project(void)
|
||||||
{
|
{
|
||||||
|
#ifndef HAVE_LAKKA_CANARY
|
||||||
size_t len;
|
size_t len;
|
||||||
static char lakka_project[128];
|
static char lakka_project[128];
|
||||||
FILE *command_file = popen("cat /etc/release | cut -d - -f 1", "r");
|
FILE *command_file = popen("cat /etc/release | cut -d - -f 1", "r");
|
||||||
@ -259,6 +260,9 @@ static char *lakka_get_project(void)
|
|||||||
|
|
||||||
pclose(command_file);
|
pclose(command_file);
|
||||||
return lakka_project;
|
return lakka_project;
|
||||||
|
#else
|
||||||
|
return "/";
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user