Offer the dynamic alpha to coverage switch in the menu and fix stale comments

TOTK_VK_DYN_A2C from pull request #188 gets the settings row, the Advanced tab choice and the totk.ini.example
line that TOTK_VK_DYN_VERTEX has. The IME comment in gfx_window.c window_main named a walk key the runtime does not
have, and ov_system.c still said TOTK_ASSUME_FOCUS opens the window without focus, which TOTK_BACKGROUND_WINDOW does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Valiantsin DzerakhandClaude Opus 5.5 committed 2026-10-31 12:54:05 +03:00
1 parent 5cbabc4e77
commit 0aa529b4ce
7 files changed
+21 -10

No files matched your search

+2 -2
View File
@@ -77,7 +77,7 @@ static const struct { const char *key, *section; } sections[] = {
{"TEX_ALIAS", "performance"}, {"TEX_VRAM_PRESSURE", "performance"}, {"ASTC_BC", "performance"}, {"LOD_GUARD", "performance"}, {"FIX_C0", "performance"}, {"FIX_ZERO", "performance"},
{"BIND_SKIP", "performance"}, {"SHADER_MEMO", "performance"}, {"PIPE_MEMO", "performance"}, {"TEX_MEMO", "performance"}, {"DESC_TEMPLATE", "performance"},
{"PUSH_SKIP", "performance"}, {"SPLIT_DRAWS", "performance"}, {"SPLIT_US", "performance"}, {"VK_VALIDATION", "performance"},
{"VK_DYN_VERTEX", "performance"}, {"VK_SUBGROUP_PIN", "performance"},
{"VK_DYN_VERTEX", "performance"}, {"VK_DYN_A2C", "performance"}, {"VK_SUBGROUP_PIN", "performance"},
{"TRACE", "diagnostics"}, {"FLIGHT", "diagnostics"}, {"FLIGHT_SPIKE_MS", "diagnostics"},
{"WB_FENCE_LIMIT", "diagnostics"},
};
@@ -126,7 +126,7 @@ static const CfgMeta metas[] = {
{"SPLIT_US", "1000", "0..20000", RESTART},
// Vulkan
{"VK_VALIDATION", "0", "0|1", RESTART}, {"VK_DYN_VERTEX", "", "0|1", RESTART},
{"VK_SUBGROUP_PIN", "1", "0|1", RESTART},
{"VK_DYN_A2C", "", "0|1", RESTART}, {"VK_SUBGROUP_PIN", "1", "0|1", RESTART},
// diagnostics
{"TRACE", "", NULL, RESTART}, {"FLIGHT", "0", "0|1", RESTART}, {"FLIGHT_SPIKE_MS", "100", "0..60000", RESTART},
{"WB_FENCE_LIMIT", "65536", "0..1073741824", RESTART},
+3 -3
View File
@@ -486,9 +486,9 @@ static DWORD WINAPI window_main(void *arg) {
g_wnd_failed = 1;
} else {
// An IME switched on over the game attaches to this window and then shows its candidate window and eats the keys
// it composes, although there is nothing here to type into (Shift, which a player may have bound as the walk key,
// is one of the keys a Chinese IME takes). Detaching the game's window leaves the software keyboard alone: its
// edit box is a window of its own and gets the IME it needs.
// it composes, although there is nothing here to type into (a Chinese IME takes Shift, the B button by default).
// Detaching the game's window leaves the software keyboard alone: its edit box sits in a window of its own
// (swkbd_win.c) and gets the IME it needs.
ImmAssociateContext(g_hwnd, NULL);
// The frame was measured at the system DPI; the window may have opened on a monitor at another scale.
InterlockedExchange(&g_dpi, (LONG)GetDpiForWindow(g_hwnd));
+4 -4
View File
@@ -9,8 +9,8 @@
// TOTK_LOCALE=<BCP 47 tag> else the language for this locale ("pt-BR"), else the Windows user locale;
// a language the game does not ship becomes en-US
// TOTK_OPERATION_MODE=docked|handheld operation and performance mode reported to the game (default docked)
// TOTK_ASSUME_FOCUS=1 GetCurrentFocusState always reports in focus, whatever the window says; the
// window opens without taking focus (gfx_window.c), for scripted runs
// TOTK_ASSUME_FOCUS=1 GetCurrentFocusState always reports in focus, whatever the window says: the
// game keeps running in the background (the Game tab's row; scripted runs)
// TOTK_SHARED_FONTS=<dir> nn::pl shared fonts (tools/extract_fonts.py output), default
// <romfs>/../../firmware/shared-fonts
#include <windows.h>
@@ -158,8 +158,8 @@ static void ov_focus_mode(Cpu *c) {
}
// FocusState GetCurrentFocusState(): 1 in focus, 2 out of focus (nn::oe::FocusState). In focus until the window
// reports otherwise through oe_set_focus; TOTK_ASSUME_FOCUS=1 (unattended runs) pins it to 1. The caller of
// oe_set_focus also pushes OE_MSG_FOCUS_STATE_CHANGED.
// reports otherwise through oe_set_focus; TOTK_ASSUME_FOCUS=1 (the Game tab's row, scripted runs) pins it to 1.
// The caller of oe_set_focus also pushes OE_MSG_FOCUS_STATE_CHANGED.
//
// The setting is read on every focus change rather than once at start: a focus change is rare, the lookup is a short
// walk of the loaded ini entries, and the Game tab's row then takes effect the next time the window is left, without
+1
View File
@@ -705,6 +705,7 @@ static void tab_advanced(float scale) {
opt_toggle("TOTK_VK_VALIDATION", UI_MENU_VK_VALIDATION, UI_MENU_VK_VALIDATION_DESC);
static const UiTextId dyn[] = {UI_MENU_AUTO, UI_MENU_OFF, UI_MENU_ON}; // unset, 0, 1
opt_choice("TOTK_VK_DYN_VERTEX", UI_MENU_VK_DYN_VERTEX, dyn, 3, UI_MENU_VK_DYN_VERTEX_DESC);
opt_choice("TOTK_VK_DYN_A2C", UI_MENU_VK_DYN_A2C, dyn, 3, UI_MENU_VK_DYN_A2C_DESC);
opt_toggle("TOTK_VK_SUBGROUP_PIN", UI_MENU_VK_SUBGROUP_PIN, UI_MENU_VK_SUBGROUP_PIN_DESC);
opt_group(UI_MENU_GROUP_DIAG);
+7
View File
@@ -226,6 +226,9 @@ static const char *const text_en[UI_TEXT_COUNT] = {
[UI_MENU_VK_VALIDATION_MISSING] = "The validation layer is not installed.",
[UI_MENU_VK_DYN_VERTEX] = "Dynamic vertex state",
[UI_MENU_VK_DYN_VERTEX_DESC] = "Forces dynamic vertex input on or off; the default depends on the GPU.",
[UI_MENU_VK_DYN_A2C] = "Dynamic alpha to coverage",
[UI_MENU_VK_DYN_A2C_DESC] = "Forces dynamic alpha to coverage on or off. Default: off on AMD's driver for RDNA 2 and "
"older, which draws characters black with it, on elsewhere.",
[UI_MENU_VK_SUBGROUP_PIN] = "Pin subgroup size", [UI_MENU_VK_SUBGROUP_PIN_DESC] = "Fixes the shader subgroup size.",
[UI_MENU_TRACE] = "Performance log", [UI_MENU_TRACE_DESC] = "Writes frame timings to a file.",
[UI_MENU_FLIGHT] = "Flight recorder",
@@ -469,6 +472,10 @@ static const char *const text_ru[UI_TEXT_COUNT] = {
[UI_MENU_VK_VALIDATION_MISSING] = "Слой проверки не установлен.",
[UI_MENU_VK_DYN_VERTEX] = "Динамическое состояние вершин",
[UI_MENU_VK_DYN_VERTEX_DESC] = "Принудительно включает или выключает динамический ввод вершин; по умолчанию зависит от GPU.",
[UI_MENU_VK_DYN_A2C] = "Динамический alpha to coverage",
[UI_MENU_VK_DYN_A2C_DESC] = "Принудительно включает или выключает динамический alpha to coverage. По умолчанию "
"выключен на драйвере AMD для RDNA 2 и старше, где с ним персонажи чёрные, и включён "
"на остальных.",
[UI_MENU_VK_SUBGROUP_PIN] = "Фиксировать размер подгруппы",
[UI_MENU_VK_SUBGROUP_PIN_DESC] = "Фиксирует размер подгруппы шейдера.",
[UI_MENU_TRACE] = "Журнал производительности", [UI_MENU_TRACE_DESC] = "Пишет время кадров в файл.",
+1 -1
View File
@@ -135,7 +135,7 @@ typedef enum {
UI_MENU_PUSH_SKIP, UI_MENU_PUSH_SKIP_DESC,
UI_MENU_SPLIT_DRAWS, UI_MENU_SPLIT_DRAWS_DESC,
UI_MENU_VK_VALIDATION, UI_MENU_VK_VALIDATION_DESC, UI_MENU_VK_VALIDATION_MISSING,
UI_MENU_VK_DYN_VERTEX, UI_MENU_VK_DYN_VERTEX_DESC,
UI_MENU_VK_DYN_VERTEX, UI_MENU_VK_DYN_VERTEX_DESC, UI_MENU_VK_DYN_A2C, UI_MENU_VK_DYN_A2C_DESC,
UI_MENU_VK_SUBGROUP_PIN, UI_MENU_VK_SUBGROUP_PIN_DESC,
UI_MENU_TRACE, UI_MENU_TRACE_DESC,
UI_MENU_FLIGHT, UI_MENU_FLIGHT_DESC,
+3
View File
@@ -91,6 +91,9 @@
# vk_recorder = 1
# Dynamic vertex input, 0 or 1. Default: on, except on Intel's older integrated GPU drivers (Vulkan 1.3.215 and older).
# vk_dyn_vertex = 1
# Dynamic alpha to coverage, 0 or 1. Default: on, except on AMD's driver for RDNA 2 and older (RX 400 to RX 6000),
# which applies alpha to coverage while the dynamic state says off and draws the characters black.
# vk_dyn_a2c = 1
# Pin the shader subgroup size to 32 when the GPU allows it.
# vk_subgroup_pin = 1