diff options
-rw-r--r-- | packaging/deviced.spec | 7 | ||||
-rw-r--r-- | src/haptic/haptic.c | 2 | ||||
-rw-r--r-- | src/libdeviced/haptic.c | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/packaging/deviced.spec b/packaging/deviced.spec index edfb01fe..5cf9c1de 100644 --- a/packaging/deviced.spec +++ b/packaging/deviced.spec @@ -2,6 +2,7 @@ #These options are DEACTIVATED by default. %bcond_with x %bcond_with wayland +%bcond_with emulator # display, extcon, power, usb are always enable %define battery_module off @@ -202,10 +203,10 @@ Haptic Device manager library for device control (devel) %prep %setup -q -%ifarch %{arm} -%define ARCH arm -%else +%if %{with emulator} %define ARCH emulator +%else +%define ARCH arm %endif %define DPMS none diff --git a/src/haptic/haptic.c b/src/haptic/haptic.c index 713fb019..9001a1e3 100644 --- a/src/haptic/haptic.c +++ b/src/haptic/haptic.c @@ -179,7 +179,7 @@ static void haptic_name_owner_changed(const char *sender, void *data) return; for (n = info->handle_list; n; n = n->next) { - handle = n->data; + handle = (int)n->data; h_ops->stop_device(handle); h_ops->close_device(handle); } diff --git a/src/libdeviced/haptic.c b/src/libdeviced/haptic.c index 6a49e93b..81c62e41 100644 --- a/src/libdeviced/haptic.c +++ b/src/libdeviced/haptic.c @@ -297,7 +297,7 @@ API int haptic_vibrate_monotone_with_detail(haptic_device_h device_handle, if (ret < 0) return HAPTIC_ERROR_OPERATION_FAILED; - if (effect_handle >= 0) + if (effect_handle) *effect_handle = (haptic_effect_h)ret; return HAPTIC_ERROR_NONE; |