From bfe3c8495d2c3e74a7d75eb0c3f3be0796bbe0cc Mon Sep 17 00:00:00 2001 From: Alexander Aksenov Date: Wed, 18 Jan 2017 16:27:19 +0300 Subject: [PATCH] Load screenshot library on screenshot request Previously it was loaded only on screenshot feature set. Change-Id: Ief460da9be3d8068d110733c8139286e44db3a18 Signed-off-by: Alexander Aksenov --- Makefile | 12 +++++------- helper/screenshot_iface.c | 13 ++++++++----- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 86cd4e8..d11da7a 100644 --- a/Makefile +++ b/Makefile @@ -152,6 +152,10 @@ PROBE_CAPI_SRCS = \ PROBE_SCREENSHOT_SRCS = ./probe_screenshot/dacapture_generic.c +PROBE_SCREENSHOT_LDFLAGS = \ + -L. \ + -l:da_probe_tizen.so + ifeq ($(TIZEN_FEATURE_WAYLAND),y) PROBE_EVENT_SRCS += ./probe_event/orientation.c CFLAGS += -Wno-deprecated-declarations -Wno-unused-const-variable @@ -161,11 +165,9 @@ CFLAGS += -I/usr/include/wayland-extension/ PROBE_SCREENSHOT_SRCS += ./probe_screenshot/dacapture_wayland.c PROBE_SCREENSHOT_LDFLAGS += \ - -L. \ -lscreenshooter-client \ -lwayland-tbm-client \ - -lwayland-client \ - -l:da_probe_tizen.so + -lwayland-client else @@ -285,10 +287,6 @@ PROBE_CAPI_LDFLAGS = \ -L. \ -l:da_probe_tizen.so -PROBE_SCREENSHOT_LDFLAGS = \ - -L. \ - -l:da_probe_tizen.so - $(PROBE_EVENT_TARGET): LDFLAGS+=$(PROBE_EVENT_LDFLAGS) $(PROBE_EVENT_TARGET): CPPFLAGS+=-DSELF_LIB_NAME="\"/$(INSTALLDIR)/$(PROBE_EVENT_TARGET)\"" -DTIZENAPP $(SWAP_PROBE_DEFS) $(PROBE_EVENT_TARGET): CPPFLAGS+=$(DEBUG_FLAGS) diff --git a/helper/screenshot_iface.c b/helper/screenshot_iface.c index 55737b0..d9965f8 100644 --- a/helper/screenshot_iface.c +++ b/helper/screenshot_iface.c @@ -33,11 +33,6 @@ static void *resolve_symbol(void *handle, const char *name) } -int capture_screen_call(void) -{ - return capture_screen_p ? ((int (*)(void))capture_screen_p)() : -1; -} - void current_angle_set_call(int angle) { if (current_angle_set_p != NULL) @@ -102,3 +97,11 @@ void unload_screenshot_library(void) dlclose(handle); } + +int capture_screen_call(void) +{ + if (capture_screen_p == NULL) + load_screenshot_library(); + + return capture_screen_p ? ((int (*)(void))capture_screen_p)() : -1; +} -- 2.7.4