diff --git a/docs/controls.md b/docs/controls.md index 3cd4082c..0e1f4ee5 100644 --- a/docs/controls.md +++ b/docs/controls.md @@ -82,7 +82,7 @@ Mouse motion (raw input) becomes right-stick deflection. Each presented frame ta `TOTK_MOUSE_SENS` (0 to 10, default 1; higher turns faster, 0 turns the mouse camera and the cursor capture off). While the window is the foreground window the cursor is hidden and confined to the client area. It is released on focus loss, minimise, while F11 changes the window, during a size or move loop and while a text entry is open. Esc releases it by hand: the cursor shows, the mouse camera and mouse buttons stop, and the window can be moved, minimised or closed. A mouse click inside the client area captures it again; that click does not reach the game. Activating the window by a click on its title bar or border does not capture, so it can be dragged or closed right away; Alt+Tab or a click in the client area captures as before. `TOTK_INPUT=none` disables the capture too. -`TOTK_STICK_DEADZONE` (0 to 50, default 8) is the gamepad stick dead zone in percent of full deflection, the same for both sticks. It is round: a stick inside the circle reads centred, and the rest of its travel is scaled to start at 0 at the edge, so full deflection still reaches full. Raise it for a stick that drifts. The game's own dead zone applies after it. +`TOTK_LSTICK_DEADZONE` and `TOTK_RSTICK_DEADZONE` (0 to 50, default 8; the Analog sticks section of the Controls tab) are the gamepad stick dead zones in percent of full deflection, one per stick. Each is round: a stick inside the circle reads centred, and the rest of its travel is scaled to start at 0 at the edge, so full deflection still reaches full. Raise one for a stick that drifts. The game's own dead zone applies after it. A `stick_deadzone` line in an older `totk.ini` is carried over to both keys at the next start and removed; `TOTK_STICK_DEADZONE` set in the environment still applies to both sticks. The stick direction bits (`StickLLeft` to `StickRDown`) are derived from the sticks at 50% deflection. A gamepad plugged in later is picked up within one second; with none connected the log says `input: no gamepad`. @@ -107,7 +107,7 @@ Bridges that output a ViGEm DualShock 4 (ProCon2Windows, connectyourpro as teste `TOTK_INPUT_RECORD=` (`input_record` in `totk.ini`, or Input recording in the menu) writes the merged input in the same format, one line per button press and per stick segment: events before the world clock starts by tick, the rest timed; a button or stick held when the world clock starts is cut there and goes on as a timed event. The file replays as a script, which makes it the repro to attach to a bug report. -`TOTK_TEST_PAD=,,,` attaches an SDL virtual gamepad at start whose sticks rest at these raw SDL axis values (-32768 to 32767, down is +y), so a drifting or held stick can be tested without a controller: the values go through the gamepad mapping and `TOTK_STICK_DEADZONE` like a real pad's, and `TOTK_INPUT_RECORD` shows what reached the game. +`TOTK_TEST_PAD=,,,` attaches an SDL virtual gamepad at start whose sticks rest at these raw SDL axis values (-32768 to 32767, down is +y), so a drifting or held stick can be tested without a controller: the values go through the gamepad mapping and `TOTK_LSTICK_DEADZONE` / `TOTK_RSTICK_DEADZONE` like a real pad's, and `TOTK_INPUT_RECORD` shows what reached the game. ## RenderDoc capture (blocked) diff --git a/runtime/cfg.c b/runtime/cfg.c index d9c4cd61..637abdd4 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -28,7 +28,8 @@ static PlatMutex set_lock = PLAT_MUTEX_INIT; // cfg_set, cfg_reset, cfg_save static int save_ok = 1; // the last cfg_save_to wrote (or had nothing to write) // Every name the runtime reads (and the patch sets in generated/), without the prefix. A file key outside this list is -// logged as unknown. A new variable goes here too, or its ini key logs a harmless "unknown key" line. +// logged as unknown. A new variable goes here too, or its ini key logs a harmless "unknown key" line. A renamed key +// stays here while cfg_migrate carries its line over (STICK_DEADZONE, now one key per stick). static const char *const known[] = { "AB", "APP_POOL", "ASPECT", "ASPECT_PATCH", "ASSUME_FOCUS", "ASTC", "ASTC_BC", "ASTC_TIME", "ASYNC_PREEMPT", "AUDIO", "AUDIO_OFF", "AUDIO_PREFILL_MS", "BACKGROUND_WINDOW", "BIND_A", "BIND_B", "BIND_DOWN", "BIND_L", "BIND_LCLICK", "BIND_LEFT", "BIND_LSTICK_DOWN", "BIND_LSTICK_LEFT", @@ -39,14 +40,14 @@ static const char *const known[] = { "EXEFS", "FEEDBACK", "FIX_C0", "FIX_ZERO", "FLIGHT", "FLIGHT_AT", "FLIGHT_DIR", "FLIGHT_FRAMES", "FLIGHT_SPIKE_MS", "FLIGHT_THUMBS", "FOV", "FOV_PATCH", "FPS60", "FPS_LIMIT", "FREEZE_IDLE", "FREE_CORES", "FULLSCREEN", "GPL", "GPL_DRAW_BUILD", "GPU", "GPU_INDEX", "GPU_NAME", "HIGHFPS_FIX", "INPUT", "INPUT_RECORD", "INPUT_SCRIPT", "LANG", "LIB_PREBUILD", - "LIB_PREBUILD_KEEP", "LIB_PREBUILD_THREADS", "LOCALE", "LOD_GUARD", "MEMORY", "MENU_LANG", "MENU_TEST", + "LIB_PREBUILD_KEEP", "LIB_PREBUILD_THREADS", "LOCALE", "LOD_GUARD", "LSTICK_DEADZONE", "MEMORY", "MENU_LANG", "MENU_TEST", "MENU_TEST_DIR", "MENU_TEST_SET", "MINIMAL_LAYOUT", "MIRROR_GAP", "MOTION", "MOUSE_SENS", "MOVIE_HOST", "MOVIE_PACE", "ONE_PER_CORE", "OPERATION_MODE", "OUTPUT_RES", "PAD_LAYOUT", "PATCH_OUTPUT", "PATCH_SCENE", "PERF_OVERLAY", "PERF_SLOW_MS", "PIPELINE_CACHE", "PIPE_MEMO", "PIPE_PREBUILD", "PIPE_SKIP", "PIPE_SYNC", "PIPE_WAIT", "PREWARM_XLATE", "PROBE_MOVIE", "PROBE_MOVIE_SHOT", "PROFILE", "PROFILE_CHAINS", "PROFILE_DIR", "PROFILE_FRAMES", "PROFILE_MAIN", "PROFILE_RENDER", "PUSH_SKIP", "PUSH_STAGE", "RDOC", "RDOC_DIR", "RDOC_DLL", "REALTIME", "REC_END", "REEXEC", "RENDER_SCALE", "REPLAY_ASYNC", "REPLAY_CHECK", "RESOLVE_CHECK", "ROMFS", "ROMFS_INDEX", "ROMFS_MMAP", "ROMFS_MODS", "ROMFS_PATCHES", - "ROMFS_PROOF_DIR", "ROMFS_VERIFY", "RUMBLE", "RUMBLE_CURVE", "RUMBLE_STRENGTH", "RUMBLE_TRIGGERS", "SHADER_CACHE", + "ROMFS_PROOF_DIR", "ROMFS_VERIFY", "RSTICK_DEADZONE", "RUMBLE", "RUMBLE_CURVE", "RUMBLE_STRENGTH", "RUMBLE_TRIGGERS", "SHADER_CACHE", "SHADER_MEMO", "SHARED_FONTS", "SHARPNESS", "SHOTS", "SHOTS_DIR", "SHOTS_FULL", "SPEED_PROBE", "SPIN", "SPIN_HANDOFF_US", "SPLIT_DRAWS", "SPLIT_US", "STICK_DEADZONE", "SWKBD_ANSWER", "SWKBD_TEST", "TEST_PAD", "TEST_PREPARE_SHADERS", "TEX_ALIAS", "TEX_MEMO", "TEX_VRAM_PRESSURE", "TIMER_1MS", "TRACE", "UBO_SNAPSHOT", "UPSCALER", "VK_DYN_A2C", "VK_DYN_VERTEX", "VK_NO_FLOAT64", "VK_PRESENT", "VK_RECORDER", "VK_SSBO_ALIGN", "VK_SUBGROUP", "VK_SUBGROUP_PIN", "VK_VALIDATION", "VOLUME", "VRAM_HEADROOM", "VS_OUTS", @@ -66,7 +67,7 @@ static const struct { const char *key, *section; } sections[] = { {"MENU_LANG", "language"}, {"LANG", "language"}, {"OPERATION_MODE", "language"}, {"VOLUME", "audio"}, {"MOTION", "input"}, {"RUMBLE_STRENGTH", "input"}, {"RUMBLE_CURVE", "input"}, {"RUMBLE_TRIGGERS", "input"}, - {"PAD_LAYOUT", "input"}, {"STICK_DEADZONE", "input"}, {"MOUSE_SENS", "input"}, {"INPUT_RECORD", "input"}, + {"PAD_LAYOUT", "input"}, {"LSTICK_DEADZONE", "input"}, {"RSTICK_DEADZONE", "input"}, {"MOUSE_SENS", "input"}, {"INPUT_RECORD", "input"}, {"BIND_A", "input"}, {"BIND_B", "input"}, {"BIND_X", "input"}, {"BIND_Y", "input"}, {"BIND_LCLICK", "input"}, {"BIND_RCLICK", "input"}, {"BIND_L", "input"}, {"BIND_R", "input"}, {"BIND_ZL", "input"}, {"BIND_ZR", "input"}, {"BIND_PLUS", "input"}, {"BIND_MINUS", "input"}, {"BIND_LEFT", "input"}, {"BIND_UP", "input"}, @@ -114,7 +115,7 @@ static const CfgMeta metas[] = { {"VOLUME", "100", "0..100", LIVE}, {"MOTION", "1", "0|1", LIVE}, {"RUMBLE_STRENGTH", "130", "0..300", LIVE}, {"RUMBLE_CURVE", "0.6", "0.2..1.5", LIVE}, {"RUMBLE_TRIGGERS", "0", "0|1", LIVE}, {"PAD_LAYOUT", "auto", "auto|nintendo|xbox|xbox_prompts", LIVE}, - {"STICK_DEADZONE", "8", "0..50", LIVE}, {"MOUSE_SENS", "1", "0..10", LIVE}, + {"LSTICK_DEADZONE", "8", "0..50", LIVE}, {"RSTICK_DEADZONE", "8", "0..50", LIVE}, {"MOUSE_SENS", "1", "0..10", LIVE}, {"MENU_LANG", "", "en|ru", LIVE}, // Advanced: scheduling {"ASYNC_PREEMPT", "1", "0|1|2", RESTART}, {"REPLAY_ASYNC", "0", "0|1", RESTART}, @@ -640,8 +641,27 @@ static void load_ini(void) { } } +// Renamed keys: the old totk.ini line would otherwise keep its value while nothing reads it. stick_deadzone (one dead +// zone for both sticks, up to 0.2.8) fills lstick_deadzone and rstick_deadzone where they are unset and its line goes. +// The environment variable is left alone: input.c stick_dead_get reads TOTK_STICK_DEADZONE for both sticks. +int cfg_migrate(void) { + static const char *const old_key[] = {"STICK_DEADZONE"}; + static const char *const new_keys[] = {PREFIX "LSTICK_DEADZONE", PREFIX "RSTICK_DEADZONE"}; + const char *old = cfg_get(PREFIX "STICK_DEADZONE"); + if (!old || cfg_from_env(PREFIX "STICK_DEADZONE")) return 0; + char value[64]; + snprintf(value, sizeof value, "%s", old); // cfg_reset drops the entry old points into + int n = 0; + for (size_t i = 0; i < sizeof new_keys / sizeof *new_keys; i++) + if (!cfg_is_set(new_keys[i])) cfg_set(new_keys[i], value), n++; + cfg_reset(old_key, 1); + rt_log("cfg: stick_deadzone = %s carried over to lstick_deadzone and rstick_deadzone (%d set)", value, n); + return n; +} + void cfg_init(void) { load_ini(); + if (cfg_migrate()) cfg_save(); if (profile_of()) rt_log("cfg: device profile Steam Deck: defaults for the keys totk.ini does not set (TOTK_DEVICE_PROFILE=desktop " "turns it off)"); diff --git a/runtime/cfg.h b/runtime/cfg.h index 5f94bc7a..15ff1457 100644 --- a/runtime/cfg.h +++ b/runtime/cfg.h @@ -8,6 +8,9 @@ const char *cfg_get(const char *name); // Reads totk.ini once, from mem_init after the address space is claimed and before any setting is read. Logs the file, its key count, unknown keys and environment overrides. void cfg_init(void); +// Carries the value of a renamed totk.ini key into its new keys in memory (those still unset) and marks the old line +// for removal at the next save; cfg_init calls it and saves. Returns how many keys took a value. Not thread-safe. +int cfg_migrate(void); // Replaces the loaded keys with those of the file at path (tests). 1 when the file was read, 0 when missing. // Not thread-safe: nothing else may call cfg_get meanwhile. diff --git a/runtime/cfg_probe.c b/runtime/cfg_probe.c index ca7449b2..04005a03 100644 --- a/runtime/cfg_probe.c +++ b/runtime/cfg_probe.c @@ -139,6 +139,11 @@ int probe_cfg(void) { "meta: prefix and case are accepted"); m = cfg_meta("RUMBLE_STRENGTH"); CHECK(m && EQ(m->def, "130") && EQ(m->values, "0..300"), "meta: rumble strength 130 in 0..300"); + m = cfg_meta("LSTICK_DEADZONE"); + CHECK(m && EQ(m->def, "8") && EQ(m->values, "0..50") && m->live, "meta: left stick dead zone 8 in 0..50, live"); + m = cfg_meta("RSTICK_DEADZONE"); + CHECK(m && EQ(m->def, "8") && EQ(m->values, "0..50") && m->live, "meta: right stick dead zone 8 in 0..50, live"); + CHECK(cfg_meta("STICK_DEADZONE") == NULL, "meta: the old single stick dead zone key has no row"); m = cfg_meta("PERF_OVERLAY"); CHECK(m && EQ(m->def, "off") && EQ(m->values, "off|fps|full") && m->live, "meta: perf_overlay is live, off by default"); CHECK(cfg_meta("BIND_A") == NULL && cfg_meta("FPS_COUNTER") == NULL && cfg_meta("NO_SUCH") == NULL, @@ -173,6 +178,34 @@ int probe_cfg(void) { CHECK(got && strstr((const char *)got, "\nvolume = 60\n"), "reset then set: the new line is written"); free(got); + // cfg_migrate: an older stick_deadzone line fills the per-stick keys that are unset, then leaves the file + static const char mbase[] = "[input]\n# lstick_deadzone = 8\n# rstick_deadzone = 8\nstick_deadzone = 15\n"; + plat_setenv("TOTK_STICK_DEADZONE", NULL); + plat_setenv("TOTK_LSTICK_DEADZONE", NULL); + plat_setenv("TOTK_RSTICK_DEADZONE", NULL); + CHECK(plat_file_write(path, mbase, sizeof mbase - 1), "write the migrate ini"); + CHECK(cfg_load(path) == 1 && EQ(cfg_get("TOTK_STICK_DEADZONE"), "15"), "load the migrate ini"); + CHECK(cfg_migrate() == 2, "migrate: both per-stick keys take the old value"); + CHECK(cfg_double("TOTK_LSTICK_DEADZONE") == 15 && cfg_double("TOTK_RSTICK_DEADZONE") == 15 && + cfg_get("TOTK_STICK_DEADZONE") == NULL, + "migrate: 15 for both sticks in memory, the old key gone"); + CHECK(cfg_migrate() == 0, "migrate: nothing left to carry over"); + CHECK(cfg_save_to(path) == 1, "migrate: save"); + got = plat_file_read(path, &got_n); + CHECK(got && strstr((const char *)got, "\nlstick_deadzone = 15\n") && strstr((const char *)got, "\nrstick_deadzone = 15\n") && + !strstr((const char *)got, "\nstick_deadzone = 15\n") && strstr((const char *)got, "# lstick_deadzone = 8"), + "migrate: the per-stick lines are in the file, the old line is not, the examples stay"); + if (got && !strstr((const char *)got, "\nlstick_deadzone = 15\n")) fprintf(stderr, "---- saved:\n%s\n----\n", got); + free(got); + static const char mkeep[] = "[input]\nrstick_deadzone = 20\nstick_deadzone = 15\n"; + CHECK(plat_file_write(path, mkeep, sizeof mkeep - 1) && cfg_load(path) == 1, "load the migrate ini with one stick set"); + CHECK(cfg_migrate() == 1 && cfg_double("TOTK_LSTICK_DEADZONE") == 15 && cfg_double("TOTK_RSTICK_DEADZONE") == 20, + "migrate: a per-stick key already set keeps its value, the other takes the old one"); + plat_setenv("TOTK_STICK_DEADZONE", "30"); + CHECK(cfg_load(path) == 1 && cfg_migrate() == 0 && cfg_double("TOTK_STICK_DEADZONE") == 30, + "migrate: the environment variable is left alone (input.c applies it to both sticks)"); + plat_setenv("TOTK_STICK_DEADZONE", NULL); + // an active line with an empty value has no entry in memory; Reset still removes it from the file static const char rempty[] = "[audio]\n# volume = 100\nvolume =\n[input]\nmotion = 0\n"; CHECK(plat_file_write(path, rempty, sizeof rempty - 1) && cfg_load(path) == 1 && cfg_get("TOTK_VOLUME") == NULL, diff --git a/runtime/input.c b/runtime/input.c index 86391739..a9679802 100644 --- a/runtime/input.c +++ b/runtime/input.c @@ -263,16 +263,24 @@ static void mouse_camera(int32_t out[2]) { out[1] = held[1]; } -static float stick_dead = -1; // TOTK_STICK_DEADZONE as a fraction of full deflection; live (cfg_version) +// TOTK_LSTICK_DEADZONE and TOTK_RSTICK_DEADZONE as fractions of full deflection; live (cfg_version). The older +// TOTK_STICK_DEADZONE set in the environment applies to both (an ini line is carried over by cfg_migrate instead). +static float stick_dead[2] = {-1, -1}; static unsigned stick_dead_seen; -static float stick_dead_get(void) { +static void stick_dead_get(float out[2]) { + static const char *const keys[2] = {"TOTK_LSTICK_DEADZONE", "TOTK_RSTICK_DEADZONE"}; unsigned ver = cfg_version(); - if (stick_dead >= 0 && ver == stick_dead_seen) return stick_dead; - stick_dead_seen = ver; - double v = cfg_double("TOTK_STICK_DEADZONE"); - stick_dead = (float)(v < 0 ? 0 : v > 50 ? 50 : v) / 100.f; - return stick_dead; + if (stick_dead[0] < 0 || ver != stick_dead_seen) { + stick_dead_seen = ver; + int both = cfg_from_env("TOTK_STICK_DEADZONE"); + for (int i = 0; i < 2; i++) { + double v = cfg_double(both ? "TOTK_STICK_DEADZONE" : keys[i]); + stick_dead[i] = (float)(v < 0 ? 0 : v > 50 ? 50 : v) / 100.f; + } + } + out[0] = stick_dead[0]; + out[1] = stick_dead[1]; } // One gamepad stick through the dead zone; SDL's Y grows downwards, the Switch's upwards. @@ -425,9 +433,10 @@ static int pad_read(uint64_t *b, int32_t sl[2], int32_t sr[2]) { uint8_t pd[PAD_COUNT] = {0}; if (!pad_physical(pd)) return 0; *b |= input_map_pad_buttons(pd, pad_layout_get()); - float dead = stick_dead_get(); - stick(SDL_GAMEPAD_AXIS_LEFTX, SDL_GAMEPAD_AXIS_LEFTY, dead, sl); - stick(SDL_GAMEPAD_AXIS_RIGHTX, SDL_GAMEPAD_AXIS_RIGHTY, dead, sr); + float dead[2]; + stick_dead_get(dead); + stick(SDL_GAMEPAD_AXIS_LEFTX, SDL_GAMEPAD_AXIS_LEFTY, dead[0], sl); + stick(SDL_GAMEPAD_AXIS_RIGHTX, SDL_GAMEPAD_AXIS_RIGHTY, dead[1], sr); return 1; } diff --git a/runtime/ui/menu.cpp b/runtime/ui/menu.cpp index 0e02e4bf..9f736d23 100644 --- a/runtime/ui/menu.cpp +++ b/runtime/ui/menu.cpp @@ -677,8 +677,10 @@ static void tab_controls(float scale) { opt_slider("TOTK_RUMBLE_STRENGTH", UI_MENU_RUMBLE_STRENGTH, 0, 300, UI_MENU_RUMBLE_STRENGTH_DESC, 10, "%.0f %%"); opt_slider("TOTK_RUMBLE_CURVE", UI_MENU_RUMBLE_CURVE, 0.2f, 1.5f, UI_MENU_RUMBLE_CURVE_DESC, 0.05f, "%.2f"); opt_toggle("TOTK_RUMBLE_TRIGGERS", UI_MENU_RUMBLE_TRIGGERS, UI_MENU_RUMBLE_TRIGGERS_DESC); - opt_slider("TOTK_STICK_DEADZONE", UI_MENU_STICK_DEADZONE, 0, 50, UI_MENU_STICK_DEADZONE_DESC, 1, "%.0f %%"); opt_slider("TOTK_MOUSE_SENS", UI_MENU_MOUSE_SENS, 0, 10, UI_MENU_MOUSE_SENS_DESC, 0.1f, "%.1f"); + opt_group(UI_MENU_GROUP_STICKS); + opt_slider("TOTK_LSTICK_DEADZONE", UI_MENU_LSTICK_DEADZONE, 0, 50, UI_MENU_LSTICK_DEADZONE_DESC, 1, "%.0f %%"); + opt_slider("TOTK_RSTICK_DEADZONE", UI_MENU_RSTICK_DEADZONE, 0, 50, UI_MENU_RSTICK_DEADZONE_DESC, 1, "%.0f %%"); binds_rows(scale); opt_end(); binds_after_page(); diff --git a/runtime/ui_text.c b/runtime/ui_text.c index f697e68c..51b5bd6b 100644 --- a/runtime/ui_text.c +++ b/runtime/ui_text.c @@ -132,8 +132,11 @@ static const char *const text_en[UI_TEXT_COUNT] = { [UI_MENU_PAD_LAYOUT_IN_USE] = "in use: %s", [UI_MENU_PAD_LAYOUT_PROMPTS_MISSING] = "prompt files missing: run the setup again", [UI_MENU_PAD_LAYOUT_PROMPTS_RESTART] = "prompts change after restart", - [UI_MENU_STICK_DEADZONE] = "Stick dead zone", - [UI_MENU_STICK_DEADZONE_DESC] = "How far a gamepad stick moves before the game sees it. Raise it if the character or the camera moves on its own.", + [UI_MENU_GROUP_STICKS] = "Analog sticks", + [UI_MENU_LSTICK_DEADZONE] = "Left stick dead zone", + [UI_MENU_LSTICK_DEADZONE_DESC] = "How far the left stick moves before the game sees it. Raise it if the character walks on their own.", + [UI_MENU_RSTICK_DEADZONE] = "Right stick dead zone", + [UI_MENU_RSTICK_DEADZONE_DESC] = "How far the right stick moves before the game sees it. Raise it if the camera turns on its own.", [UI_MENU_MOUSE_SENS] = "Mouse camera sensitivity", [UI_MENU_MOUSE_SENS_DESC] = "How fast the mouse turns the camera.", @@ -393,8 +396,11 @@ static const char *const text_ru[UI_TEXT_COUNT] = { [UI_MENU_PAD_LAYOUT_IN_USE] = "сейчас: %s", [UI_MENU_PAD_LAYOUT_PROMPTS_MISSING] = "нет файлов подсказок: запустите установку снова", [UI_MENU_PAD_LAYOUT_PROMPTS_RESTART] = "подсказки сменятся после перезапуска", - [UI_MENU_STICK_DEADZONE] = "Мёртвая зона стиков", - [UI_MENU_STICK_DEADZONE_DESC] = "Насколько нужно отклонить стик геймпада, чтобы игра это заметила. Увеличьте, если персонаж или камера двигаются сами.", + [UI_MENU_GROUP_STICKS] = "Стики", + [UI_MENU_LSTICK_DEADZONE] = "Мёртвая зона левого стика", + [UI_MENU_LSTICK_DEADZONE_DESC] = "Насколько нужно отклонить левый стик, чтобы игра это заметила. Увеличьте, если персонаж идёт сам.", + [UI_MENU_RSTICK_DEADZONE] = "Мёртвая зона правого стика", + [UI_MENU_RSTICK_DEADZONE_DESC] = "Насколько нужно отклонить правый стик, чтобы игра это заметила. Увеличьте, если камера поворачивается сама.", [UI_MENU_MOUSE_SENS] = "Чувствительность мыши", [UI_MENU_MOUSE_SENS_DESC] = "Как быстро мышь поворачивает камеру.", diff --git a/runtime/ui_text.h b/runtime/ui_text.h index a2088960..1a87fe74 100644 --- a/runtime/ui_text.h +++ b/runtime/ui_text.h @@ -66,7 +66,8 @@ typedef enum { UI_MENU_PAD_LAYOUT, UI_MENU_PAD_LAYOUT_DESC, UI_MENU_PAD_LAYOUT_AUTO, UI_MENU_PAD_LAYOUT_NINTENDO, UI_MENU_PAD_LAYOUT_XBOX, UI_MENU_PAD_LAYOUT_XBOX_PROMPTS, UI_MENU_PAD_LAYOUT_IN_USE, UI_MENU_PAD_LAYOUT_PROMPTS_MISSING, UI_MENU_PAD_LAYOUT_PROMPTS_RESTART, - UI_MENU_STICK_DEADZONE, UI_MENU_STICK_DEADZONE_DESC, + UI_MENU_GROUP_STICKS, UI_MENU_LSTICK_DEADZONE, UI_MENU_LSTICK_DEADZONE_DESC, + UI_MENU_RSTICK_DEADZONE, UI_MENU_RSTICK_DEADZONE_DESC, UI_MENU_MOUSE_SENS, UI_MENU_MOUSE_SENS_DESC, // Controls tab: the remapping rows (ui/binds_page.cpp) diff --git a/totk.ini.example b/totk.ini.example index 6d3d5f1e..bb88df2a 100644 --- a/totk.ini.example +++ b/totk.ini.example @@ -187,9 +187,11 @@ # labels (A with B, X with Y; it loads romfs-patches-xbox, docs/controls.md, "Xbox button prompts"). The bind_ lines # below apply on top. Changes while the game runs take effect at once; the xbox_prompts prompts at the next start. # pad_layout = auto -# Gamepad stick dead zone in percent of full deflection (0 to 50). Raise it for a stick that drifts: inside the circle -# the stick reads centred, and the rest of its travel is scaled to start there. -# stick_deadzone = 8 +# Gamepad stick dead zones in percent of full deflection (0 to 50), one per stick. Raise one for a stick that drifts: +# inside the circle the stick reads centred, and the rest of its travel is scaled to start there. A stick_deadzone +# line from an older totk.ini is carried over to both at the next start. +# lstick_deadzone = 8 +# rstick_deadzone = 8 # Mouse camera sensitivity (0 to 10; 0 = no mouse camera and no cursor capture). # mouse_sens = 1 # Write the input of this run to a file that replays as a script (docs/controls.md, "Scripted input"). Default: off.