summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/android/app/src/main/jni/native.cpp6
-rw-r--r--src/core/CMakeLists.txt96
-rw-r--r--src/core/core.cpp2
-rw-r--r--src/core/frontend/applets/controller.cpp6
-rw-r--r--src/core/hle/service/am/am.cpp4
-rw-r--r--src/core/hle/service/am/applets/applet_cabinet.cpp2
-rw-r--r--src/core/hle/service/am/applets/applet_controller.cpp8
-rw-r--r--src/core/hle/service/hid/hid.cpp4
-rw-r--r--src/core/hle/service/hid/hid_debug_server.cpp2
-rw-r--r--src/core/hle/service/hid/hid_server.cpp35
-rw-r--r--src/core/hle/service/hid/hid_system_server.cpp15
-rw-r--r--src/core/hle/service/hid/hidbus.cpp8
-rw-r--r--src/core/hle/service/hid/hidbus.h2
-rw-r--r--src/core/hle/service/hid/irs.cpp20
-rw-r--r--src/core/hle/service/hid/irs.h6
-rw-r--r--src/core/hle/service/nfc/common/device.cpp6
-rw-r--r--src/core/hle/service/nfc/common/device_manager.cpp4
-rw-r--r--src/core/hle/service/nfc/common/device_manager.h2
-rw-r--r--src/core/hle/service/nfc/nfc_interface.cpp2
-rw-r--r--src/core/hle/service/nfp/nfp_interface.cpp2
-rw-r--r--src/core/memory/cheat_engine.cpp4
-rw-r--r--src/frontend_common/config.cpp2
-rw-r--r--src/hid_core/CMakeLists.txt126
-rw-r--r--src/hid_core/frontend/emulated_console.cpp (renamed from src/core/hid/emulated_console.cpp)4
-rw-r--r--src/hid_core/frontend/emulated_console.h (renamed from src/core/hid/emulated_console.h)4
-rw-r--r--src/hid_core/frontend/emulated_controller.cpp (renamed from src/core/hid/emulated_controller.cpp)6
-rw-r--r--src/hid_core/frontend/emulated_controller.h (renamed from src/core/hid/emulated_controller.h)6
-rw-r--r--src/hid_core/frontend/emulated_devices.cpp (renamed from src/core/hid/emulated_devices.cpp)4
-rw-r--r--src/hid_core/frontend/emulated_devices.h (renamed from src/core/hid/emulated_devices.h)2
-rw-r--r--src/hid_core/frontend/input_converter.cpp (renamed from src/core/hid/input_converter.cpp)2
-rw-r--r--src/hid_core/frontend/input_converter.h (renamed from src/core/hid/input_converter.h)0
-rw-r--r--src/hid_core/frontend/input_interpreter.cpp (renamed from src/core/hid/input_interpreter.cpp)8
-rw-r--r--src/hid_core/frontend/input_interpreter.h (renamed from src/core/hid/input_interpreter.h)0
-rw-r--r--src/hid_core/frontend/motion_input.cpp (renamed from src/core/hid/motion_input.cpp)2
-rw-r--r--src/hid_core/frontend/motion_input.h (renamed from src/core/hid/motion_input.h)0
-rw-r--r--src/hid_core/hid_core.cpp (renamed from src/core/hid/hid_core.cpp)10
-rw-r--r--src/hid_core/hid_core.h (renamed from src/core/hid/hid_core.h)2
-rw-r--r--src/hid_core/hid_result.h (renamed from src/core/hle/service/hid/errors.h)0
-rw-r--r--src/hid_core/hid_types.h (renamed from src/core/hid/hid_types.h)0
-rw-r--r--src/hid_core/hid_util.h (renamed from src/core/hle/service/hid/hid_util.h)4
-rw-r--r--src/hid_core/hidbus/hidbus_base.cpp (renamed from src/core/hle/service/hid/hidbus/hidbus_base.cpp)4
-rw-r--r--src/hid_core/hidbus/hidbus_base.h (renamed from src/core/hle/service/hid/hidbus/hidbus_base.h)0
-rw-r--r--src/hid_core/hidbus/ringcon.cpp (renamed from src/core/hle/service/hid/hidbus/ringcon.cpp)6
-rw-r--r--src/hid_core/hidbus/ringcon.h (renamed from src/core/hle/service/hid/hidbus/ringcon.h)2
-rw-r--r--src/hid_core/hidbus/starlink.cpp (renamed from src/core/hle/service/hid/hidbus/starlink.cpp)6
-rw-r--r--src/hid_core/hidbus/starlink.h (renamed from src/core/hle/service/hid/hidbus/starlink.h)2
-rw-r--r--src/hid_core/hidbus/stubbed.cpp (renamed from src/core/hle/service/hid/hidbus/stubbed.cpp)6
-rw-r--r--src/hid_core/hidbus/stubbed.h (renamed from src/core/hle/service/hid/hidbus/stubbed.h)2
-rw-r--r--src/hid_core/irsensor/clustering_processor.cpp (renamed from src/core/hle/service/hid/irsensor/clustering_processor.cpp)6
-rw-r--r--src/hid_core/irsensor/clustering_processor.h (renamed from src/core/hle/service/hid/irsensor/clustering_processor.h)6
-rw-r--r--src/hid_core/irsensor/image_transfer_processor.cpp (renamed from src/core/hle/service/hid/irsensor/image_transfer_processor.cpp)6
-rw-r--r--src/hid_core/irsensor/image_transfer_processor.h (renamed from src/core/hle/service/hid/irsensor/image_transfer_processor.h)4
-rw-r--r--src/hid_core/irsensor/ir_led_processor.cpp (renamed from src/core/hle/service/hid/irsensor/ir_led_processor.cpp)2
-rw-r--r--src/hid_core/irsensor/ir_led_processor.h (renamed from src/core/hle/service/hid/irsensor/ir_led_processor.h)4
-rw-r--r--src/hid_core/irsensor/irs_types.h (renamed from src/core/hid/irs_types.h)2
-rw-r--r--src/hid_core/irsensor/moment_processor.cpp (renamed from src/core/hle/service/hid/irsensor/moment_processor.cpp)6
-rw-r--r--src/hid_core/irsensor/moment_processor.h (renamed from src/core/hle/service/hid/irsensor/moment_processor.h)6
-rw-r--r--src/hid_core/irsensor/pointing_processor.cpp (renamed from src/core/hle/service/hid/irsensor/pointing_processor.cpp)2
-rw-r--r--src/hid_core/irsensor/pointing_processor.h (renamed from src/core/hle/service/hid/irsensor/pointing_processor.h)4
-rw-r--r--src/hid_core/irsensor/processor_base.cpp (renamed from src/core/hle/service/hid/irsensor/processor_base.cpp)2
-rw-r--r--src/hid_core/irsensor/processor_base.h (renamed from src/core/hle/service/hid/irsensor/processor_base.h)2
-rw-r--r--src/hid_core/irsensor/tera_plugin_processor.cpp (renamed from src/core/hle/service/hid/irsensor/tera_plugin_processor.cpp)2
-rw-r--r--src/hid_core/irsensor/tera_plugin_processor.h (renamed from src/core/hle/service/hid/irsensor/tera_plugin_processor.h)4
-rw-r--r--src/hid_core/precompiled_headers.h6
-rw-r--r--src/hid_core/resource_manager.cpp (renamed from src/core/hle/service/hid/resource_manager.cpp)42
-rw-r--r--src/hid_core/resource_manager.h (renamed from src/core/hle/service/hid/resource_manager.h)0
-rw-r--r--src/hid_core/resources/applet_resource.cpp (renamed from src/core/hle/service/hid/controllers/applet_resource.cpp)6
-rw-r--r--src/hid_core/resources/applet_resource.h (renamed from src/core/hle/service/hid/controllers/applet_resource.h)2
-rw-r--r--src/hid_core/resources/controller_base.cpp (renamed from src/core/hle/service/hid/controllers/controller_base.cpp)2
-rw-r--r--src/hid_core/resources/controller_base.h (renamed from src/core/hle/service/hid/controllers/controller_base.h)2
-rw-r--r--src/hid_core/resources/debug_pad/debug_pad.cpp (renamed from src/core/hle/service/hid/controllers/debug_pad.cpp)12
-rw-r--r--src/hid_core/resources/debug_pad/debug_pad.h (renamed from src/core/hle/service/hid/controllers/debug_pad.h)7
-rw-r--r--src/hid_core/resources/debug_pad/debug_pad_types.h (renamed from src/core/hle/service/hid/controllers/types/debug_pad_types.h)2
-rw-r--r--src/hid_core/resources/digitizer/digitizer.cpp (renamed from src/core/hle/service/hid/controllers/digitizer.cpp)6
-rw-r--r--src/hid_core/resources/digitizer/digitizer.h (renamed from src/core/hle/service/hid/controllers/digitizer.h)2
-rw-r--r--src/hid_core/resources/hid_firmware_settings.cpp (renamed from src/core/hle/service/hid/hid_firmware_settings.cpp)2
-rw-r--r--src/hid_core/resources/hid_firmware_settings.h (renamed from src/core/hle/service/hid/hid_firmware_settings.h)0
-rw-r--r--src/hid_core/resources/irs_ring_lifo.h (renamed from src/core/hle/service/hid/irs_ring_lifo.h)0
-rw-r--r--src/hid_core/resources/keyboard/keyboard.cpp (renamed from src/core/hle/service/hid/controllers/keyboard.cpp)10
-rw-r--r--src/hid_core/resources/keyboard/keyboard.h (renamed from src/core/hle/service/hid/controllers/keyboard.h)9
-rw-r--r--src/hid_core/resources/keyboard/keyboard_types.h (renamed from src/core/hle/service/hid/controllers/types/keyboard_types.h)2
-rw-r--r--src/hid_core/resources/mouse/debug_mouse.cpp (renamed from src/core/hle/service/hid/controllers/debug_mouse.cpp)10
-rw-r--r--src/hid_core/resources/mouse/debug_mouse.h (renamed from src/core/hle/service/hid/controllers/debug_mouse.h)6
-rw-r--r--src/hid_core/resources/mouse/mouse.cpp (renamed from src/core/hle/service/hid/controllers/mouse.cpp)10
-rw-r--r--src/hid_core/resources/mouse/mouse.h (renamed from src/core/hle/service/hid/controllers/mouse.h)6
-rw-r--r--src/hid_core/resources/mouse/mouse_types.h (renamed from src/core/hle/service/hid/controllers/types/mouse_types.h)0
-rw-r--r--src/hid_core/resources/npad/npad.cpp (renamed from src/core/hle/service/hid/controllers/npad.cpp)14
-rw-r--r--src/hid_core/resources/npad/npad.h (renamed from src/core/hle/service/hid/controllers/npad.h)8
-rw-r--r--src/hid_core/resources/npad/npad_data.cpp (renamed from src/core/hle/service/hid/controllers/npad/npad_data.cpp)4
-rw-r--r--src/hid_core/resources/npad/npad_data.h (renamed from src/core/hle/service/hid/controllers/npad/npad_data.h)4
-rw-r--r--src/hid_core/resources/npad/npad_resource.cpp (renamed from src/core/hle/service/hid/controllers/npad/npad_resource.cpp)8
-rw-r--r--src/hid_core/resources/npad/npad_resource.h (renamed from src/core/hle/service/hid/controllers/npad/npad_resource.h)8
-rw-r--r--src/hid_core/resources/npad/npad_types.h (renamed from src/core/hle/service/hid/controllers/types/npad_types.h)2
-rw-r--r--src/hid_core/resources/palma/palma.cpp (renamed from src/core/hle/service/hid/controllers/palma.cpp)7
-rw-r--r--src/hid_core/resources/palma/palma.h (renamed from src/core/hle/service/hid/controllers/palma.h)5
-rw-r--r--src/hid_core/resources/ring_lifo.h (renamed from src/core/hle/service/hid/ring_lifo.h)0
-rw-r--r--src/hid_core/resources/shared_memory_format.h (renamed from src/core/hle/service/hid/controllers/types/shared_memory_format.h)14
-rw-r--r--src/hid_core/resources/shared_memory_holder.cpp (renamed from src/core/hle/service/hid/controllers/shared_memory_holder.cpp)8
-rw-r--r--src/hid_core/resources/shared_memory_holder.h (renamed from src/core/hle/service/hid/controllers/shared_memory_holder.h)0
-rw-r--r--src/hid_core/resources/six_axis/console_six_axis.cpp (renamed from src/core/hle/service/hid/controllers/console_six_axis.cpp)8
-rw-r--r--src/hid_core/resources/six_axis/console_six_axis.h (renamed from src/core/hle/service/hid/controllers/console_six_axis.h)2
-rw-r--r--src/hid_core/resources/six_axis/seven_six_axis.cpp (renamed from src/core/hle/service/hid/controllers/seven_six_axis.cpp)8
-rw-r--r--src/hid_core/resources/six_axis/seven_six_axis.h (renamed from src/core/hle/service/hid/controllers/seven_six_axis.h)4
-rw-r--r--src/hid_core/resources/six_axis/six_axis.cpp (renamed from src/core/hle/service/hid/controllers/six_axis.cpp)14
-rw-r--r--src/hid_core/resources/six_axis/six_axis.h (renamed from src/core/hle/service/hid/controllers/six_axis.h)6
-rw-r--r--src/hid_core/resources/system_buttons/capture_button.cpp (renamed from src/core/hle/service/hid/controllers/capture_button.cpp)6
-rw-r--r--src/hid_core/resources/system_buttons/capture_button.h (renamed from src/core/hle/service/hid/controllers/capture_button.h)2
-rw-r--r--src/hid_core/resources/system_buttons/home_button.cpp (renamed from src/core/hle/service/hid/controllers/home_button.cpp)6
-rw-r--r--src/hid_core/resources/system_buttons/home_button.h (renamed from src/core/hle/service/hid/controllers/home_button.h)2
-rw-r--r--src/hid_core/resources/system_buttons/sleep_button.cpp (renamed from src/core/hle/service/hid/controllers/sleep_button.cpp)6
-rw-r--r--src/hid_core/resources/system_buttons/sleep_button.h (renamed from src/core/hle/service/hid/controllers/sleep_button.h)2
-rw-r--r--src/hid_core/resources/touch_screen/gesture.cpp (renamed from src/core/hle/service/hid/controllers/gesture.cpp)10
-rw-r--r--src/hid_core/resources/touch_screen/gesture.h (renamed from src/core/hle/service/hid/controllers/gesture.h)4
-rw-r--r--src/hid_core/resources/touch_screen/gesture_types.h (renamed from src/core/hle/service/hid/controllers/types/gesture_types.h)0
-rw-r--r--src/hid_core/resources/touch_screen/touch_screen.cpp (renamed from src/core/hle/service/hid/controllers/touchscreen.cpp)10
-rw-r--r--src/hid_core/resources/touch_screen/touch_screen.h (renamed from src/core/hle/service/hid/controllers/touchscreen.h)6
-rw-r--r--src/hid_core/resources/touch_screen/touch_types.h (renamed from src/core/hle/service/hid/controllers/types/touch_types.h)2
-rw-r--r--src/hid_core/resources/unique_pad/unique_pad.cpp (renamed from src/core/hle/service/hid/controllers/unique_pad.cpp)6
-rw-r--r--src/hid_core/resources/unique_pad/unique_pad.h (renamed from src/core/hle/service/hid/controllers/unique_pad.h)2
-rw-r--r--src/input_common/CMakeLists.txt2
-rw-r--r--src/yuzu/applets/qt_controller.cpp8
-rw-r--r--src/yuzu/applets/qt_software_keyboard.cpp8
-rw-r--r--src/yuzu/applets/qt_web_browser.cpp2
-rw-r--r--src/yuzu/configuration/configure_debug_controller.cpp2
-rw-r--r--src/yuzu/configuration/configure_hotkeys.cpp4
-rw-r--r--src/yuzu/configuration/configure_input.cpp4
-rw-r--r--src/yuzu/configuration/configure_input_advanced.cpp4
-rw-r--r--src/yuzu/configuration/configure_input_per_game.cpp4
-rw-r--r--src/yuzu/configuration/configure_input_player.cpp6
-rw-r--r--src/yuzu/configuration/configure_input_player_widget.cpp2
-rw-r--r--src/yuzu/configuration/configure_input_player_widget.h4
-rw-r--r--src/yuzu/configuration/configure_ringcon.cpp4
-rw-r--r--src/yuzu/configuration/configure_vibration.cpp6
-rw-r--r--src/yuzu/debugger/controller.cpp4
-rw-r--r--src/yuzu/hotkeys.cpp2
-rw-r--r--src/yuzu/hotkeys.h2
-rw-r--r--src/yuzu/main.cpp4
-rw-r--r--src/yuzu/util/controller_navigation.cpp4
-rw-r--r--src/yuzu/util/overlay_dialog.cpp4
-rw-r--r--src/yuzu_cmd/emu_window/emu_window_sdl2.cpp2
141 files changed, 481 insertions, 438 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e04d2418b..edca221b1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -185,6 +185,7 @@ add_subdirectory(common)
add_subdirectory(core)
add_subdirectory(audio_core)
add_subdirectory(video_core)
+add_subdirectory(hid_core)
add_subdirectory(network)
add_subdirectory(input_common)
add_subdirectory(frontend_common)
diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp
index 0c1db7d46..056920a4a 100644
--- a/src/android/app/src/main/jni/native.cpp
+++ b/src/android/app/src/main/jni/native.cpp
@@ -45,15 +45,15 @@
#include "core/frontend/applets/profile_select.h"
#include "core/frontend/applets/software_keyboard.h"
#include "core/frontend/applets/web_browser.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
-#include "core/hid/hid_types.h"
#include "core/hle/service/am/applet_ae.h"
#include "core/hle/service/am/applet_oe.h"
#include "core/hle/service/am/applets/applets.h"
#include "core/hle/service/filesystem/filesystem.h"
#include "core/loader/loader.h"
#include "frontend_common/config.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/hid_types.h"
#include "jni/android_common/android_common.h"
#include "jni/id_cache.h"
#include "jni/native.h"
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index e2ec2164c..adcc23c18 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -183,22 +183,6 @@ add_library(core STATIC
frontend/framebuffer_layout.cpp
frontend/framebuffer_layout.h
frontend/graphics_context.h
- hid/emulated_console.cpp
- hid/emulated_console.h
- hid/emulated_controller.cpp
- hid/emulated_controller.h
- hid/emulated_devices.cpp
- hid/emulated_devices.h
- hid/hid_core.cpp
- hid/hid_core.h
- hid/hid_types.h
- hid/input_converter.cpp
- hid/input_converter.h
- hid/input_interpreter.cpp
- hid/input_interpreter.h
- hid/irs_types.h
- hid/motion_input.cpp
- hid/motion_input.h
hle/api_version.h
hle/ipc.h
hle/kernel/board/nintendo/nx/k_memory_layout.cpp
@@ -531,94 +515,16 @@ add_library(core STATIC
hle/service/hid/hid.h
hle/service/hid/hid_debug_server.cpp
hle/service/hid/hid_debug_server.h
- hle/service/hid/hid_firmware_settings.cpp
- hle/service/hid/hid_firmware_settings.h
hle/service/hid/hid_server.cpp
hle/service/hid/hid_server.h
hle/service/hid/hid_system_server.cpp
hle/service/hid/hid_system_server.h
- hle/service/hid/hid_util.h
hle/service/hid/hidbus.cpp
hle/service/hid/hidbus.h
hle/service/hid/irs.cpp
hle/service/hid/irs.h
- hle/service/hid/irs_ring_lifo.h
- hle/service/hid/resource_manager.cpp
- hle/service/hid/resource_manager.h
- hle/service/hid/ring_lifo.h
hle/service/hid/xcd.cpp
hle/service/hid/xcd.h
- hle/service/hid/errors.h
- hle/service/hid/controllers/npad/npad_data.cpp
- hle/service/hid/controllers/npad/npad_data.h
- hle/service/hid/controllers/npad/npad_resource.cpp
- hle/service/hid/controllers/npad/npad_resource.h
- hle/service/hid/controllers/types/debug_pad_types.h
- hle/service/hid/controllers/types/keyboard_types.h
- hle/service/hid/controllers/types/mouse_types.h
- hle/service/hid/controllers/types/npad_types.h
- hle/service/hid/controllers/types/shared_memory_format.h
- hle/service/hid/controllers/types/touch_types.h
- hle/service/hid/controllers/applet_resource.cpp
- hle/service/hid/controllers/applet_resource.h
- hle/service/hid/controllers/capture_button.cpp
- hle/service/hid/controllers/capture_button.h
- hle/service/hid/controllers/console_six_axis.cpp
- hle/service/hid/controllers/console_six_axis.h
- hle/service/hid/controllers/controller_base.cpp
- hle/service/hid/controllers/controller_base.h
- hle/service/hid/controllers/debug_mouse.cpp
- hle/service/hid/controllers/debug_mouse.h
- hle/service/hid/controllers/debug_pad.cpp
- hle/service/hid/controllers/debug_pad.h
- hle/service/hid/controllers/digitizer.cpp
- hle/service/hid/controllers/digitizer.h
- hle/service/hid/controllers/gesture.cpp
- hle/service/hid/controllers/gesture.h
- hle/service/hid/controllers/home_button.cpp
- hle/service/hid/controllers/home_button.h
- hle/service/hid/controllers/keyboard.cpp
- hle/service/hid/controllers/keyboard.h
- hle/service/hid/controllers/mouse.cpp
- hle/service/hid/controllers/mouse.h
- hle/service/hid/controllers/npad.cpp
- hle/service/hid/controllers/npad.h
- hle/service/hid/controllers/palma.cpp
- hle/service/hid/controllers/palma.h
- hle/service/hid/controllers/seven_six_axis.cpp
- hle/service/hid/controllers/seven_six_axis.h
- hle/service/hid/controllers/shared_memory_holder.cpp
- hle/service/hid/controllers/shared_memory_holder.h
- hle/service/hid/controllers/six_axis.cpp
- hle/service/hid/controllers/six_axis.h
- hle/service/hid/controllers/sleep_button.cpp
- hle/service/hid/controllers/sleep_button.h
- hle/service/hid/controllers/touchscreen.cpp
- hle/service/hid/controllers/touchscreen.h
- hle/service/hid/controllers/unique_pad.cpp
- hle/service/hid/controllers/unique_pad.h
- hle/service/hid/hidbus/hidbus_base.cpp
- hle/service/hid/hidbus/hidbus_base.h
- hle/service/hid/hidbus/ringcon.cpp
- hle/service/hid/hidbus/ringcon.h
- hle/service/hid/hidbus/starlink.cpp
- hle/service/hid/hidbus/starlink.h
- hle/service/hid/hidbus/stubbed.cpp
- hle/service/hid/hidbus/stubbed.h
- hle/service/hid/irsensor/clustering_processor.cpp
- hle/service/hid/irsensor/clustering_processor.h
- hle/service/hid/irsensor/image_transfer_processor.cpp
- hle/service/hid/irsensor/image_transfer_processor.h
- hle/service/hid/irsensor/ir_led_processor.cpp
- hle/service/hid/irsensor/ir_led_processor.h
- hle/service/hid/irsensor/moment_processor.cpp
- hle/service/hid/irsensor/moment_processor.h
- hle/service/hid/irsensor/pointing_processor.cpp
- hle/service/hid/irsensor/pointing_processor.h
- hle/service/hid/irsensor/processor_base.cpp
- hle/service/hid/irsensor/processor_base.h
- hle/service/hid/irsensor/tera_plugin_processor.cpp
- hle/service/hid/irsensor/tera_plugin_processor.h
hle/service/lbl/lbl.cpp
hle/service/lbl/lbl.h
hle/service/ldn/lan_discovery.cpp
@@ -959,7 +865,7 @@ endif()
create_target_directory_groups(core)
-target_link_libraries(core PUBLIC common PRIVATE audio_core network video_core nx_tzdb)
+target_link_libraries(core PUBLIC common PRIVATE audio_core hid_core network video_core nx_tzdb)
target_link_libraries(core PUBLIC Boost::headers PRIVATE fmt::fmt nlohmann_json::nlohmann_json mbedtls RenderDoc::API)
if (MINGW)
target_link_libraries(core PRIVATE ${MSWSOCK_LIBRARY})
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 66f444d39..c063f7719 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -28,7 +28,6 @@
#include "core/file_sys/savedata_factory.h"
#include "core/file_sys/vfs_concat.h"
#include "core/file_sys/vfs_real.h"
-#include "core/hid/hid_core.h"
#include "core/hle/kernel/k_memory_manager.h"
#include "core/hle/kernel/k_process.h"
#include "core/hle/kernel/k_resource_limit.h"
@@ -52,6 +51,7 @@
#include "core/telemetry_session.h"
#include "core/tools/freezer.h"
#include "core/tools/renderdoc.h"
+#include "hid_core/hid_core.h"
#include "network/network.h"
#include "video_core/host1x/host1x.h"
#include "video_core/renderer_base.h"
diff --git a/src/core/frontend/applets/controller.cpp b/src/core/frontend/applets/controller.cpp
index 27755cb58..34fe23b6a 100644
--- a/src/core/frontend/applets/controller.cpp
+++ b/src/core/frontend/applets/controller.cpp
@@ -6,9 +6,9 @@
#include "common/settings.h"
#include "common/settings_enums.h"
#include "core/frontend/applets/controller.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
-#include "core/hid/hid_types.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/hid_types.h"
namespace Core::Frontend {
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index 97eb56ff0..9e05bdafa 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -13,7 +13,6 @@
#include "core/file_sys/patch_manager.h"
#include "core/file_sys/registered_cache.h"
#include "core/file_sys/savedata_factory.h"
-#include "core/hid/hid_types.h"
#include "core/hle/kernel/k_event.h"
#include "core/hle/kernel/k_transfer_memory.h"
#include "core/hle/result.h"
@@ -37,7 +36,6 @@
#include "core/hle/service/caps/caps_su.h"
#include "core/hle/service/caps/caps_types.h"
#include "core/hle/service/filesystem/filesystem.h"
-#include "core/hle/service/hid/controllers/npad.h"
#include "core/hle/service/ipc_helpers.h"
#include "core/hle/service/ns/ns.h"
#include "core/hle/service/nvnflinger/fb_share_buffer_manager.h"
@@ -48,6 +46,8 @@
#include "core/hle/service/vi/vi.h"
#include "core/hle/service/vi/vi_results.h"
#include "core/memory.h"
+#include "hid_core/hid_types.h"
+#include "hid_core/resources/npad/npad.h"
namespace Service::AM {
diff --git a/src/core/hle/service/am/applets/applet_cabinet.cpp b/src/core/hle/service/am/applets/applet_cabinet.cpp
index 3906c0fa4..c2ff444a6 100644
--- a/src/core/hle/service/am/applets/applet_cabinet.cpp
+++ b/src/core/hle/service/am/applets/applet_cabinet.cpp
@@ -5,13 +5,13 @@
#include "common/logging/log.h"
#include "core/core.h"
#include "core/frontend/applets/cabinet.h"
-#include "core/hid/hid_core.h"
#include "core/hle/kernel/k_event.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/service/am/am.h"
#include "core/hle/service/am/applets/applet_cabinet.h"
#include "core/hle/service/mii/mii_manager.h"
#include "core/hle/service/nfc/common/device.h"
+#include "hid_core/hid_core.h"
namespace Service::AM::Applets {
diff --git a/src/core/hle/service/am/applets/applet_controller.cpp b/src/core/hle/service/am/applets/applet_controller.cpp
index 9840d2547..0e4d9cc39 100644
--- a/src/core/hle/service/am/applets/applet_controller.cpp
+++ b/src/core/hle/service/am/applets/applet_controller.cpp
@@ -9,13 +9,13 @@
#include "common/string_util.h"
#include "core/core.h"
#include "core/frontend/applets/controller.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
-#include "core/hid/hid_types.h"
#include "core/hle/result.h"
#include "core/hle/service/am/am.h"
#include "core/hle/service/am/applets/applet_controller.h"
-#include "core/hle/service/hid/controllers/npad.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/hid_types.h"
+#include "hid_core/resources/npad/npad.h"
namespace Service::AM::Applets {
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index bd2873181..fc8a3ab66 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -5,14 +5,14 @@
#include "core/hle/kernel/kernel.h"
#include "core/hle/service/hid/hid.h"
#include "core/hle/service/hid/hid_debug_server.h"
-#include "core/hle/service/hid/hid_firmware_settings.h"
#include "core/hle/service/hid/hid_server.h"
#include "core/hle/service/hid/hid_system_server.h"
#include "core/hle/service/hid/hidbus.h"
#include "core/hle/service/hid/irs.h"
-#include "core/hle/service/hid/resource_manager.h"
#include "core/hle/service/hid/xcd.h"
#include "core/hle/service/server_manager.h"
+#include "hid_core/resource_manager.h"
+#include "hid_core/resources/hid_firmware_settings.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/hid_debug_server.cpp b/src/core/hle/service/hid/hid_debug_server.cpp
index 6294f3dfb..f2a767d37 100644
--- a/src/core/hle/service/hid/hid_debug_server.cpp
+++ b/src/core/hle/service/hid/hid_debug_server.cpp
@@ -2,8 +2,8 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "core/hle/service/hid/hid_debug_server.h"
-#include "core/hle/service/hid/resource_manager.h"
#include "core/hle/service/ipc_helpers.h"
+#include "hid_core/resource_manager.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/hid_server.cpp b/src/core/hle/service/hid/hid_server.cpp
index a953c92b3..2ff00d30d 100644
--- a/src/core/hle/service/hid/hid_server.cpp
+++ b/src/core/hle/service/hid/hid_server.cpp
@@ -5,30 +5,29 @@
#include "common/common_types.h"
#include "common/logging/log.h"
#include "common/settings.h"
-#include "core/hid/hid_core.h"
#include "core/hle/kernel/k_shared_memory.h"
#include "core/hle/kernel/k_transfer_memory.h"
#include "core/hle/kernel/kernel.h"
-#include "core/hle/service/hid/errors.h"
-#include "core/hle/service/hid/hid_firmware_settings.h"
#include "core/hle/service/hid/hid_server.h"
-#include "core/hle/service/hid/hid_util.h"
-#include "core/hle/service/hid/resource_manager.h"
#include "core/hle/service/ipc_helpers.h"
#include "core/memory.h"
-
-#include "core/hle/service/hid/controllers/console_six_axis.h"
-#include "core/hle/service/hid/controllers/controller_base.h"
-#include "core/hle/service/hid/controllers/debug_pad.h"
-#include "core/hle/service/hid/controllers/gesture.h"
-#include "core/hle/service/hid/controllers/keyboard.h"
-#include "core/hle/service/hid/controllers/mouse.h"
-#include "core/hle/service/hid/controllers/npad.h"
-#include "core/hle/service/hid/controllers/palma.h"
-#include "core/hle/service/hid/controllers/seven_six_axis.h"
-#include "core/hle/service/hid/controllers/six_axis.h"
-#include "core/hle/service/hid/controllers/touchscreen.h"
-#include "core/hle/service/hid/controllers/types/npad_types.h"
+#include "hid_core/hid_result.h"
+#include "hid_core/hid_util.h"
+#include "hid_core/resource_manager.h"
+#include "hid_core/resources/hid_firmware_settings.h"
+
+#include "hid_core/resources/controller_base.h"
+#include "hid_core/resources/debug_pad/debug_pad.h"
+#include "hid_core/resources/keyboard/keyboard.h"
+#include "hid_core/resources/mouse/mouse.h"
+#include "hid_core/resources/npad/npad.h"
+#include "hid_core/resources/npad/npad_types.h"
+#include "hid_core/resources/palma/palma.h"
+#include "hid_core/resources/six_axis/console_six_axis.h"
+#include "hid_core/resources/six_axis/seven_six_axis.h"
+#include "hid_core/resources/six_axis/six_axis.h"
+#include "hid_core/resources/touch_screen/gesture.h"
+#include "hid_core/resources/touch_screen/touch_screen.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/hid_system_server.cpp b/src/core/hle/service/hid/hid_system_server.cpp
index 4823de743..027c56025 100644
--- a/src/core/hle/service/hid/hid_system_server.cpp
+++ b/src/core/hle/service/hid/hid_system_server.cpp
@@ -1,15 +1,14 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
-#include "core/hid/hid_core.h"
-#include "core/hle/service/hid/controllers/npad.h"
-#include "core/hle/service/hid/controllers/palma.h"
-#include "core/hle/service/hid/controllers/touchscreen.h"
-#include "core/hle/service/hid/controllers/types/npad_types.h"
-#include "core/hle/service/hid/errors.h"
#include "core/hle/service/hid/hid_system_server.h"
-#include "core/hle/service/hid/resource_manager.h"
#include "core/hle/service/ipc_helpers.h"
+#include "hid_core/hid_result.h"
+#include "hid_core/resource_manager.h"
+#include "hid_core/resources/npad/npad.h"
+#include "hid_core/resources/npad/npad_types.h"
+#include "hid_core/resources/palma/palma.h"
+#include "hid_core/resources/touch_screen/touch_screen.h"
namespace Service::HID {
@@ -270,7 +269,7 @@ void IHidSystemServer::GetLastActiveNpad(HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(ResultSuccess);
- rb.PushEnum(system.HIDCore().GetLastActiveController());
+ rb.Push(0); // Dont forget to fix this
}
void IHidSystemServer::ApplyNpadSystemCommonPolicyFull(HLERequestContext& ctx) {
diff --git a/src/core/hle/service/hid/hidbus.cpp b/src/core/hle/service/hid/hidbus.cpp
index ffa7e144d..46f503d38 100644
--- a/src/core/hle/service/hid/hidbus.cpp
+++ b/src/core/hle/service/hid/hidbus.cpp
@@ -5,18 +5,18 @@
#include "common/settings.h"
#include "core/core.h"
#include "core/core_timing.h"
-#include "core/hid/hid_types.h"
#include "core/hle/kernel/k_event.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/k_shared_memory.h"
#include "core/hle/kernel/k_transfer_memory.h"
#include "core/hle/service/hid/hidbus.h"
-#include "core/hle/service/hid/hidbus/ringcon.h"
-#include "core/hle/service/hid/hidbus/starlink.h"
-#include "core/hle/service/hid/hidbus/stubbed.h"
#include "core/hle/service/ipc_helpers.h"
#include "core/hle/service/service.h"
#include "core/memory.h"
+#include "hid_core/hid_types.h"
+#include "hid_core/hidbus/ringcon.h"
+#include "hid_core/hidbus/starlink.h"
+#include "hid_core/hidbus/stubbed.h"
namespace Service::HID {
// (15ms, 66Hz)
diff --git a/src/core/hle/service/hid/hidbus.h b/src/core/hle/service/hid/hidbus.h
index 85a1df133..05f62f634 100644
--- a/src/core/hle/service/hid/hidbus.h
+++ b/src/core/hle/service/hid/hidbus.h
@@ -5,9 +5,9 @@
#include <functional>
-#include "core/hle/service/hid/hidbus/hidbus_base.h"
#include "core/hle/service/kernel_helpers.h"
#include "core/hle/service/service.h"
+#include "hid_core/hidbus/hidbus_base.h"
namespace Core::Timing {
struct EventType;
diff --git a/src/core/hle/service/hid/irs.cpp b/src/core/hle/service/hid/irs.cpp
index 05ed31273..18e544f2f 100644
--- a/src/core/hle/service/hid/irs.cpp
+++ b/src/core/hle/service/hid/irs.cpp
@@ -6,22 +6,22 @@
#include "core/core.h"
#include "core/core_timing.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
#include "core/hle/kernel/k_shared_memory.h"
#include "core/hle/kernel/k_transfer_memory.h"
#include "core/hle/kernel/kernel.h"
-#include "core/hle/service/hid/errors.h"
-#include "core/hle/service/hid/hid_util.h"
#include "core/hle/service/hid/irs.h"
-#include "core/hle/service/hid/irsensor/clustering_processor.h"
-#include "core/hle/service/hid/irsensor/image_transfer_processor.h"
-#include "core/hle/service/hid/irsensor/ir_led_processor.h"
-#include "core/hle/service/hid/irsensor/moment_processor.h"
-#include "core/hle/service/hid/irsensor/pointing_processor.h"
-#include "core/hle/service/hid/irsensor/tera_plugin_processor.h"
#include "core/hle/service/ipc_helpers.h"
#include "core/memory.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/hid_result.h"
+#include "hid_core/hid_util.h"
+#include "hid_core/irsensor/clustering_processor.h"
+#include "hid_core/irsensor/image_transfer_processor.h"
+#include "hid_core/irsensor/ir_led_processor.h"
+#include "hid_core/irsensor/moment_processor.h"
+#include "hid_core/irsensor/pointing_processor.h"
+#include "hid_core/irsensor/tera_plugin_processor.h"
namespace Service::IRS {
diff --git a/src/core/hle/service/hid/irs.h b/src/core/hle/service/hid/irs.h
index c8e6dab17..06b7279ee 100644
--- a/src/core/hle/service/hid/irs.h
+++ b/src/core/hle/service/hid/irs.h
@@ -4,10 +4,10 @@
#pragma once
#include "core/core.h"
-#include "core/hid/hid_types.h"
-#include "core/hid/irs_types.h"
-#include "core/hle/service/hid/irsensor/processor_base.h"
#include "core/hle/service/service.h"
+#include "hid_core/hid_types.h"
+#include "hid_core/irsensor/irs_types.h"
+#include "hid_core/irsensor/processor_base.h"
namespace Core::HID {
class EmulatedController;
diff --git a/src/core/hle/service/nfc/common/device.cpp b/src/core/hle/service/nfc/common/device.cpp
index f97e5b44c..b37fb6da3 100644
--- a/src/core/hle/service/nfc/common/device.cpp
+++ b/src/core/hle/service/nfc/common/device.cpp
@@ -22,9 +22,6 @@
#include "common/string_util.h"
#include "common/tiny_mt.h"
#include "core/core.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
-#include "core/hid/hid_types.h"
#include "core/hle/kernel/k_event.h"
#include "core/hle/service/ipc_helpers.h"
#include "core/hle/service/mii/mii_manager.h"
@@ -33,6 +30,9 @@
#include "core/hle/service/nfc/mifare_result.h"
#include "core/hle/service/nfc/nfc_result.h"
#include "core/hle/service/time/time_manager.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/hid_types.h"
namespace Service::NFC {
NfcDevice::NfcDevice(Core::HID::NpadIdType npad_id_, Core::System& system_,
diff --git a/src/core/hle/service/nfc/common/device_manager.cpp b/src/core/hle/service/nfc/common/device_manager.cpp
index ad534177d..44f651b87 100644
--- a/src/core/hle/service/nfc/common/device_manager.cpp
+++ b/src/core/hle/service/nfc/common/device_manager.cpp
@@ -5,15 +5,15 @@
#include "common/logging/log.h"
#include "core/core.h"
-#include "core/hid/hid_types.h"
#include "core/hle/kernel/k_event.h"
-#include "core/hle/service/hid/hid_util.h"
#include "core/hle/service/ipc_helpers.h"
#include "core/hle/service/nfc/common/device.h"
#include "core/hle/service/nfc/common/device_manager.h"
#include "core/hle/service/nfc/nfc_result.h"
#include "core/hle/service/time/clock_types.h"
#include "core/hle/service/time/time_manager.h"
+#include "hid_core/hid_types.h"
+#include "hid_core/hid_util.h"
namespace Service::NFC {
diff --git a/src/core/hle/service/nfc/common/device_manager.h b/src/core/hle/service/nfc/common/device_manager.h
index c9f038e32..f02bdccf5 100644
--- a/src/core/hle/service/nfc/common/device_manager.h
+++ b/src/core/hle/service/nfc/common/device_manager.h
@@ -8,13 +8,13 @@
#include <optional>
#include <span>
-#include "core/hid/hid_types.h"
#include "core/hle/service/kernel_helpers.h"
#include "core/hle/service/nfc/mifare_types.h"
#include "core/hle/service/nfc/nfc_types.h"
#include "core/hle/service/nfp/nfp_types.h"
#include "core/hle/service/service.h"
#include "core/hle/service/time/clock_types.h"
+#include "hid_core/hid_types.h"
namespace Service::NFC {
class NfcDevice;
diff --git a/src/core/hle/service/nfc/nfc_interface.cpp b/src/core/hle/service/nfc/nfc_interface.cpp
index 179c7ba2c..a71cf74b8 100644
--- a/src/core/hle/service/nfc/nfc_interface.cpp
+++ b/src/core/hle/service/nfc/nfc_interface.cpp
@@ -3,7 +3,6 @@
#include "common/logging/log.h"
#include "core/core.h"
-#include "core/hid/hid_types.h"
#include "core/hle/kernel/k_event.h"
#include "core/hle/service/ipc_helpers.h"
#include "core/hle/service/nfc/common/device.h"
@@ -15,6 +14,7 @@
#include "core/hle/service/nfc/nfc_types.h"
#include "core/hle/service/nfp/nfp_result.h"
#include "core/hle/service/time/clock_types.h"
+#include "hid_core/hid_types.h"
namespace Service::NFC {
diff --git a/src/core/hle/service/nfp/nfp_interface.cpp b/src/core/hle/service/nfp/nfp_interface.cpp
index 34ef9d82d..5ba6d1742 100644
--- a/src/core/hle/service/nfp/nfp_interface.cpp
+++ b/src/core/hle/service/nfp/nfp_interface.cpp
@@ -3,7 +3,6 @@
#include "common/logging/log.h"
#include "core/core.h"
-#include "core/hid/hid_types.h"
#include "core/hle/kernel/k_event.h"
#include "core/hle/service/ipc_helpers.h"
#include "core/hle/service/nfc/common/device.h"
@@ -12,6 +11,7 @@
#include "core/hle/service/nfp/nfp_interface.h"
#include "core/hle/service/nfp/nfp_result.h"
#include "core/hle/service/nfp/nfp_types.h"
+#include "hid_core/hid_types.h"
namespace Service::NFP {
diff --git a/src/core/memory/cheat_engine.cpp b/src/core/memory/cheat_engine.cpp
index 7bc5b5ae5..96fa7fa3a 100644
--- a/src/core/memory/cheat_engine.cpp
+++ b/src/core/memory/cheat_engine.cpp
@@ -9,12 +9,12 @@
#include "core/core_timing.h"
#include "core/hle/kernel/k_page_table.h"
#include "core/hle/kernel/k_process.h"
-#include "core/hle/service/hid/controllers/npad.h"
#include "core/hle/service/hid/hid_server.h"
-#include "core/hle/service/hid/resource_manager.h"
#include "core/hle/service/sm/sm.h"
#include "core/memory.h"
#include "core/memory/cheat_engine.h"
+#include "hid_core/resource_manager.h"
+#include "hid_core/resources/npad/npad.h"
namespace Core::Memory {
namespace {
diff --git a/src/frontend_common/config.cpp b/src/frontend_common/config.cpp
index 20de91ff4..9eb4799a6 100644
--- a/src/frontend_common/config.cpp
+++ b/src/frontend_common/config.cpp
@@ -11,7 +11,7 @@
#include "config.h"
#include "core/core.h"
#include "core/hle/service/acc/profile_manager.h"
-#include "core/hle/service/hid/controllers/npad.h"
+#include "hid_core/resources/npad/npad.h"
#include "network/network.h"
#include <boost/algorithm/string/replace.hpp>
diff --git a/src/hid_core/CMakeLists.txt b/src/hid_core/CMakeLists.txt
new file mode 100644
index 000000000..cce4e6857
--- /dev/null
+++ b/src/hid_core/CMakeLists.txt
@@ -0,0 +1,126 @@
+# SPDX-FileCopyrightText: 2018 yuzu Emulator Project
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+add_library(hid_core STATIC
+ frontend/emulated_console.cpp
+ frontend/emulated_console.h
+ frontend/emulated_controller.cpp
+ frontend/emulated_controller.h
+ frontend/emulated_devices.cpp
+ frontend/emulated_devices.h
+ frontend/input_converter.cpp
+ frontend/input_converter.h
+ frontend/input_interpreter.cpp
+ frontend/input_interpreter.h
+ frontend/motion_input.cpp
+ frontend/motion_input.h
+ hidbus/hidbus_base.cpp
+ hidbus/hidbus_base.h
+ hidbus/ringcon.cpp
+ hidbus/ringcon.h
+ hidbus/starlink.cpp
+ hidbus/starlink.h
+ hidbus/stubbed.cpp
+ hidbus/stubbed.h
+ irsensor/clustering_processor.cpp
+ irsensor/clustering_processor.h
+ irsensor/image_transfer_processor.cpp
+ irsensor/image_transfer_processor.h
+ irsensor/ir_led_processor.cpp
+ irsensor/ir_led_processor.h
+ irsensor/moment_processor.cpp
+ irsensor/moment_processor.h
+ irsensor/pointing_processor.cpp
+ irsensor/pointing_processor.h
+ irsensor/processor_base.cpp
+ irsensor/processor_base.h
+ irsensor/tera_plugin_processor.cpp
+ irsensor/tera_plugin_processor.h
+ resources/debug_pad/debug_pad.cpp
+ resources/debug_pad/debug_pad.h
+ resources/debug_pad/debug_pad_types.h
+ resources/digitizer/digitizer.cpp
+ resources/digitizer/digitizer.h
+ resources/keyboard/keyboard.cpp
+ resources/keyboard/keyboard.h
+ resources/keyboard/keyboard_types.h
+ resources/mouse/debug_mouse.cpp
+ resources/mouse/debug_mouse.h
+ resources/mouse/mouse.cpp
+ resources/mouse/mouse.h
+ resources/mouse/mouse_types.h
+ resources/npad/npad.cpp
+ resources/npad/npad.h
+ resources/npad/npad_data.cpp
+ resources/npad/npad_data.h
+ resources/npad/npad_resource.cpp
+ resources/npad/npad_resource.h
+ resources/npad/npad_types.h
+ resources/palma/palma.cpp
+ resources/palma/palma.h
+ resources/six_axis/console_six_axis.cpp
+ resources/six_axis/console_six_axis.h
+ resources/six_axis/seven_six_axis.cpp
+ resources/six_axis/seven_six_axis.h
+ resources/six_axis/six_axis.cpp
+ resources/six_axis/six_axis.h
+ resources/system_buttons/capture_button.cpp
+ resources/system_buttons/capture_button.h
+ resources/system_buttons/home_button.cpp
+ resources/system_buttons/home_button.h
+ resources/system_buttons/sleep_button.cpp
+ resources/system_buttons/sleep_button.h
+ resources/touch_screen/gesture.cpp
+ resources/touch_screen/gesture.h
+ resources/touch_screen/gesture_types.h
+ resources/touch_screen/touch_screen.cpp
+ resources/touch_screen/touch_screen.h
+ resources/touch_screen/touch_types.h
+ resources/unique_pad/unique_pad.cpp
+ resources/unique_pad/unique_pad.h
+ resources/applet_resource.cpp
+ resources/applet_resource.h
+ resources/controller_base.cpp
+ resources/controller_base.h
+ resources/hid_firmware_settings.cpp
+ resources/hid_firmware_settings.h
+ resources/irs_ring_lifo.h
+ resources/ring_lifo.h
+ resources/shared_memory_format.h
+ resources/shared_memory_holder.cpp
+ resources/shared_memory_holder.h
+ hid_core.cpp
+ hid_core.h
+ hid_result.h
+ hid_types.h
+ hid_util.h
+ precompiled_headers.h
+ resource_manager.cpp
+ resource_manager.h
+)
+
+if (MSVC)
+ target_compile_options(hid_core PRIVATE
+ /we4242 # 'identifier': conversion from 'type1' to 'type2', possible loss of data
+ /we4244 # 'conversion': conversion from 'type1' to 'type2', possible loss of data
+ /we4245 # 'conversion': conversion from 'type1' to 'type2', signed/unsigned mismatch
+ /we4254 # 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data
+ /we4800 # Implicit conversion from 'type' to bool. Possible information loss
+ )
+else()
+ target_compile_options(hid_core PRIVATE
+ -Werror=conversion
+
+ -Wno-sign-conversion
+ -Wno-cast-function-type
+
+ $<$<CXX_COMPILER_ID:Clang>:-fsized-deallocation>
+ )
+endif()
+
+create_target_directory_groups(hid_core)
+target_link_libraries(hid_core PUBLIC core)
+
+if (YUZU_USE_PRECOMPILED_HEADERS)
+ target_precompile_headers(hid_core PRIVATE precompiled_headers.h)
+endif()
diff --git a/src/core/hid/emulated_console.cpp b/src/hid_core/frontend/emulated_console.cpp
index b4afd930e..114c22fb7 100644
--- a/src/core/hid/emulated_console.cpp
+++ b/src/hid_core/frontend/emulated_console.cpp
@@ -2,8 +2,8 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "common/settings.h"
-#include "core/hid/emulated_console.h"
-#include "core/hid/input_converter.h"
+#include "hid_core/frontend/emulated_console.h"
+#include "hid_core/frontend/input_converter.h"
namespace Core::HID {
EmulatedConsole::EmulatedConsole() = default;
diff --git a/src/core/hid/emulated_console.h b/src/hid_core/frontend/emulated_console.h
index fae15a556..847551395 100644
--- a/src/core/hid/emulated_console.h
+++ b/src/hid_core/frontend/emulated_console.h
@@ -17,8 +17,8 @@
#include "common/point.h"
#include "common/quaternion.h"
#include "common/vector_math.h"
-#include "core/hid/hid_types.h"
-#include "core/hid/motion_input.h"
+#include "hid_core/frontend/motion_input.h"
+#include "hid_core/hid_types.h"
namespace Core::HID {
static constexpr std::size_t MaxTouchDevices = 32;
diff --git a/src/core/hid/emulated_controller.cpp b/src/hid_core/frontend/emulated_controller.cpp
index a6e681e15..3d2d1e9f9 100644
--- a/src/core/hid/emulated_controller.cpp
+++ b/src/hid_core/frontend/emulated_controller.cpp
@@ -6,9 +6,9 @@
#include "common/polyfill_ranges.h"
#include "common/thread.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/input_converter.h"
-#include "core/hle/service/hid/hid_util.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/frontend/input_converter.h"
+#include "hid_core/hid_util.h"
namespace Core::HID {
constexpr s32 HID_JOYSTICK_MAX = 0x7fff;
diff --git a/src/core/hid/emulated_controller.h b/src/hid_core/frontend/emulated_controller.h
index d6e20ab66..94798164d 100644
--- a/src/core/hid/emulated_controller.h
+++ b/src/hid_core/frontend/emulated_controller.h
@@ -15,9 +15,9 @@
#include "common/param_package.h"
#include "common/settings.h"
#include "common/vector_math.h"
-#include "core/hid/hid_types.h"
-#include "core/hid/irs_types.h"
-#include "core/hid/motion_input.h"
+#include "hid_core/frontend/motion_input.h"
+#include "hid_core/hid_types.h"
+#include "hid_core/irsensor/irs_types.h"
namespace Core::HID {
const std::size_t max_emulated_controllers = 2;
diff --git a/src/core/hid/emulated_devices.cpp b/src/hid_core/frontend/emulated_devices.cpp
index 8e165dded..a827aa9b7 100644
--- a/src/core/hid/emulated_devices.cpp
+++ b/src/hid_core/frontend/emulated_devices.cpp
@@ -4,8 +4,8 @@
#include <algorithm>
#include <fmt/format.h>
-#include "core/hid/emulated_devices.h"
-#include "core/hid/input_converter.h"
+#include "hid_core/frontend/emulated_devices.h"
+#include "hid_core/frontend/input_converter.h"
namespace Core::HID {
diff --git a/src/core/hid/emulated_devices.h b/src/hid_core/frontend/emulated_devices.h
index 5eab693e4..b2e57318c 100644
--- a/src/core/hid/emulated_devices.h
+++ b/src/hid_core/frontend/emulated_devices.h
@@ -14,7 +14,7 @@
#include "common/input.h"
#include "common/param_package.h"
#include "common/settings.h"
-#include "core/hid/hid_types.h"
+#include "hid_core/hid_types.h"
namespace Core::HID {
using KeyboardDevices = std::array<std::unique_ptr<Common::Input::InputDevice>,
diff --git a/src/core/hid/input_converter.cpp b/src/hid_core/frontend/input_converter.cpp
index a05716fd8..f245a3f76 100644
--- a/src/core/hid/input_converter.cpp
+++ b/src/hid_core/frontend/input_converter.cpp
@@ -5,7 +5,7 @@
#include <random>
#include "common/input.h"
-#include "core/hid/input_converter.h"
+#include "hid_core/frontend/input_converter.h"
namespace Core::HID {
diff --git a/src/core/hid/input_converter.h b/src/hid_core/frontend/input_converter.h
index c51c03e57..c51c03e57 100644
--- a/src/core/hid/input_converter.h
+++ b/src/hid_core/frontend/input_converter.h
diff --git a/src/core/hid/input_interpreter.cpp b/src/hid_core/frontend/input_interpreter.cpp
index 072f38a68..b6c8d8c5d 100644
--- a/src/core/hid/input_interpreter.cpp
+++ b/src/hid_core/frontend/input_interpreter.cpp
@@ -2,12 +2,12 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "core/core.h"
-#include "core/hid/hid_types.h"
-#include "core/hid/input_interpreter.h"
-#include "core/hle/service/hid/controllers/npad.h"
#include "core/hle/service/hid/hid_server.h"
-#include "core/hle/service/hid/resource_manager.h"
#include "core/hle/service/sm/sm.h"
+#include "hid_core/frontend/input_interpreter.h"
+#include "hid_core/hid_types.h"
+#include "hid_core/resource_manager.h"
+#include "hid_core/resources/npad/npad.h"
InputInterpreter::InputInterpreter(Core::System& system)
: npad{system.ServiceManager()
diff --git a/src/core/hid/input_interpreter.h b/src/hid_core/frontend/input_interpreter.h
index 3569aac93..3569aac93 100644
--- a/src/core/hid/input_interpreter.h
+++ b/src/hid_core/frontend/input_interpreter.h
diff --git a/src/core/hid/motion_input.cpp b/src/hid_core/frontend/motion_input.cpp
index f56f2ae1d..417cd03f9 100644
--- a/src/core/hid/motion_input.cpp
+++ b/src/hid_core/frontend/motion_input.cpp
@@ -4,7 +4,7 @@
#include <cmath>
#include "common/math_util.h"
-#include "core/hid/motion_input.h"
+#include "hid_core/frontend/motion_input.h"
namespace Core::HID {
diff --git a/src/core/hid/motion_input.h b/src/hid_core/frontend/motion_input.h
index 11678983d..11678983d 100644
--- a/src/core/hid/motion_input.h
+++ b/src/hid_core/frontend/motion_input.h
diff --git a/src/core/hid/hid_core.cpp b/src/hid_core/hid_core.cpp
index 2cf25a870..410c84afb 100644
--- a/src/core/hid/hid_core.cpp
+++ b/src/hid_core/hid_core.cpp
@@ -2,11 +2,11 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "common/assert.h"
-#include "core/hid/emulated_console.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/emulated_devices.h"
-#include "core/hid/hid_core.h"
-#include "core/hle/service/hid/hid_util.h"
+#include "hid_core/frontend/emulated_console.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/frontend/emulated_devices.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/hid_util.h"
namespace Core::HID {
diff --git a/src/core/hid/hid_core.h b/src/hid_core/hid_core.h
index 80abab18b..dae29c506 100644
--- a/src/core/hid/hid_core.h
+++ b/src/hid_core/hid_core.h
@@ -6,7 +6,7 @@
#include <memory>
#include "common/common_funcs.h"
-#include "core/hid/hid_types.h"
+#include "hid_core/hid_types.h"
namespace Core::HID {
class EmulatedConsole;
diff --git a/src/core/hle/service/hid/errors.h b/src/hid_core/hid_result.h
index bb14aa61e..bb14aa61e 100644
--- a/src/core/hle/service/hid/errors.h
+++ b/src/hid_core/hid_result.h
diff --git a/src/core/hid/hid_types.h b/src/hid_core/hid_types.h
index a81ed6af0..a81ed6af0 100644
--- a/src/core/hid/hid_types.h
+++ b/src/hid_core/hid_types.h
diff --git a/src/core/hle/service/hid/hid_util.h b/src/hid_core/hid_util.h
index 6a2ed287a..94ff2d23a 100644
--- a/src/core/hle/service/hid/hid_util.h
+++ b/src/hid_core/hid_util.h
@@ -3,8 +3,8 @@
#pragma once
-#include "core/hid/hid_types.h"
-#include "core/hle/service/hid/errors.h"
+#include "hid_core/hid_result.h"
+#include "hid_core/hid_types.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/hidbus/hidbus_base.cpp b/src/hid_core/hidbus/hidbus_base.cpp
index 8c44f93e8..632bb173b 100644
--- a/src/core/hle/service/hid/hidbus/hidbus_base.cpp
+++ b/src/hid_core/hidbus/hidbus_base.cpp
@@ -1,11 +1,11 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
-#include "core/hid/hid_core.h"
#include "core/hle/kernel/k_event.h"
#include "core/hle/kernel/k_readable_event.h"
-#include "core/hle/service/hid/hidbus/hidbus_base.h"
#include "core/hle/service/kernel_helpers.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/hidbus/hidbus_base.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/hidbus/hidbus_base.h b/src/hid_core/hidbus/hidbus_base.h
index ec41684e1..ec41684e1 100644
--- a/src/core/hle/service/hid/hidbus/hidbus_base.h
+++ b/src/hid_core/hidbus/hidbus_base.h
diff --git a/src/core/hle/service/hid/hidbus/ringcon.cpp b/src/hid_core/hidbus/ringcon.cpp
index 378108012..cedf25c16 100644
--- a/src/core/hle/service/hid/hidbus/ringcon.cpp
+++ b/src/hid_core/hidbus/ringcon.cpp
@@ -2,12 +2,12 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "core/core.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
#include "core/hle/kernel/k_event.h"
#include "core/hle/kernel/k_readable_event.h"
-#include "core/hle/service/hid/hidbus/ringcon.h"
#include "core/memory.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/hidbus/ringcon.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/hidbus/ringcon.h b/src/hid_core/hidbus/ringcon.h
index f42f3ea41..0953e8100 100644
--- a/src/core/hle/service/hid/hidbus/ringcon.h
+++ b/src/hid_core/hidbus/ringcon.h
@@ -7,7 +7,7 @@
#include <span>
#include "common/common_types.h"
-#include "core/hle/service/hid/hidbus/hidbus_base.h"
+#include "hid_core/hidbus/hidbus_base.h"
namespace Core::HID {
class EmulatedController;
diff --git a/src/core/hle/service/hid/hidbus/starlink.cpp b/src/hid_core/hidbus/starlink.cpp
index 36573274e..31b263aa1 100644
--- a/src/core/hle/service/hid/hidbus/starlink.cpp
+++ b/src/hid_core/hidbus/starlink.cpp
@@ -1,9 +1,9 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
-#include "core/hle/service/hid/hidbus/starlink.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/hidbus/starlink.h"
namespace Service::HID {
constexpr u8 DEVICE_ID = 0x28;
diff --git a/src/core/hle/service/hid/hidbus/starlink.h b/src/hid_core/hidbus/starlink.h
index a276aa88f..ee37763b4 100644
--- a/src/core/hle/service/hid/hidbus/starlink.h
+++ b/src/hid_core/hidbus/starlink.h
@@ -4,7 +4,7 @@
#pragma once
#include "common/common_types.h"
-#include "core/hle/service/hid/hidbus/hidbus_base.h"
+#include "hid_core/hidbus/hidbus_base.h"
namespace Core::HID {
class EmulatedController;
diff --git a/src/core/hle/service/hid/hidbus/stubbed.cpp b/src/hid_core/hidbus/stubbed.cpp
index 8160b7218..f16051aa9 100644
--- a/src/core/hle/service/hid/hidbus/stubbed.cpp
+++ b/src/hid_core/hidbus/stubbed.cpp
@@ -1,9 +1,9 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
-#include "core/hle/service/hid/hidbus/stubbed.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/hidbus/stubbed.h"
namespace Service::HID {
constexpr u8 DEVICE_ID = 0xFF;
diff --git a/src/core/hle/service/hid/hidbus/stubbed.h b/src/hid_core/hidbus/stubbed.h
index 2e58d42fc..7a711cea0 100644
--- a/src/core/hle/service/hid/hidbus/stubbed.h
+++ b/src/hid_core/hidbus/stubbed.h
@@ -4,7 +4,7 @@
#pragma once
#include "common/common_types.h"
-#include "core/hle/service/hid/hidbus/hidbus_base.h"
+#include "hid_core/hidbus/hidbus_base.h"
namespace Core::HID {
class EmulatedController;
diff --git a/src/core/hle/service/hid/irsensor/clustering_processor.cpp b/src/hid_core/irsensor/clustering_processor.cpp
index c559eb0d5..3abe19365 100644
--- a/src/core/hle/service/hid/irsensor/clustering_processor.cpp
+++ b/src/hid_core/irsensor/clustering_processor.cpp
@@ -5,9 +5,9 @@
#include "core/core.h"
#include "core/core_timing.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
-#include "core/hle/service/hid/irsensor/clustering_processor.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/irsensor/clustering_processor.h"
namespace Service::IRS {
ClusteringProcessor::ClusteringProcessor(Core::System& system_,
diff --git a/src/core/hle/service/hid/irsensor/clustering_processor.h b/src/hid_core/irsensor/clustering_processor.h
index 83f34734a..e3b60d9b0 100644
--- a/src/core/hle/service/hid/irsensor/clustering_processor.h
+++ b/src/hid_core/irsensor/clustering_processor.h
@@ -4,9 +4,9 @@
#pragma once
#include "common/common_types.h"
-#include "core/hid/irs_types.h"
-#include "core/hle/service/hid/irs_ring_lifo.h"
-#include "core/hle/service/hid/irsensor/processor_base.h"
+#include "hid_core/irsensor/irs_types.h"
+#include "hid_core/irsensor/processor_base.h"
+#include "hid_core/resources/irs_ring_lifo.h"
namespace Core {
class System;
diff --git a/src/core/hle/service/hid/irsensor/image_transfer_processor.cpp b/src/hid_core/irsensor/image_transfer_processor.cpp
index 22067a591..d6573f8dc 100644
--- a/src/core/hle/service/hid/irsensor/image_transfer_processor.cpp
+++ b/src/hid_core/irsensor/image_transfer_processor.cpp
@@ -2,10 +2,10 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "core/core.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
-#include "core/hle/service/hid/irsensor/image_transfer_processor.h"
#include "core/memory.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/irsensor/image_transfer_processor.h"
namespace Service::IRS {
ImageTransferProcessor::ImageTransferProcessor(Core::System& system_,
diff --git a/src/core/hle/service/hid/irsensor/image_transfer_processor.h b/src/hid_core/irsensor/image_transfer_processor.h
index 7f42d8453..4e0117084 100644
--- a/src/core/hle/service/hid/irsensor/image_transfer_processor.h
+++ b/src/hid_core/irsensor/image_transfer_processor.h
@@ -4,8 +4,8 @@
#pragma once
#include "common/typed_address.h"
-#include "core/hid/irs_types.h"
-#include "core/hle/service/hid/irsensor/processor_base.h"
+#include "hid_core/irsensor/irs_types.h"
+#include "hid_core/irsensor/processor_base.h"
namespace Core {
class System;
diff --git a/src/core/hle/service/hid/irsensor/ir_led_processor.cpp b/src/hid_core/irsensor/ir_led_processor.cpp
index 8e6dd99e4..4b04e05b5 100644
--- a/src/core/hle/service/hid/irsensor/ir_led_processor.cpp
+++ b/src/hid_core/irsensor/ir_led_processor.cpp
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
-#include "core/hle/service/hid/irsensor/ir_led_processor.h"
+#include "hid_core/irsensor/ir_led_processor.h"
namespace Service::IRS {
IrLedProcessor::IrLedProcessor(Core::IrSensor::DeviceFormat& device_format)
diff --git a/src/core/hle/service/hid/irsensor/ir_led_processor.h b/src/hid_core/irsensor/ir_led_processor.h
index c3d8693c9..03d0c4245 100644
--- a/src/core/hle/service/hid/irsensor/ir_led_processor.h
+++ b/src/hid_core/irsensor/ir_led_processor.h
@@ -5,8 +5,8 @@
#include "common/bit_field.h"
#include "common/common_types.h"
-#include "core/hid/irs_types.h"
-#include "core/hle/service/hid/irsensor/processor_base.h"
+#include "hid_core/irsensor/irs_types.h"
+#include "hid_core/irsensor/processor_base.h"
namespace Service::IRS {
class IrLedProcessor final : public ProcessorBase {
diff --git a/src/core/hid/irs_types.h b/src/hid_core/irsensor/irs_types.h
index 0d1bfe53f..017f38e6c 100644
--- a/src/core/hid/irs_types.h
+++ b/src/hid_core/irsensor/irs_types.h
@@ -5,7 +5,7 @@
#include "common/common_funcs.h"
#include "common/common_types.h"
-#include "core/hid/hid_types.h"
+#include "hid_core/hid_types.h"
namespace Core::IrSensor {
diff --git a/src/core/hle/service/hid/irsensor/moment_processor.cpp b/src/hid_core/irsensor/moment_processor.cpp
index cf045bda7..0284a58bd 100644
--- a/src/core/hle/service/hid/irsensor/moment_processor.cpp
+++ b/src/hid_core/irsensor/moment_processor.cpp
@@ -3,9 +3,9 @@
#include "core/core.h"
#include "core/core_timing.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
-#include "core/hle/service/hid/irsensor/moment_processor.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/irsensor/moment_processor.h"
namespace Service::IRS {
static constexpr auto format = Core::IrSensor::ImageTransferProcessorFormat::Size40x30;
diff --git a/src/core/hle/service/hid/irsensor/moment_processor.h b/src/hid_core/irsensor/moment_processor.h
index 398cfbdc1..78c9c035f 100644
--- a/src/core/hle/service/hid/irsensor/moment_processor.h
+++ b/src/hid_core/irsensor/moment_processor.h
@@ -5,9 +5,9 @@
#include "common/bit_field.h"
#include "common/common_types.h"
-#include "core/hid/irs_types.h"
-#include "core/hle/service/hid/irs_ring_lifo.h"
-#include "core/hle/service/hid/irsensor/processor_base.h"
+#include "hid_core/irsensor/irs_types.h"
+#include "hid_core/irsensor/processor_base.h"
+#include "hid_core/resources/irs_ring_lifo.h"
namespace Core {
class System;
diff --git a/src/core/hle/service/hid/irsensor/pointing_processor.cpp b/src/hid_core/irsensor/pointing_processor.cpp
index 929f177fc..c1d6c1bb6 100644
--- a/src/core/hle/service/hid/irsensor/pointing_processor.cpp
+++ b/src/hid_core/irsensor/pointing_processor.cpp
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
-#include "core/hle/service/hid/irsensor/pointing_processor.h"
+#include "hid_core/irsensor/pointing_processor.h"
namespace Service::IRS {
PointingProcessor::PointingProcessor(Core::IrSensor::DeviceFormat& device_format)
diff --git a/src/core/hle/service/hid/irsensor/pointing_processor.h b/src/hid_core/irsensor/pointing_processor.h
index d63423aff..968c2e5bd 100644
--- a/src/core/hle/service/hid/irsensor/pointing_processor.h
+++ b/src/hid_core/irsensor/pointing_processor.h
@@ -4,8 +4,8 @@
#pragma once
#include "common/common_types.h"
-#include "core/hid/irs_types.h"
-#include "core/hle/service/hid/irsensor/processor_base.h"
+#include "hid_core/irsensor/irs_types.h"
+#include "hid_core/irsensor/processor_base.h"
namespace Service::IRS {
class PointingProcessor final : public ProcessorBase {
diff --git a/src/core/hle/service/hid/irsensor/processor_base.cpp b/src/hid_core/irsensor/processor_base.cpp
index 4d43ca17a..91a513a70 100644
--- a/src/core/hle/service/hid/irsensor/processor_base.cpp
+++ b/src/hid_core/irsensor/processor_base.cpp
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
-#include "core/hle/service/hid/irsensor/processor_base.h"
+#include "hid_core/irsensor/processor_base.h"
namespace Service::IRS {
diff --git a/src/core/hle/service/hid/irsensor/processor_base.h b/src/hid_core/irsensor/processor_base.h
index bc0d2977b..48beeafba 100644
--- a/src/core/hle/service/hid/irsensor/processor_base.h
+++ b/src/hid_core/irsensor/processor_base.h
@@ -4,7 +4,7 @@
#pragma once
#include "common/common_types.h"
-#include "core/hid/irs_types.h"
+#include "hid_core/irsensor/irs_types.h"
namespace Service::IRS {
class ProcessorBase {
diff --git a/src/core/hle/service/hid/irsensor/tera_plugin_processor.cpp b/src/hid_core/irsensor/tera_plugin_processor.cpp
index e691c840a..2382e208a 100644
--- a/src/core/hle/service/hid/irsensor/tera_plugin_processor.cpp
+++ b/src/hid_core/irsensor/tera_plugin_processor.cpp
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
-#include "core/hle/service/hid/irsensor/tera_plugin_processor.h"
+#include "hid_core/irsensor/tera_plugin_processor.h"
namespace Service::IRS {
TeraPluginProcessor::TeraPluginProcessor(Core::IrSensor::DeviceFormat& device_format)
diff --git a/src/core/hle/service/hid/irsensor/tera_plugin_processor.h b/src/hid_core/irsensor/tera_plugin_processor.h
index bbea7ed0b..dc8fe7d07 100644
--- a/src/core/hle/service/hid/irsensor/tera_plugin_processor.h
+++ b/src/hid_core/irsensor/tera_plugin_processor.h
@@ -5,8 +5,8 @@
#include "common/bit_field.h"
#include "common/common_types.h"
-#include "core/hid/irs_types.h"
-#include "core/hle/service/hid/irsensor/processor_base.h"
+#include "hid_core/irsensor/irs_types.h"
+#include "hid_core/irsensor/processor_base.h"
namespace Service::IRS {
class TeraPluginProcessor final : public ProcessorBase {
diff --git a/src/hid_core/precompiled_headers.h b/src/hid_core/precompiled_headers.h
new file mode 100644
index 000000000..aabae730b
--- /dev/null
+++ b/src/hid_core/precompiled_headers.h
@@ -0,0 +1,6 @@
+// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include "common/common_precompiled_headers.h"
diff --git a/src/core/hle/service/hid/resource_manager.cpp b/src/hid_core/resource_manager.cpp
index 1f41e645d..17dacef6e 100644
--- a/src/core/hle/service/hid/resource_manager.cpp
+++ b/src/hid_core/resource_manager.cpp
@@ -4,29 +4,29 @@
#include "common/logging/log.h"
#include "core/core.h"
#include "core/core_timing.h"
-#include "core/hid/hid_core.h"
#include "core/hle/kernel/k_shared_memory.h"
-#include "core/hle/service/hid/resource_manager.h"
#include "core/hle/service/ipc_helpers.h"
-
-#include "core/hle/service/hid/controllers/applet_resource.h"
-#include "core/hle/service/hid/controllers/capture_button.h"
-#include "core/hle/service/hid/controllers/console_six_axis.h"
-#include "core/hle/service/hid/controllers/debug_mouse.h"
-#include "core/hle/service/hid/controllers/debug_pad.h"
-#include "core/hle/service/hid/controllers/digitizer.h"
-#include "core/hle/service/hid/controllers/gesture.h"
-#include "core/hle/service/hid/controllers/home_button.h"
-#include "core/hle/service/hid/controllers/keyboard.h"
-#include "core/hle/service/hid/controllers/mouse.h"
-#include "core/hle/service/hid/controllers/npad.h"
-#include "core/hle/service/hid/controllers/palma.h"
-#include "core/hle/service/hid/controllers/seven_six_axis.h"
-#include "core/hle/service/hid/controllers/six_axis.h"
-#include "core/hle/service/hid/controllers/sleep_button.h"
-#include "core/hle/service/hid/controllers/touchscreen.h"
-#include "core/hle/service/hid/controllers/types/shared_memory_format.h"
-#include "core/hle/service/hid/controllers/unique_pad.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/resource_manager.h"
+
+#include "hid_core/resources/applet_resource.h"
+#include "hid_core/resources/debug_pad/debug_pad.h"
+#include "hid_core/resources/digitizer/digitizer.h"
+#include "hid_core/resources/keyboard/keyboard.h"
+#include "hid_core/resources/mouse/debug_mouse.h"
+#include "hid_core/resources/mouse/mouse.h"
+#include "hid_core/resources/npad/npad.h"
+#include "hid_core/resources/palma/palma.h"
+#include "hid_core/resources/shared_memory_format.h"
+#include "hid_core/resources/six_axis/console_six_axis.h"
+#include "hid_core/resources/six_axis/seven_six_axis.h"
+#include "hid_core/resources/six_axis/six_axis.h"
+#include "hid_core/resources/system_buttons/capture_button.h"
+#include "hid_core/resources/system_buttons/home_button.h"
+#include "hid_core/resources/system_buttons/sleep_button.h"
+#include "hid_core/resources/touch_screen/gesture.h"
+#include "hid_core/resources/touch_screen/touch_screen.h"
+#include "hid_core/resources/unique_pad/unique_pad.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/resource_manager.h b/src/hid_core/resource_manager.h
index 7a21d8eb8..7a21d8eb8 100644
--- a/src/core/hle/service/hid/resource_manager.h
+++ b/src/hid_core/resource_manager.h
diff --git a/src/core/hle/service/hid/controllers/applet_resource.cpp b/src/hid_core/resources/applet_resource.cpp
index b4ff663c2..d16cff1a4 100644
--- a/src/core/hle/service/hid/controllers/applet_resource.cpp
+++ b/src/hid_core/resources/applet_resource.cpp
@@ -3,9 +3,9 @@
#include "core/core.h"
#include "core/hle/kernel/k_shared_memory.h"
-#include "core/hle/service/hid/controllers/applet_resource.h"
-#include "core/hle/service/hid/controllers/types/shared_memory_format.h"
-#include "core/hle/service/hid/errors.h"
+#include "hid_core/hid_result.h"
+#include "hid_core/resources/applet_resource.h"
+#include "hid_core/resources/shared_memory_format.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/applet_resource.h b/src/hid_core/resources/applet_resource.h
index 0862fdc2f..f3f32bac1 100644
--- a/src/core/hle/service/hid/controllers/applet_resource.h
+++ b/src/hid_core/resources/applet_resource.h
@@ -9,7 +9,7 @@
#include "common/bit_field.h"
#include "common/common_types.h"
#include "core/hle/result.h"
-#include "core/hle/service/hid/controllers/shared_memory_holder.h"
+#include "hid_core/resources/shared_memory_holder.h"
namespace Core {
class System;
diff --git a/src/core/hle/service/hid/controllers/controller_base.cpp b/src/hid_core/resources/controller_base.cpp
index afca7154c..df5f5c884 100644
--- a/src/core/hle/service/hid/controllers/controller_base.cpp
+++ b/src/hid_core/resources/controller_base.cpp
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
-#include "core/hle/service/hid/controllers/controller_base.h"
+#include "hid_core/resources/controller_base.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/controller_base.h b/src/hid_core/resources/controller_base.h
index b34b85ece..e61bc6376 100644
--- a/src/core/hle/service/hid/controllers/controller_base.h
+++ b/src/hid_core/resources/controller_base.h
@@ -7,7 +7,7 @@
#include "common/common_types.h"
#include "core/hle/result.h"
-#include "core/hle/service/hid/controllers/applet_resource.h"
+#include "hid_core/resources/applet_resource.h"
namespace Core::Timing {
class CoreTiming;
diff --git a/src/core/hle/service/hid/controllers/debug_pad.cpp b/src/hid_core/resources/debug_pad/debug_pad.cpp
index dc83f90f3..1102dad6c 100644
--- a/src/core/hle/service/hid/controllers/debug_pad.cpp
+++ b/src/hid_core/resources/debug_pad/debug_pad.cpp
@@ -3,12 +3,12 @@
#include "common/settings.h"
#include "core/core_timing.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
-#include "core/hid/hid_types.h"
-#include "core/hle/service/hid/controllers/applet_resource.h"
-#include "core/hle/service/hid/controllers/debug_pad.h"
-#include "core/hle/service/hid/controllers/types/shared_memory_format.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/hid_types.h"
+#include "hid_core/resources/applet_resource.h"
+#include "hid_core/resources/debug_pad/debug_pad.h"
+#include "hid_core/resources/shared_memory_format.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/debug_pad.h b/src/hid_core/resources/debug_pad/debug_pad.h
index dd00b2402..73c3d4421 100644
--- a/src/core/hle/service/hid/controllers/debug_pad.h
+++ b/src/hid_core/resources/debug_pad/debug_pad.h
@@ -3,12 +3,13 @@
#pragma once
-#include "core/hle/service/hid/controllers/controller_base.h"
-#include "core/hle/service/hid/controllers/types/debug_pad_types.h"
+#include "hid_core/resources/controller_base.h"
+#include "hid_core/resources/debug_pad/debug_pad_types.h"
namespace Core::HID {
class HIDCore;
-}
+class EmulatedController;
+} // namespace Core::HID
namespace Core::Timing {
class CoreTiming;
diff --git a/src/core/hle/service/hid/controllers/types/debug_pad_types.h b/src/hid_core/resources/debug_pad/debug_pad_types.h
index a96171b62..8b5eb108e 100644
--- a/src/core/hle/service/hid/controllers/types/debug_pad_types.h
+++ b/src/hid_core/resources/debug_pad/debug_pad_types.h
@@ -5,7 +5,7 @@
#include "common/bit_field.h"
#include "common/common_types.h"
-#include "core/hid/hid_types.h"
+#include "hid_core/hid_types.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/digitizer.cpp b/src/hid_core/resources/digitizer/digitizer.cpp
index d5514c965..cd72fd6e5 100644
--- a/src/core/hle/service/hid/controllers/digitizer.cpp
+++ b/src/hid_core/resources/digitizer/digitizer.cpp
@@ -2,9 +2,9 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "core/core_timing.h"
-#include "core/hle/service/hid/controllers/applet_resource.h"
-#include "core/hle/service/hid/controllers/digitizer.h"
-#include "core/hle/service/hid/controllers/types/shared_memory_format.h"
+#include "hid_core/resources/applet_resource.h"
+#include "hid_core/resources/digitizer/digitizer.h"
+#include "hid_core/resources/shared_memory_format.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/digitizer.h b/src/hid_core/resources/digitizer/digitizer.h
index d81f814c3..e031a16b0 100644
--- a/src/core/hle/service/hid/controllers/digitizer.h
+++ b/src/hid_core/resources/digitizer/digitizer.h
@@ -3,7 +3,7 @@
#pragma once
-#include "core/hle/service/hid/controllers/controller_base.h"
+#include "hid_core/resources/controller_base.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/hid_firmware_settings.cpp b/src/hid_core/resources/hid_firmware_settings.cpp
index 59bd6825c..e76b3a016 100644
--- a/src/core/hle/service/hid/hid_firmware_settings.cpp
+++ b/src/hid_core/resources/hid_firmware_settings.cpp
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
-#include "core/hle/service/hid/hid_firmware_settings.h"
+#include "hid_core/resources/hid_firmware_settings.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/hid_firmware_settings.h b/src/hid_core/resources/hid_firmware_settings.h
index 6c10c440b..6c10c440b 100644
--- a/src/core/hle/service/hid/hid_firmware_settings.h
+++ b/src/hid_core/resources/hid_firmware_settings.h
diff --git a/src/core/hle/service/hid/irs_ring_lifo.h b/src/hid_core/resources/irs_ring_lifo.h
index 255d1d296..255d1d296 100644
--- a/src/core/hle/service/hid/irs_ring_lifo.h
+++ b/src/hid_core/resources/irs_ring_lifo.h
diff --git a/src/core/hle/service/hid/controllers/keyboard.cpp b/src/hid_core/resources/keyboard/keyboard.cpp
index c069bcbb2..340e8a65c 100644
--- a/src/core/hle/service/hid/controllers/keyboard.cpp
+++ b/src/hid_core/resources/keyboard/keyboard.cpp
@@ -3,11 +3,11 @@
#include "common/settings.h"
#include "core/core_timing.h"
-#include "core/hid/emulated_devices.h"
-#include "core/hid/hid_core.h"
-#include "core/hle/service/hid/controllers/applet_resource.h"
-#include "core/hle/service/hid/controllers/keyboard.h"
-#include "core/hle/service/hid/controllers/types/shared_memory_format.h"
+#include "hid_core/frontend/emulated_devices.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/resources/applet_resource.h"
+#include "hid_core/resources/keyboard/keyboard.h"
+#include "hid_core/resources/shared_memory_format.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/keyboard.h b/src/hid_core/resources/keyboard/keyboard.h
index e8ca326c6..4bcc1c1b2 100644
--- a/src/core/hle/service/hid/controllers/keyboard.h
+++ b/src/hid_core/resources/keyboard/keyboard.h
@@ -3,8 +3,13 @@
#pragma once
-#include "core/hle/service/hid/controllers/controller_base.h"
-#include "core/hle/service/hid/controllers/types/keyboard_types.h"
+#include "hid_core/resources/controller_base.h"
+#include "hid_core/resources/keyboard/keyboard_types.h"
+
+namespace Core::HID {
+class HIDCore;
+class EmulatedDevices;
+} // namespace Core::HID
namespace Service::HID {
class Keyboard final : public ControllerBase {
diff --git a/src/core/hle/service/hid/controllers/types/keyboard_types.h b/src/hid_core/resources/keyboard/keyboard_types.h
index f44a536b9..4d7ff2f0a 100644
--- a/src/core/hle/service/hid/controllers/types/keyboard_types.h
+++ b/src/hid_core/resources/keyboard/keyboard_types.h
@@ -4,7 +4,7 @@
#pragma once
#include "common/common_types.h"
-#include "core/hid/hid_types.h"
+#include "hid_core/hid_types.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/debug_mouse.cpp b/src/hid_core/resources/mouse/debug_mouse.cpp
index ceeb78d36..5f6f6e8e1 100644
--- a/src/core/hle/service/hid/controllers/debug_mouse.cpp
+++ b/src/hid_core/resources/mouse/debug_mouse.cpp
@@ -3,11 +3,11 @@
#include "core/core_timing.h"
#include "core/frontend/emu_window.h"
-#include "core/hid/emulated_devices.h"
-#include "core/hid/hid_core.h"
-#include "core/hle/service/hid/controllers/applet_resource.h"
-#include "core/hle/service/hid/controllers/debug_mouse.h"
-#include "core/hle/service/hid/controllers/types/shared_memory_format.h"
+#include "hid_core/frontend/emulated_devices.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/resources/applet_resource.h"
+#include "hid_core/resources/mouse/debug_mouse.h"
+#include "hid_core/resources/shared_memory_format.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/debug_mouse.h b/src/hid_core/resources/mouse/debug_mouse.h
index ec939fa9f..006b53da6 100644
--- a/src/core/hle/service/hid/controllers/debug_mouse.h
+++ b/src/hid_core/resources/mouse/debug_mouse.h
@@ -3,12 +3,12 @@
#pragma once
-#include "core/hle/service/hid/controllers/controller_base.h"
+#include "hid_core/hid_types.h"
+#include "hid_core/resources/controller_base.h"
namespace Core::HID {
+class HIDCore;
class EmulatedDevices;
-struct MouseState;
-struct AnalogStickState;
} // namespace Core::HID
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/mouse.cpp b/src/hid_core/resources/mouse/mouse.cpp
index 3a8d1751b..53a8938a1 100644
--- a/src/core/hle/service/hid/controllers/mouse.cpp
+++ b/src/hid_core/resources/mouse/mouse.cpp
@@ -3,11 +3,11 @@
#include "core/core_timing.h"
#include "core/frontend/emu_window.h"
-#include "core/hid/emulated_devices.h"
-#include "core/hid/hid_core.h"
-#include "core/hle/service/hid/controllers/applet_resource.h"
-#include "core/hle/service/hid/controllers/mouse.h"
-#include "core/hle/service/hid/controllers/types/shared_memory_format.h"
+#include "hid_core/frontend/emulated_devices.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/resources/applet_resource.h"
+#include "hid_core/resources/mouse/mouse.h"
+#include "hid_core/resources/shared_memory_format.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/mouse.h b/src/hid_core/resources/mouse/mouse.h
index cefad956c..e9ac6ad36 100644
--- a/src/core/hle/service/hid/controllers/mouse.h
+++ b/src/hid_core/resources/mouse/mouse.h
@@ -3,12 +3,12 @@
#pragma once
-#include "core/hle/service/hid/controllers/controller_base.h"
+#include "hid_core/hid_types.h"
+#include "hid_core/resources/controller_base.h"
namespace Core::HID {
+class HIDCore;
class EmulatedDevices;
-struct MouseState;
-struct AnalogStickState;
} // namespace Core::HID
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/types/mouse_types.h b/src/hid_core/resources/mouse/mouse_types.h
index 8bd6e167c..8bd6e167c 100644
--- a/src/core/hle/service/hid/controllers/types/mouse_types.h
+++ b/src/hid_core/resources/mouse/mouse_types.h
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/hid_core/resources/npad/npad.cpp
index 17cd0d7a0..e6c035628 100644
--- a/src/core/hle/service/hid/controllers/npad.cpp
+++ b/src/hid_core/resources/npad/npad.cpp
@@ -12,16 +12,16 @@
#include "common/logging/log.h"
#include "common/settings.h"
#include "core/core_timing.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
#include "core/hle/kernel/k_event.h"
#include "core/hle/kernel/k_readable_event.h"
-#include "core/hle/service/hid/controllers/applet_resource.h"
-#include "core/hle/service/hid/controllers/npad.h"
-#include "core/hle/service/hid/controllers/types/shared_memory_format.h"
-#include "core/hle/service/hid/errors.h"
-#include "core/hle/service/hid/hid_util.h"
#include "core/hle/service/kernel_helpers.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/hid_result.h"
+#include "hid_core/hid_util.h"
+#include "hid_core/resources/applet_resource.h"
+#include "hid_core/resources/npad/npad.h"
+#include "hid_core/resources/shared_memory_format.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/npad.h b/src/hid_core/resources/npad/npad.h
index 8ab333064..58f8c7acf 100644
--- a/src/core/hle/service/hid/controllers/npad.h
+++ b/src/hid_core/resources/npad/npad.h
@@ -9,10 +9,10 @@
#include <span>
#include "common/common_types.h"
-#include "core/hid/hid_types.h"
-#include "core/hle/service/hid/controllers/controller_base.h"
-#include "core/hle/service/hid/controllers/npad/npad_resource.h"
-#include "core/hle/service/hid/controllers/types/npad_types.h"
+#include "hid_core/hid_types.h"
+#include "hid_core/resources/controller_base.h"
+#include "hid_core/resources/npad/npad_resource.h"
+#include "hid_core/resources/npad/npad_types.h"
namespace Core::HID {
class EmulatedController;
diff --git a/src/core/hle/service/hid/controllers/npad/npad_data.cpp b/src/hid_core/resources/npad/npad_data.cpp
index d2423b6d3..c7e9760cb 100644
--- a/src/core/hle/service/hid/controllers/npad/npad_data.cpp
+++ b/src/hid_core/resources/npad/npad_data.cpp
@@ -1,8 +1,8 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
-#include "core/hle/service/hid/controllers/npad/npad_data.h"
-#include "core/hle/service/hid/hid_util.h"
+#include "hid_core/hid_util.h"
+#include "hid_core/resources/npad/npad_data.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/npad/npad_data.h b/src/hid_core/resources/npad/npad_data.h
index f799a9f9c..86bd3b81c 100644
--- a/src/core/hle/service/hid/controllers/npad/npad_data.h
+++ b/src/hid_core/resources/npad/npad_data.h
@@ -7,9 +7,9 @@
#include <span>
#include "common/common_types.h"
-#include "core/hid/hid_types.h"
#include "core/hle/result.h"
-#include "core/hle/service/hid/controllers/types/npad_types.h"
+#include "hid_core/hid_types.h"
+#include "hid_core/resources/npad/npad_types.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/npad/npad_resource.cpp b/src/hid_core/resources/npad/npad_resource.cpp
index 0a9341a39..b0255a05c 100644
--- a/src/core/hle/service/hid/controllers/npad/npad_resource.cpp
+++ b/src/hid_core/resources/npad/npad_resource.cpp
@@ -3,10 +3,10 @@
#include "core/hle/kernel/k_event.h"
#include "core/hle/kernel/k_readable_event.h"
-#include "core/hle/service/hid/controllers/npad/npad_resource.h"
-#include "core/hle/service/hid/controllers/types/npad_types.h"
-#include "core/hle/service/hid/errors.h"
-#include "core/hle/service/hid/hid_util.h"
+#include "hid_core/hid_result.h"
+#include "hid_core/hid_util.h"
+#include "hid_core/resources/npad/npad_resource.h"
+#include "hid_core/resources/npad/npad_types.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/npad/npad_resource.h b/src/hid_core/resources/npad/npad_resource.h
index 4c7e6ab0e..aed89eec6 100644
--- a/src/core/hle/service/hid/controllers/npad/npad_resource.h
+++ b/src/hid_core/resources/npad/npad_resource.h
@@ -8,12 +8,12 @@
#include <span>
#include "common/common_types.h"
-#include "core/hid/hid_types.h"
#include "core/hle/result.h"
-#include "core/hle/service/hid/controllers/applet_resource.h"
-#include "core/hle/service/hid/controllers/npad/npad_data.h"
-#include "core/hle/service/hid/controllers/types/npad_types.h"
#include "core/hle/service/kernel_helpers.h"
+#include "hid_core/hid_types.h"
+#include "hid_core/resources/applet_resource.h"
+#include "hid_core/resources/npad/npad_data.h"
+#include "hid_core/resources/npad/npad_types.h"
namespace Core {
class System;
diff --git a/src/core/hle/service/hid/controllers/types/npad_types.h b/src/hid_core/resources/npad/npad_types.h
index 419c33a8c..a02f9cf16 100644
--- a/src/core/hle/service/hid/controllers/types/npad_types.h
+++ b/src/hid_core/resources/npad/npad_types.h
@@ -6,7 +6,7 @@
#include "common/bit_field.h"
#include "common/common_funcs.h"
#include "common/common_types.h"
-#include "core/hid/hid_types.h"
+#include "hid_core/hid_types.h"
namespace Service::HID {
static constexpr std::size_t MaxSupportedNpadIdTypes = 10;
diff --git a/src/core/hle/service/hid/controllers/palma.cpp b/src/hid_core/resources/palma/palma.cpp
index aa0454b5e..ea4a291fd 100644
--- a/src/core/hle/service/hid/controllers/palma.cpp
+++ b/src/hid_core/resources/palma/palma.cpp
@@ -2,13 +2,12 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "core/core_timing.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
-#include "core/hid/hid_types.h"
#include "core/hle/kernel/k_event.h"
#include "core/hle/kernel/k_readable_event.h"
-#include "core/hle/service/hid/controllers/palma.h"
#include "core/hle/service/kernel_helpers.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/resources/palma/palma.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/palma.h b/src/hid_core/resources/palma/palma.h
index 73884230d..60259c3d8 100644
--- a/src/core/hle/service/hid/controllers/palma.h
+++ b/src/hid_core/resources/palma/palma.h
@@ -6,8 +6,9 @@
#include <array>
#include "common/common_funcs.h"
#include "common/typed_address.h"
-#include "core/hle/service/hid/controllers/controller_base.h"
-#include "core/hle/service/hid/errors.h"
+#include "hid_core/hid_result.h"
+#include "hid_core/hid_types.h"
+#include "hid_core/resources/controller_base.h"
namespace Kernel {
class KEvent;
diff --git a/src/core/hle/service/hid/ring_lifo.h b/src/hid_core/resources/ring_lifo.h
index 0816784e0..0816784e0 100644
--- a/src/core/hle/service/hid/ring_lifo.h
+++ b/src/hid_core/resources/ring_lifo.h
diff --git a/src/core/hle/service/hid/controllers/types/shared_memory_format.h b/src/hid_core/resources/shared_memory_format.h
index 976043b9c..2ae0004ba 100644
--- a/src/core/hle/service/hid/controllers/types/shared_memory_format.h
+++ b/src/hid_core/resources/shared_memory_format.h
@@ -6,13 +6,13 @@
#include "common/common_funcs.h"
#include "common/common_types.h"
#include "common/vector_math.h"
-#include "core/hid/hid_types.h"
-#include "core/hle/service/hid//controllers/types/debug_pad_types.h"
-#include "core/hle/service/hid//controllers/types/keyboard_types.h"
-#include "core/hle/service/hid//controllers/types/mouse_types.h"
-#include "core/hle/service/hid//controllers/types/npad_types.h"
-#include "core/hle/service/hid//controllers/types/touch_types.h"
-#include "core/hle/service/hid/ring_lifo.h"
+#include "hid_core/hid_types.h"
+#include "hid_core/resources/debug_pad/debug_pad_types.h"
+#include "hid_core/resources/keyboard/keyboard_types.h"
+#include "hid_core/resources/mouse/mouse_types.h"
+#include "hid_core/resources/npad/npad_types.h"
+#include "hid_core/resources/ring_lifo.h"
+#include "hid_core/resources/touch_screen/touch_types.h"
namespace Service::HID {
static const std::size_t HidEntryCount = 17;
diff --git a/src/core/hle/service/hid/controllers/shared_memory_holder.cpp b/src/hid_core/resources/shared_memory_holder.cpp
index 0bc5169c6..ada593d8b 100644
--- a/src/core/hle/service/hid/controllers/shared_memory_holder.cpp
+++ b/src/hid_core/resources/shared_memory_holder.cpp
@@ -3,10 +3,10 @@
#include "core/core.h"
#include "core/hle/kernel/k_shared_memory.h"
-#include "core/hle/service/hid/controllers/applet_resource.h"
-#include "core/hle/service/hid/controllers/shared_memory_holder.h"
-#include "core/hle/service/hid/controllers/types/shared_memory_format.h"
-#include "core/hle/service/hid/errors.h"
+#include "hid_core/hid_result.h"
+#include "hid_core/resources/applet_resource.h"
+#include "hid_core/resources/shared_memory_format.h"
+#include "hid_core/resources/shared_memory_holder.h"
namespace Service::HID {
SharedMemoryHolder::SharedMemoryHolder() {}
diff --git a/src/core/hle/service/hid/controllers/shared_memory_holder.h b/src/hid_core/resources/shared_memory_holder.h
index 943407c00..943407c00 100644
--- a/src/core/hle/service/hid/controllers/shared_memory_holder.h
+++ b/src/hid_core/resources/shared_memory_holder.h
diff --git a/src/core/hle/service/hid/controllers/console_six_axis.cpp b/src/hid_core/resources/six_axis/console_six_axis.cpp
index 4b574c2e5..4f733cc76 100644
--- a/src/core/hle/service/hid/controllers/console_six_axis.cpp
+++ b/src/hid_core/resources/six_axis/console_six_axis.cpp
@@ -2,10 +2,10 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "core/core_timing.h"
-#include "core/hid/emulated_console.h"
-#include "core/hid/hid_core.h"
-#include "core/hle/service/hid/controllers/console_six_axis.h"
-#include "core/hle/service/hid/controllers/types/shared_memory_format.h"
+#include "hid_core/frontend/emulated_console.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/resources/shared_memory_format.h"
+#include "hid_core/resources/six_axis/console_six_axis.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/console_six_axis.h b/src/hid_core/resources/six_axis/console_six_axis.h
index e3351f83c..013b2e93b 100644
--- a/src/core/hle/service/hid/controllers/console_six_axis.h
+++ b/src/hid_core/resources/six_axis/console_six_axis.h
@@ -3,7 +3,7 @@
#pragma once
-#include "core/hle/service/hid/controllers/controller_base.h"
+#include "hid_core/resources/controller_base.h"
namespace Core::HID {
class EmulatedConsole;
diff --git a/src/core/hle/service/hid/controllers/seven_six_axis.cpp b/src/hid_core/resources/six_axis/seven_six_axis.cpp
index 495568484..d84ef31e1 100644
--- a/src/core/hle/service/hid/controllers/seven_six_axis.cpp
+++ b/src/hid_core/resources/six_axis/seven_six_axis.cpp
@@ -6,11 +6,11 @@
#include "core/core.h"
#include "core/core_timing.h"
#include "core/frontend/emu_window.h"
-#include "core/hid/emulated_console.h"
-#include "core/hid/emulated_devices.h"
-#include "core/hid/hid_core.h"
-#include "core/hle/service/hid/controllers/seven_six_axis.h"
#include "core/memory.h"
+#include "hid_core/frontend/emulated_console.h"
+#include "hid_core/frontend/emulated_devices.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/resources/six_axis/seven_six_axis.h"
namespace Service::HID {
SevenSixAxis::SevenSixAxis(Core::System& system_)
diff --git a/src/core/hle/service/hid/controllers/seven_six_axis.h b/src/hid_core/resources/six_axis/seven_six_axis.h
index 40e3f5d12..0a26c77c9 100644
--- a/src/core/hle/service/hid/controllers/seven_six_axis.h
+++ b/src/hid_core/resources/six_axis/seven_six_axis.h
@@ -6,8 +6,8 @@
#include "common/common_types.h"
#include "common/quaternion.h"
#include "common/typed_address.h"
-#include "core/hle/service/hid/controllers/controller_base.h"
-#include "core/hle/service/hid/ring_lifo.h"
+#include "hid_core/resources/controller_base.h"
+#include "hid_core/resources/ring_lifo.h"
namespace Core {
class System;
diff --git a/src/core/hle/service/hid/controllers/six_axis.cpp b/src/hid_core/resources/six_axis/six_axis.cpp
index adab60911..8a9677c50 100644
--- a/src/core/hle/service/hid/controllers/six_axis.cpp
+++ b/src/hid_core/resources/six_axis/six_axis.cpp
@@ -3,13 +3,13 @@
#include "common/common_types.h"
#include "core/core_timing.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
-#include "core/hle/service/hid/controllers/npad.h"
-#include "core/hle/service/hid/controllers/six_axis.h"
-#include "core/hle/service/hid/controllers/types/shared_memory_format.h"
-#include "core/hle/service/hid/errors.h"
-#include "core/hle/service/hid/hid_util.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/hid_result.h"
+#include "hid_core/hid_util.h"
+#include "hid_core/resources/npad/npad.h"
+#include "hid_core/resources/shared_memory_format.h"
+#include "hid_core/resources/six_axis/six_axis.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/six_axis.h b/src/hid_core/resources/six_axis/six_axis.h
index 4c4f5dc7b..1054e1b27 100644
--- a/src/core/hle/service/hid/controllers/six_axis.h
+++ b/src/hid_core/resources/six_axis/six_axis.h
@@ -4,9 +4,9 @@
#pragma once
#include "common/common_types.h"
-#include "core/hid/hid_types.h"
-#include "core/hle/service/hid/controllers/controller_base.h"
-#include "core/hle/service/hid/ring_lifo.h"
+#include "hid_core/hid_types.h"
+#include "hid_core/resources/controller_base.h"
+#include "hid_core/resources/ring_lifo.h"
namespace Core::HID {
class EmulatedController;
diff --git a/src/core/hle/service/hid/controllers/capture_button.cpp b/src/hid_core/resources/system_buttons/capture_button.cpp
index 7847c080e..70973ae25 100644
--- a/src/core/hle/service/hid/controllers/capture_button.cpp
+++ b/src/hid_core/resources/system_buttons/capture_button.cpp
@@ -2,9 +2,9 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "core/core_timing.h"
-#include "core/hle/service/hid/controllers/applet_resource.h"
-#include "core/hle/service/hid/controllers/capture_button.h"
-#include "core/hle/service/hid/controllers/types/shared_memory_format.h"
+#include "hid_core/resources/applet_resource.h"
+#include "hid_core/resources/shared_memory_format.h"
+#include "hid_core/resources/system_buttons/capture_button.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/capture_button.h b/src/hid_core/resources/system_buttons/capture_button.h
index dcc4715c5..ad95d7cad 100644
--- a/src/core/hle/service/hid/controllers/capture_button.h
+++ b/src/hid_core/resources/system_buttons/capture_button.h
@@ -3,7 +3,7 @@
#pragma once
-#include "core/hle/service/hid/controllers/controller_base.h"
+#include "hid_core/resources/controller_base.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/home_button.cpp b/src/hid_core/resources/system_buttons/home_button.cpp
index 1397379f3..f9c1f44b5 100644
--- a/src/core/hle/service/hid/controllers/home_button.cpp
+++ b/src/hid_core/resources/system_buttons/home_button.cpp
@@ -2,9 +2,9 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "core/core_timing.h"
-#include "core/hle/service/hid/controllers/applet_resource.h"
-#include "core/hle/service/hid/controllers/home_button.h"
-#include "core/hle/service/hid/controllers/types/shared_memory_format.h"
+#include "hid_core/resources/applet_resource.h"
+#include "hid_core/resources/shared_memory_format.h"
+#include "hid_core/resources/system_buttons/home_button.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/home_button.h b/src/hid_core/resources/system_buttons/home_button.h
index e91c2aa5d..ecf8327f4 100644
--- a/src/core/hle/service/hid/controllers/home_button.h
+++ b/src/hid_core/resources/system_buttons/home_button.h
@@ -3,7 +3,7 @@
#pragma once
-#include "core/hle/service/hid/controllers/controller_base.h"
+#include "hid_core/resources/controller_base.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/sleep_button.cpp b/src/hid_core/resources/system_buttons/sleep_button.cpp
index d44b1f4cc..22adf501f 100644
--- a/src/core/hle/service/hid/controllers/sleep_button.cpp
+++ b/src/hid_core/resources/system_buttons/sleep_button.cpp
@@ -2,9 +2,9 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "core/core_timing.h"
-#include "core/hle/service/hid/controllers/applet_resource.h"
-#include "core/hle/service/hid/controllers/sleep_button.h"
-#include "core/hle/service/hid/controllers/types/shared_memory_format.h"
+#include "hid_core/resources/applet_resource.h"
+#include "hid_core/resources/shared_memory_format.h"
+#include "hid_core/resources/system_buttons/sleep_button.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/sleep_button.h b/src/hid_core/resources/system_buttons/sleep_button.h
index 59964bf63..f9ed38c33 100644
--- a/src/core/hle/service/hid/controllers/sleep_button.h
+++ b/src/hid_core/resources/system_buttons/sleep_button.h
@@ -3,7 +3,7 @@
#pragma once
-#include "core/hle/service/hid/controllers/controller_base.h"
+#include "hid_core/resources/controller_base.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/gesture.cpp b/src/hid_core/resources/touch_screen/gesture.cpp
index c73da13ee..0ecc0941f 100644
--- a/src/core/hle/service/hid/controllers/gesture.cpp
+++ b/src/hid_core/resources/touch_screen/gesture.cpp
@@ -4,11 +4,11 @@
#include "common/math_util.h"
#include "common/settings.h"
#include "core/frontend/emu_window.h"
-#include "core/hid/emulated_console.h"
-#include "core/hid/hid_core.h"
-#include "core/hle/service/hid/controllers/applet_resource.h"
-#include "core/hle/service/hid/controllers/gesture.h"
-#include "core/hle/service/hid/controllers/types/shared_memory_format.h"
+#include "hid_core/frontend/emulated_console.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/resources/applet_resource.h"
+#include "hid_core/resources/shared_memory_format.h"
+#include "hid_core/resources/touch_screen/gesture.h"
namespace Service::HID {
// HW is around 700, value is set to 400 to make it easier to trigger with mouse
diff --git a/src/core/hle/service/hid/controllers/gesture.h b/src/hid_core/resources/touch_screen/gesture.h
index 78da1552a..32e9a8690 100644
--- a/src/core/hle/service/hid/controllers/gesture.h
+++ b/src/hid_core/resources/touch_screen/gesture.h
@@ -6,8 +6,8 @@
#include <array>
#include "common/common_types.h"
-#include "core/hle/service/hid/controllers/controller_base.h"
-#include "core/hle/service/hid/controllers/types/touch_types.h"
+#include "hid_core/resources/controller_base.h"
+#include "hid_core/resources/touch_screen/touch_types.h"
namespace Core::HID {
class EmulatedConsole;
diff --git a/src/core/hle/service/hid/controllers/types/gesture_types.h b/src/hid_core/resources/touch_screen/gesture_types.h
index b4f034cd3..b4f034cd3 100644
--- a/src/core/hle/service/hid/controllers/types/gesture_types.h
+++ b/src/hid_core/resources/touch_screen/gesture_types.h
diff --git a/src/core/hle/service/hid/controllers/touchscreen.cpp b/src/hid_core/resources/touch_screen/touch_screen.cpp
index b585a5829..48d956c51 100644
--- a/src/core/hle/service/hid/controllers/touchscreen.cpp
+++ b/src/hid_core/resources/touch_screen/touch_screen.cpp
@@ -6,11 +6,11 @@
#include "common/settings.h"
#include "core/core_timing.h"
#include "core/frontend/emu_window.h"
-#include "core/hid/emulated_console.h"
-#include "core/hid/hid_core.h"
-#include "core/hle/service/hid/controllers/applet_resource.h"
-#include "core/hle/service/hid/controllers/touchscreen.h"
-#include "core/hle/service/hid/controllers/types/shared_memory_format.h"
+#include "hid_core/frontend/emulated_console.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/resources/applet_resource.h"
+#include "hid_core/resources/shared_memory_format.h"
+#include "hid_core/resources/touch_screen/touch_screen.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/touchscreen.h b/src/hid_core/resources/touch_screen/touch_screen.h
index 945d359be..4b3824742 100644
--- a/src/core/hle/service/hid/controllers/touchscreen.h
+++ b/src/hid_core/resources/touch_screen/touch_screen.h
@@ -5,9 +5,9 @@
#include <array>
-#include "core/hid/hid_types.h"
-#include "core/hle/service/hid/controllers/controller_base.h"
-#include "core/hle/service/hid/controllers/types/touch_types.h"
+#include "hid_core/hid_types.h"
+#include "hid_core/resources/controller_base.h"
+#include "hid_core/resources/touch_screen/touch_types.h"
namespace Core::HID {
class EmulatedConsole;
diff --git a/src/core/hle/service/hid/controllers/types/touch_types.h b/src/hid_core/resources/touch_screen/touch_types.h
index efeaa796d..97ee847da 100644
--- a/src/core/hle/service/hid/controllers/types/touch_types.h
+++ b/src/hid_core/resources/touch_screen/touch_types.h
@@ -10,7 +10,7 @@
#include "common/common_funcs.h"
#include "common/common_types.h"
#include "common/point.h"
-#include "core/hid/hid_types.h"
+#include "hid_core/hid_types.h"
namespace Service::HID {
static constexpr std::size_t MAX_FINGERS = 16;
diff --git a/src/core/hle/service/hid/controllers/unique_pad.cpp b/src/hid_core/resources/unique_pad/unique_pad.cpp
index 6c543031d..892bbe3c9 100644
--- a/src/core/hle/service/hid/controllers/unique_pad.cpp
+++ b/src/hid_core/resources/unique_pad/unique_pad.cpp
@@ -2,9 +2,9 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "core/core_timing.h"
-#include "core/hle/service/hid/controllers/applet_resource.h"
-#include "core/hle/service/hid/controllers/types/shared_memory_format.h"
-#include "core/hle/service/hid/controllers/unique_pad.h"
+#include "hid_core/resources/applet_resource.h"
+#include "hid_core/resources/shared_memory_format.h"
+#include "hid_core/resources/unique_pad/unique_pad.h"
namespace Service::HID {
diff --git a/src/core/hle/service/hid/controllers/unique_pad.h b/src/hid_core/resources/unique_pad/unique_pad.h
index 966368264..674ad1691 100644
--- a/src/core/hle/service/hid/controllers/unique_pad.h
+++ b/src/hid_core/resources/unique_pad/unique_pad.h
@@ -3,7 +3,7 @@
#pragma once
-#include "core/hle/service/hid/controllers/controller_base.h"
+#include "hid_core/resources/controller_base.h"
namespace Service::HID {
diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt
index 5c127c8ef..d2fbea488 100644
--- a/src/input_common/CMakeLists.txt
+++ b/src/input_common/CMakeLists.txt
@@ -87,7 +87,7 @@ if (ENABLE_LIBUSB)
endif()
create_target_directory_groups(input_common)
-target_link_libraries(input_common PUBLIC core PRIVATE common Boost::headers)
+target_link_libraries(input_common PUBLIC hid_core PRIVATE common Boost::headers)
if (YUZU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(input_common PRIVATE precompiled_headers.h)
diff --git a/src/yuzu/applets/qt_controller.cpp b/src/yuzu/applets/qt_controller.cpp
index 9e5319716..8b340ee6c 100644
--- a/src/yuzu/applets/qt_controller.cpp
+++ b/src/yuzu/applets/qt_controller.cpp
@@ -9,11 +9,11 @@
#include "common/settings_enums.h"
#include "common/string_util.h"
#include "core/core.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
-#include "core/hid/hid_types.h"
-#include "core/hle/service/hid/controllers/npad.h"
#include "core/hle/service/sm/sm.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/hid_types.h"
+#include "hid_core/resources/npad/npad.h"
#include "ui_qt_controller.h"
#include "yuzu/applets/qt_controller.h"
#include "yuzu/configuration/configure_input.h"
diff --git a/src/yuzu/applets/qt_software_keyboard.cpp b/src/yuzu/applets/qt_software_keyboard.cpp
index 4ae49506d..bbe17c35e 100644
--- a/src/yuzu/applets/qt_software_keyboard.cpp
+++ b/src/yuzu/applets/qt_software_keyboard.cpp
@@ -9,10 +9,10 @@
#include "common/settings.h"
#include "common/string_util.h"
#include "core/core.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
-#include "core/hid/hid_types.h"
-#include "core/hid/input_interpreter.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/frontend/input_interpreter.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/hid_types.h"
#include "ui_qt_software_keyboard.h"
#include "yuzu/applets/qt_software_keyboard.h"
#include "yuzu/main.h"
diff --git a/src/yuzu/applets/qt_web_browser.cpp b/src/yuzu/applets/qt_web_browser.cpp
index 28acc0ff8..34c5fd3be 100644
--- a/src/yuzu/applets/qt_web_browser.cpp
+++ b/src/yuzu/applets/qt_web_browser.cpp
@@ -13,7 +13,7 @@
#include <QWebEngineSettings>
#include <QWebEngineUrlScheme>
-#include "core/hid/input_interpreter.h"
+#include "hid_core/frontend/input_interpreter.h"
#include "yuzu/applets/qt_web_browser_scripts.h"
#endif
diff --git a/src/yuzu/configuration/configure_debug_controller.cpp b/src/yuzu/configuration/configure_debug_controller.cpp
index 42abe9119..74208d1cc 100644
--- a/src/yuzu/configuration/configure_debug_controller.cpp
+++ b/src/yuzu/configuration/configure_debug_controller.cpp
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
-#include "core/hid/hid_core.h"
+#include "hid_core/hid_core.h"
#include "ui_configure_debug_controller.h"
#include "yuzu/configuration/configure_debug_controller.h"
#include "yuzu/configuration/configure_input_player.h"
diff --git a/src/yuzu/configuration/configure_hotkeys.cpp b/src/yuzu/configuration/configure_hotkeys.cpp
index 76fc33e49..3d18670ce 100644
--- a/src/yuzu/configuration/configure_hotkeys.cpp
+++ b/src/yuzu/configuration/configure_hotkeys.cpp
@@ -6,8 +6,8 @@
#include <QStandardItemModel>
#include <QTimer>
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
#include "frontend_common/config.h"
#include "ui_configure_hotkeys.h"
diff --git a/src/yuzu/configuration/configure_input.cpp b/src/yuzu/configuration/configure_input.cpp
index 02e23cce6..49ec52546 100644
--- a/src/yuzu/configuration/configure_input.cpp
+++ b/src/yuzu/configuration/configure_input.cpp
@@ -7,12 +7,12 @@
#include "common/settings.h"
#include "common/settings_enums.h"
#include "core/core.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
#include "core/hle/service/am/am.h"
#include "core/hle/service/am/applet_ae.h"
#include "core/hle/service/am/applet_oe.h"
#include "core/hle/service/sm/sm.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
#include "ui_configure_input.h"
#include "ui_configure_input_advanced.h"
#include "ui_configure_input_player.h"
diff --git a/src/yuzu/configuration/configure_input_advanced.cpp b/src/yuzu/configuration/configure_input_advanced.cpp
index 441cea3f6..d6c4e09ec 100644
--- a/src/yuzu/configuration/configure_input_advanced.cpp
+++ b/src/yuzu/configuration/configure_input_advanced.cpp
@@ -4,8 +4,8 @@
#include <QColorDialog>
#include "common/settings.h"
#include "core/core.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
#include "ui_configure_input_advanced.h"
#include "yuzu/configuration/configure_input_advanced.h"
diff --git a/src/yuzu/configuration/configure_input_per_game.cpp b/src/yuzu/configuration/configure_input_per_game.cpp
index 8d9f65a05..eea7ec369 100644
--- a/src/yuzu/configuration/configure_input_per_game.cpp
+++ b/src/yuzu/configuration/configure_input_per_game.cpp
@@ -3,9 +3,9 @@
#include "common/settings.h"
#include "core/core.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
#include "frontend_common/config.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
#include "ui_configure_input_per_game.h"
#include "yuzu/configuration/configure_input_per_game.h"
#include "yuzu/configuration/input_profiles.h"
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp
index 0f7b3714e..f3552191a 100644
--- a/src/yuzu/configuration/configure_input_player.cpp
+++ b/src/yuzu/configuration/configure_input_player.cpp
@@ -13,10 +13,10 @@
#include "common/assert.h"
#include "common/param_package.h"
#include "configuration/qt_config.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
-#include "core/hid/hid_types.h"
#include "frontend_common/config.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/hid_types.h"
#include "input_common/drivers/keyboard.h"
#include "input_common/drivers/mouse.h"
#include "input_common/main.h"
diff --git a/src/yuzu/configuration/configure_input_player_widget.cpp b/src/yuzu/configuration/configure_input_player_widget.cpp
index 550cff9a0..19fdca7d3 100644
--- a/src/yuzu/configuration/configure_input_player_widget.cpp
+++ b/src/yuzu/configuration/configure_input_player_widget.cpp
@@ -6,7 +6,7 @@
#include <QPainter>
#include <QTimer>
-#include "core/hid/emulated_controller.h"
+#include "hid_core/frontend/emulated_controller.h"
#include "yuzu/configuration/configure_input_player_widget.h"
PlayerControlPreview::PlayerControlPreview(QWidget* parent) : QFrame(parent) {
diff --git a/src/yuzu/configuration/configure_input_player_widget.h b/src/yuzu/configuration/configure_input_player_widget.h
index a16943c3c..76340912d 100644
--- a/src/yuzu/configuration/configure_input_player_widget.h
+++ b/src/yuzu/configuration/configure_input_player_widget.h
@@ -10,8 +10,8 @@
#include "common/input.h"
#include "common/settings_input.h"
#include "common/vector_math.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_types.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_types.h"
class QLabel;
diff --git a/src/yuzu/configuration/configure_ringcon.cpp b/src/yuzu/configuration/configure_ringcon.cpp
index 9572ff43c..3a7f6101d 100644
--- a/src/yuzu/configuration/configure_ringcon.cpp
+++ b/src/yuzu/configuration/configure_ringcon.cpp
@@ -9,8 +9,8 @@
#include <fmt/format.h>
#include "configuration/qt_config.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
#include "input_common/drivers/keyboard.h"
#include "input_common/drivers/mouse.h"
#include "input_common/main.h"
diff --git a/src/yuzu/configuration/configure_vibration.cpp b/src/yuzu/configuration/configure_vibration.cpp
index 68c28b320..d898d8acc 100644
--- a/src/yuzu/configuration/configure_vibration.cpp
+++ b/src/yuzu/configuration/configure_vibration.cpp
@@ -2,9 +2,9 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "common/settings.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
-#include "core/hid/hid_types.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
+#include "hid_core/hid_types.h"
#include "ui_configure_vibration.h"
#include "yuzu/configuration/configure_vibration.h"
diff --git a/src/yuzu/debugger/controller.cpp b/src/yuzu/debugger/controller.cpp
index e2f55ebae..216d2974d 100644
--- a/src/yuzu/debugger/controller.cpp
+++ b/src/yuzu/debugger/controller.cpp
@@ -5,8 +5,8 @@
#include <QLayout>
#include <QString>
#include "common/settings.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
#include "input_common/drivers/tas_input.h"
#include "input_common/main.h"
#include "yuzu/configuration/configure_input_player_widget.h"
diff --git a/src/yuzu/hotkeys.cpp b/src/yuzu/hotkeys.cpp
index eebfbf155..b7693ad0d 100644
--- a/src/yuzu/hotkeys.cpp
+++ b/src/yuzu/hotkeys.cpp
@@ -6,7 +6,7 @@
#include <QTreeWidgetItem>
#include <QtGlobal>
-#include "core/hid/emulated_controller.h"
+#include "hid_core/frontend/emulated_controller.h"
#include "yuzu/hotkeys.h"
#include "yuzu/uisettings.h"
diff --git a/src/yuzu/hotkeys.h b/src/yuzu/hotkeys.h
index e11332d2e..bdc081649 100644
--- a/src/yuzu/hotkeys.h
+++ b/src/yuzu/hotkeys.h
@@ -7,7 +7,7 @@
#include <QKeySequence>
#include <QString>
#include <QWidget>
-#include "core/hid/hid_types.h"
+#include "hid_core/hid_types.h"
class QDialog;
class QSettings;
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index c789c1e59..2a83486f9 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -42,13 +42,13 @@
#include "core/frontend/applets/general_frontend.h"
#include "core/frontend/applets/mii_edit.h"
#include "core/frontend/applets/software_keyboard.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
#include "core/hle/service/acc/profile_manager.h"
#include "core/hle/service/am/applet_ae.h"
#include "core/hle/service/am/applet_oe.h"
#include "core/hle/service/am/applets/applets.h"
#include "core/hle/service/set/set_sys.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
#include "yuzu/multiplayer/state.h"
#include "yuzu/util/controller_navigation.h"
diff --git a/src/yuzu/util/controller_navigation.cpp b/src/yuzu/util/controller_navigation.cpp
index d49ae67cd..2690b075d 100644
--- a/src/yuzu/util/controller_navigation.cpp
+++ b/src/yuzu/util/controller_navigation.cpp
@@ -2,8 +2,8 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "common/settings_input.h"
-#include "core/hid/emulated_controller.h"
-#include "core/hid/hid_core.h"
+#include "hid_core/frontend/emulated_controller.h"
+#include "hid_core/hid_core.h"
#include "yuzu/util/controller_navigation.h"
ControllerNavigation::ControllerNavigation(Core::HID::HIDCore& hid_core, QWidget* parent) {
diff --git a/src/yuzu/util/overlay_dialog.cpp b/src/yuzu/util/overlay_dialog.cpp
index ee35a3e15..466bbe7b2 100644
--- a/src/yuzu/util/overlay_dialog.cpp
+++ b/src/yuzu/util/overlay_dialog.cpp
@@ -6,8 +6,8 @@
#include <QWindow>
#include "core/core.h"
-#include "core/hid/hid_types.h"
-#include "core/hid/input_interpreter.h"
+#include "hid_core/frontend/input_interpreter.h"
+#include "hid_core/hid_types.h"
#include "ui_overlay_dialog.h"
#include "yuzu/util/overlay_dialog.h"
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
index 1a35d471c..eae614f9d 100644
--- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
+++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
@@ -7,8 +7,8 @@
#include "common/scm_rev.h"
#include "common/settings.h"
#include "core/core.h"
-#include "core/hid/hid_core.h"
#include "core/perf_stats.h"
+#include "hid_core/hid_core.h"
#include "input_common/drivers/keyboard.h"
#include "input_common/drivers/mouse.h"
#include "input_common/drivers/touch_screen.h"