Skip to content

Commit

Permalink
updated build config
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Oct 31, 2024
1 parent 0792144 commit d0f3aad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 27 deletions.
8 changes: 5 additions & 3 deletions Makefile.webos
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

#########################
#########################
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gfx/drivers_context/sdl_gl_ctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
26 changes: 3 additions & 23 deletions input/drivers/sdl_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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

0 comments on commit d0f3aad

Please sign in to comment.