Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes to udev input drivers. Add support for canary builds to lakka updater stuff #15818

Merged
merged 4 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,10 @@ ifeq ($(HAVE_LAKKA_NIGHTLY), 1)
DEFINES += -DHAVE_LAKKA_NIGHTLY
endif

ifneq ($(HAVE_LAKKA_CANARY), "")
DEFINES += -DHAVE_LAKKA_CANARY=\"${HAVE_LAKKA_CANARY}\"
endif

ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/menu_setting.o \
menu/menu_driver.o \
Expand Down
4 changes: 3 additions & 1 deletion file_path_special.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ RETRO_BEGIN_DECLS
#define FILE_PATH_LOBBY_LIBRETRO_URL "http://lobby.libretro.com/"
#define FILE_PATH_CORE_THUMBNAILS_URL "http://thumbnails.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"
#else
#define FILE_PATH_LAKKA_URL "http://le.builds.lakka.tv"
Expand Down
17 changes: 11 additions & 6 deletions input/drivers/udev_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include <linux/types.h>
#include <linux/input.h>
#include <linux/kd.h>
#include <linux/version.h>
#elif defined(__FreeBSD__)
#include <dev/evdev/input.h>
#endif
Expand Down Expand Up @@ -119,12 +120,11 @@
/* UDEV_TOUCH_PRINTF_DEBUG */

#ifdef UDEV_TOUCH_DEEP_DEBUG
#define RARCH_DDBG(msg, ...) do{ \
RARCH_DBG(msg, __VA_ARGS__); \
#define RARCH_DDBG(...) do{ \
RARCH_DBG(__VA_ARGS__); \
} while (0)
#else
/* TODO - Since C89 doesn't allow variadic macros, we have an empty function instead... */
void RARCH_DDBG(const char *fmt, ...) { }
#define RARCH_DDBG(msg, ...)
#endif
/* UDEV_TOUCH_DEEP_DEBUG */

Expand Down Expand Up @@ -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)
{
ts->s = event->input_event_sec;
ts->us = event->input_event_usec;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,16,0)
ts->s = event->input_event_sec;
ts->us = event->input_event_usec;
#else
ts->s = event->time.tv_sec;
ts->us = event->time.tv_usec;
#endif
}

/**
Expand Down
6 changes: 6 additions & 0 deletions input/drivers_joypad/udev_joypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,12 @@ static void udev_joypad_poll(void)
/* Hotplug removal */
else if (string_is_equal(action, "remove"))
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);
Expand Down
4 changes: 4 additions & 0 deletions menu/cbs/menu_cbs_ok.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ static int (funcname)(const char *path, const char *label, unsigned type, size_t
#ifdef HAVE_LAKKA
static char *lakka_get_project(void)
{
#ifndef HAVE_LAKKA_CANARY
size_t len;
static char lakka_project[128];
FILE *command_file = popen("cat /etc/release | cut -d - -f 1", "r");
Expand All @@ -259,6 +260,9 @@ static char *lakka_get_project(void)

pclose(command_file);
return lakka_project;
#else
return "/";
#endif
}
#endif
#endif
Expand Down
Loading