Skip to content

Commit 1f19f50

Browse files
committed
Properly ships libSDL2 for webOS
Updated some build config
1 parent 0792144 commit 1f19f50

File tree

3 files changed

+10
-27
lines changed

3 files changed

+10
-27
lines changed

Makefile.webos

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ ifneq ($(CROSS_COMPILE),arm-webos-linux-gnueabi-)
55
endif
66

77
ifdef SDKTARGETSYSROOT
8-
$(warning OE-based toolchain isn't supported anymore. Please use https://github.com/webosbrew/native-toolchain)
8+
$(warning "OE-based toolchain isn't supported anymore. Please use https://github.com/webosbrew/native-toolchain")
99
STAGING_DIR = $(SDKTARGETSYSROOT)
1010
else ifndef STAGING_DIR
11-
$(error Can't find buildroot based toolchain. Please use https://github.com/webosbrew/native-toolchain)
11+
$(error "Can't find buildroot based toolchain. Please use https://github.com/webosbrew/native-toolchain")
1212
endif
1313

1414
WEBOS_FREETYPE_CONFIG ?= $(STAGING_DIR)/usr/bin/freetype-config
@@ -17,7 +17,7 @@ WEBOS_INC_DIR ?= $(STAGING_DIR)/usr/include
1717
WEBOS_LIB_DIR ?= $(STAGING_DIR)/usr/lib
1818

1919
ADD_SDL2_LIB ?= 0
20-
SDL2_PREBUILT_ARCHIVE ?= https://github.com/webosbrew/SDL-webOS/releases/download/release-2.30.0-2/SDL2-2.30.0-webos.tar.gz
20+
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
2121

2222
#########################
2323
#########################
@@ -151,6 +151,7 @@ DEFINES += -DHAVE_FILTERS_BUILTIN
151151
DEFINES += -DHAVE_SDL2
152152
DEFINES += -DHAVE_PULSE
153153
DEFINES += -DHAVE_NETWORKING -DHAVE_IFINFO -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
154+
DEFINES += -DHAVE_NETWORKGAMEPAD
154155
DEFINES += -DHAVE_UPDATE_CORE_INFO
155156

156157
PKG_CONFIG=pkg-config
@@ -159,6 +160,8 @@ SDL2_CFLAGS := $(shell $(PKG_CONFIG) --cflags sdl2)
159160
SDL2_LIBS := $(shell $(PKG_CONFIG) --libs sdl2)
160161
OPENGLES_LIBS = -lGLESv2
161162
PULSE_LIBS = $(shell $(PKG_CONFIG) --libs libpulse)
163+
FREETYPE_CFLAGS := $(shell $(WEBOS_FREETYPE_CONFIG) --cflags)
164+
FREETYPE_LIBS := $(shell $(WEBOS_FREETYPE_CONFIG) --libs)
162165
MMAP_LIBS = -lc
163166
NEON_CFLAGS = -mfpu=neon
164167
NEON_ASFLAGS = -mfpu=neon

gfx/drivers_context/sdl_gl_ctx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static void *sdl_ctx_init(void *video_driver)
109109
#ifdef WEBOS
110110
SDL_SetHint(SDL_HINT_WEBOS_ACCESS_POLICY_KEYS_BACK, "true");
111111
SDL_SetHint(SDL_HINT_WEBOS_ACCESS_POLICY_KEYS_EXIT, "true");
112-
SDL_SetHint(SDL_HINT_WEBOS_CURSOR_SLEEP_TIME, "1000");
112+
SDL_SetHint(SDL_HINT_WEBOS_CURSOR_SLEEP_TIME, "5000");
113113
#endif
114114

115115
/* Initialise graphics subsystem, if required */

input/drivers/sdl_input.c

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ static int16_t sdl_input_state(
249249
if (idx == 0)
250250
{
251251
struct video_viewport vp;
252-
bool screen = device ==
252+
bool screen = device ==
253253
RARCH_DEVICE_POINTER_SCREEN;
254254
const int edge_detect = 32700;
255255
bool inside = false;
@@ -275,7 +275,7 @@ static int16_t sdl_input_state(
275275
res_y = res_screen_y;
276276
}
277277

278-
inside = (res_x >= -edge_detect)
278+
inside = (res_x >= -edge_detect)
279279
&& (res_y >= -edge_detect)
280280
&& (res_x <= edge_detect)
281281
&& (res_y <= edge_detect);
@@ -398,7 +398,7 @@ static void sdl_input_poll(void *data)
398398
switch ((int) event.key.keysym.scancode)
399399
{
400400
case SDL_WEBOS_SCANCODE_BACK:
401-
/* Because webOS is sending DOWN/UP at the same time,
401+
/* Because webOS is sending DOWN/UP at the same time,
402402
we save this flag for later */
403403
sdl_webos_special_keymap[sdl_webos_spkey_back] |= event.type == SDL_KEYDOWN;
404404
code = RETROK_BACKSPACE;
@@ -487,23 +487,3 @@ input_driver_t input_sdl = {
487487
NULL,
488488
NULL
489489
};
490-
491-
#ifdef WEBOS
492-
SDL_bool SDL_webOSCursorVisibility(SDL_bool visible)
493-
{
494-
static SDL_bool (*fn)(SDL_bool visible) = NULL;
495-
static bool dlsym_called = false;
496-
if (!dlsym_called)
497-
{
498-
fn = dlsym(RTLD_NEXT, "SDL_webOSCursorVisibility");
499-
dlsym_called = true;
500-
}
501-
if (!fn)
502-
{
503-
SDL_ShowCursor(SDL_DISABLE);
504-
SDL_ShowCursor(SDL_ENABLE);
505-
return SDL_TRUE;
506-
}
507-
return fn(visible);
508-
}
509-
#endif

0 commit comments

Comments
 (0)