summaryrefslogtreecommitdiffstats
path: root/src/yuzu_cmd
diff options
context:
space:
mode:
authorfearlessTobi <thm.frey@gmail.com>2019-08-24 15:57:49 +0200
committerFearlessTobi <thm.frey@gmail.com>2020-01-23 20:55:26 +0100
commitac3690f2057fb93ce18f156ff5ffd720a6d6f60c (patch)
treed0ec80a2537b992146d34f5bf17ba0cc549bd88e /src/yuzu_cmd
parentMerge pull request #3341 from bunnei/time-posix-myrule (diff)
downloadyuzu-ac3690f2057fb93ce18f156ff5ffd720a6d6f60c.tar
yuzu-ac3690f2057fb93ce18f156ff5ffd720a6d6f60c.tar.gz
yuzu-ac3690f2057fb93ce18f156ff5ffd720a6d6f60c.tar.bz2
yuzu-ac3690f2057fb93ce18f156ff5ffd720a6d6f60c.tar.lz
yuzu-ac3690f2057fb93ce18f156ff5ffd720a6d6f60c.tar.xz
yuzu-ac3690f2057fb93ce18f156ff5ffd720a6d6f60c.tar.zst
yuzu-ac3690f2057fb93ce18f156ff5ffd720a6d6f60c.zip
Diffstat (limited to 'src/yuzu_cmd')
-rw-r--r--src/yuzu_cmd/config.cpp5
-rw-r--r--src/yuzu_cmd/default_ini.h17
2 files changed, 22 insertions, 0 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp
index 1a812cb87..86f65cf46 100644
--- a/src/yuzu_cmd/config.cpp
+++ b/src/yuzu_cmd/config.cpp
@@ -12,6 +12,7 @@
#include "core/hle/service/acc/profile_manager.h"
#include "core/settings.h"
#include "input_common/main.h"
+#include "input_common/udp/client.h"
#include "yuzu_cmd/config.h"
#include "yuzu_cmd/default_ini.h"
@@ -297,6 +298,10 @@ void Config::ReadValues() {
sdl2_config->GetInteger("ControlsGeneral", "touch_diameter_x", 15);
Settings::values.touchscreen.diameter_y =
sdl2_config->GetInteger("ControlsGeneral", "touch_diameter_y", 15);
+ Settings::values.udp_input_address = sdl2_config->GetString(
+ "Controls", "udp_input_address", InputCommon::CemuhookUDP::DEFAULT_ADDR);
+ Settings::values.udp_input_port = static_cast<u16>(sdl2_config->GetInteger(
+ "Controls", "udp_input_port", InputCommon::CemuhookUDP::DEFAULT_PORT));
std::transform(keyboard_keys.begin(), keyboard_keys.end(),
Settings::values.keyboard_keys.begin(), InputCommon::GenerateKeyboardParam);
diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h
index 8d18a4a5a..e829f8695 100644
--- a/src/yuzu_cmd/default_ini.h
+++ b/src/yuzu_cmd/default_ini.h
@@ -69,12 +69,29 @@ rstick=
# - "motion_emu" (default) for emulating motion input from mouse input. Required parameters:
# - "update_period": update period in milliseconds (default to 100)
# - "sensitivity": the coefficient converting mouse movement to tilting angle (default to 0.01)
+# - "cemuhookudp" reads motion input from a udp server that uses cemuhook's udp protocol
motion_device=
# for touch input, the following devices are available:
# - "emu_window" (default) for emulating touch input from mouse input to the emulation window. No parameters required
+# - "cemuhookudp" reads touch input from a udp server that uses cemuhook's udp protocol
+# - "min_x", "min_y", "max_x", "max_y": defines the udp device's touch screen coordinate system
touch_device=
+# Most desktop operating systems do not expose a way to poll the motion state of the controllers
+# so as a way around it, cemuhook created a udp client/server protocol to broadcast the data directly
+# from a controller device to the client program. Citra has a client that can connect and read
+# from any cemuhook compatible motion program.
+
+# IPv4 address of the udp input server (Default "127.0.0.1")
+udp_input_address=
+
+# Port of the udp input server. (Default 26760)
+udp_input_port=
+
+# The pad to request data on. Should be between 0 (Pad 1) and 3 (Pad 4). (Default 0)
+udp_pad_index=
+
[Core]
# Whether to use multi-core for CPU emulation
# 0 (default): Disabled, 1: Enabled