Load screenshot library on screenshot request 21/110921/1 accepted/tizen/3.0/common/20170123.132050 accepted/tizen/3.0/ivi/20170123.095541 accepted/tizen/3.0/mobile/20170123.095514 accepted/tizen/3.0/tv/20170123.095523 accepted/tizen/3.0/wearable/20170123.095529 submit/tizen_3.0/20170120.093924
authorAlexander Aksenov <a.aksenov@samsung.com>
Wed, 18 Jan 2017 13:27:19 +0000 (16:27 +0300)
committerAlexander Aksenov <a.aksenov@samsung.com>
Wed, 18 Jan 2017 15:22:49 +0000 (18:22 +0300)
Previously it was loaded only on screenshot feature set.

Change-Id: Ief460da9be3d8068d110733c8139286e44db3a18
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
Makefile
helper/screenshot_iface.c

index 86cd4e8..d11da7a 100644 (file)
--- 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)
index 55737b0..d9965f8 100644 (file)
@@ -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;
+}