From d0f3aadfff128bff97c96a91abcd1bdc54450420 Mon Sep 17 00:00:00 2001 From: Ningyuan Li Date: Thu, 31 Oct 2024 18:44:57 +0900 Subject: [PATCH] updated build config --- Makefile.webos | 8 +++++--- gfx/drivers_context/sdl_gl_ctx.c | 2 +- input/drivers/sdl_input.c | 26 +++----------------------- 3 files changed, 9 insertions(+), 27 deletions(-) diff --git a/Makefile.webos b/Makefile.webos index 4cf54469d4f..1a3ba6a46cb 100644 --- a/Makefile.webos +++ b/Makefile.webos @@ -5,10 +5,10 @@ ifneq ($(CROSS_COMPILE),arm-webos-linux-gnueabi-) endif ifdef SDKTARGETSYSROOT - $(warning OE-based toolchain isn't supported anymore. Please use https://github.com/webosbrew/native-toolchain) + $(warning "OE-based toolchain isn't supported anymore. Please use https://github.com/webosbrew/native-toolchain") STAGING_DIR = $(SDKTARGETSYSROOT) else ifndef STAGING_DIR - $(error Can't find buildroot based toolchain. Please use https://github.com/webosbrew/native-toolchain) + $(error "Can't find buildroot based toolchain. Please use https://github.com/webosbrew/native-toolchain") endif WEBOS_FREETYPE_CONFIG ?= $(STAGING_DIR)/usr/bin/freetype-config @@ -17,7 +17,7 @@ WEBOS_INC_DIR ?= $(STAGING_DIR)/usr/include WEBOS_LIB_DIR ?= $(STAGING_DIR)/usr/lib ADD_SDL2_LIB ?= 0 -SDL2_PREBUILT_ARCHIVE ?= https://github.com/webosbrew/SDL-webOS/releases/download/release-2.30.0-2/SDL2-2.30.0-webos.tar.gz +SDL2_PREBUILT_ARCHIVE ?= https://github.com/webosbrew/SDL-webOS/releases/download/release-2.30.8-webos.3/SDL2-2.30.8-webos-abi.tar.gz ######################### ######################### @@ -159,6 +159,8 @@ SDL2_CFLAGS := $(shell $(PKG_CONFIG) --cflags sdl2) SDL2_LIBS := $(shell $(PKG_CONFIG) --libs sdl2) OPENGLES_LIBS = -lGLESv2 PULSE_LIBS = $(shell $(PKG_CONFIG) --libs libpulse) +FREETYPE_CFLAGS := $(shell $(WEBOS_FREETYPE_CONFIG) --cflags) +FREETYPE_LIBS := $(shell $(WEBOS_FREETYPE_CONFIG) --libs) MMAP_LIBS = -lc NEON_CFLAGS = -mfpu=neon NEON_ASFLAGS = -mfpu=neon diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c index 48ced425054..2920cee070f 100644 --- a/gfx/drivers_context/sdl_gl_ctx.c +++ b/gfx/drivers_context/sdl_gl_ctx.c @@ -109,7 +109,7 @@ static void *sdl_ctx_init(void *video_driver) #ifdef WEBOS SDL_SetHint(SDL_HINT_WEBOS_ACCESS_POLICY_KEYS_BACK, "true"); SDL_SetHint(SDL_HINT_WEBOS_ACCESS_POLICY_KEYS_EXIT, "true"); - SDL_SetHint(SDL_HINT_WEBOS_CURSOR_SLEEP_TIME, "1000"); + SDL_SetHint(SDL_HINT_WEBOS_CURSOR_SLEEP_TIME, "5000"); #endif /* Initialise graphics subsystem, if required */ diff --git a/input/drivers/sdl_input.c b/input/drivers/sdl_input.c index 6cccb3eb8b7..1df093a81b9 100644 --- a/input/drivers/sdl_input.c +++ b/input/drivers/sdl_input.c @@ -249,7 +249,7 @@ static int16_t sdl_input_state( if (idx == 0) { struct video_viewport vp; - bool screen = device == + bool screen = device == RARCH_DEVICE_POINTER_SCREEN; const int edge_detect = 32700; bool inside = false; @@ -275,7 +275,7 @@ static int16_t sdl_input_state( res_y = res_screen_y; } - inside = (res_x >= -edge_detect) + inside = (res_x >= -edge_detect) && (res_y >= -edge_detect) && (res_x <= edge_detect) && (res_y <= edge_detect); @@ -398,7 +398,7 @@ static void sdl_input_poll(void *data) switch ((int) event.key.keysym.scancode) { case SDL_WEBOS_SCANCODE_BACK: - /* Because webOS is sending DOWN/UP at the same time, + /* Because webOS is sending DOWN/UP at the same time, we save this flag for later */ sdl_webos_special_keymap[sdl_webos_spkey_back] |= event.type == SDL_KEYDOWN; code = RETROK_BACKSPACE; @@ -487,23 +487,3 @@ input_driver_t input_sdl = { NULL, NULL }; - -#ifdef WEBOS -SDL_bool SDL_webOSCursorVisibility(SDL_bool visible) -{ - static SDL_bool (*fn)(SDL_bool visible) = NULL; - static bool dlsym_called = false; - if (!dlsym_called) - { - fn = dlsym(RTLD_NEXT, "SDL_webOSCursorVisibility"); - dlsym_called = true; - } - if (!fn) - { - SDL_ShowCursor(SDL_DISABLE); - SDL_ShowCursor(SDL_ENABLE); - return SDL_TRUE; - } - return fn(visible); -} -#endif