File tree Expand file tree Collapse file tree 7 files changed +920
-0
lines changed Expand file tree Collapse file tree 7 files changed +920
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ option(USE_BACKEND_WESTEROS_MESA "Whether to enable support for the gbm based of
2323option (USE_INPUT_LIBINPUT "Whether to enable support for the libinput input backend" ON )
2424option (USE_INPUT_UDEV "Whether to enable support for the libinput input udev lib" ON )
2525option (USE_INPUT_WAYLAND "Whether to enable support for the wayland input backend" OFF )
26+ option (USE_GENERIC_GAMEPAD "Use generic gamepad implementation" OFF )
2627
2728find_package (WPE REQUIRED)
2829find_package (EGL REQUIRED)
@@ -98,6 +99,11 @@ elseif (USE_VIRTUAL_KEYBOARD)
9899 )
99100endif ()
100101
102+ if (USE_GENERIC_GAMEPAD)
103+ include (src/gamepad/CMakeLists.txt)
104+ include (src/gamepad_test/CMakeLists.txt)
105+ endif ()
106+
101107if (USE_BACKEND_BCM_NEXUS)
102108 include (src/bcm-nexus/CMakeLists.txt)
103109endif ()
Original file line number Diff line number Diff line change 1+ add_definitions (-DENABLE_GAMEPAD=1)
2+
3+ list (APPEND WPE_PLATFORM_SOURCES
4+ src/gamepad/linux_gamepad.cpp
5+ )
Original file line number Diff line number Diff line change 1+ /*
2+ * If not stated otherwise in this file or this component's Licenses.txt file the
3+ * following copyright and licenses apply:
4+ *
5+ * Copyright 2020 RDK Management
6+ *
7+ * Licensed under the Apache License, Version 2.0 (the "License");
8+ * you may not use this file except in compliance with the License.
9+ * You may obtain a copy of the License at
10+ *
11+ * http://www.apache.org/licenses/LICENSE-2.0
12+ *
13+ * Unless required by applicable law or agreed to in writing, software
14+ * distributed under the License is distributed on an "AS IS" BASIS,
15+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+ * See the License for the specific language governing permissions and
17+ * limitations under the License.
18+ */
19+
20+ #ifndef linux_gamepad_interfaces_h
21+ #define linux_gamepad_interfaces_h
22+
23+ #include <wpe/wpe.h>
24+
25+ #ifdef __cplusplus
26+ extern "C" {
27+ #endif
28+
29+ extern struct wpe_gamepad_provider_interface gamepad_provider_interface ;
30+ extern struct wpe_gamepad_interface gamepad_interface ;
31+
32+ #ifdef __cplusplus
33+ }
34+ #endif
35+
36+ #endif /* linux_gamepad_interfaces_h */
You can’t perform that action at this time.
0 commit comments