7 Commits
Author SHA1 Message Date
Wellington Dias 1d51343ac1 Build and run the runtime natively on Linux.
Shared runtime code now goes through runtime/platform/platform.h, implemented by platform/win32.c and a new
platform/linux.c: futex locks, a userfaultfd and PAGEMAP_SCAN write watch, signal-based async preemption, our own
fiber switch, and a SIGSEGV handler for the thaw and crash hooks. The window, input, menu and software keyboard get
SDL3 back ends beside the Win32 ones, with the swapchain (gfx_present.c) and input merging (input.c) shared. SHA-256
replaces BCrypt, ELF builds get their own override sections, and the build tools gain Linux branches.

On Linux the selftest and the gfx-abi, astc, nvn and window probes pass. probe-vkmem still fails: imported guest
memory cannot be write-watched on Linux, which the shadow buffers in vk_memory.c will address.
2026-10-29 16:56:56 -03:00
Valiantsin DzerakhandClaude Opus 5.5 8691f6d724 Remap keys, mouse buttons and controller buttons from the Controls tab
Every Switch button and the eight stick directions the keys drive get two key cells and a controller cell under the
button layout. A cell takes the next key, mouse button or controller button pressed; a key in use moves over, a
controller button swaps. The tab writes bind_ lines (new: bind_LSTICK_* / bind_RSTICK_*, key:default, pad:default) and
input_win.c builds the tables again when one changes, so remapping applies while the game runs. More keys can be
bound: Enter, Backspace, right Shift and Ctrl, Alt, the numpad, punctuation, F2-F7, F9, F12, mouse buttons 4 and 5.
Alt alone no longer enters the window menu loop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 17:53:57 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c757a42798 Add the frame rate overlay: TOTK_PERF_OVERLAY fps shows the frame rate in the top right corner, full adds the mean and longest frame time of the last half second, F10 cycles the modes and saves the choice
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 10:50:45 +03:00
Valiantsin DzerakhandClaude Opus 5.5 f8d584b3db Add the tabbed settings menu: option rows over the cfg table for the Screen, Game, Sound, Controls and Menu tabs, Continue and Quit game in the bottom row, and a note when totk.ini cannot be written
Rows read and write their key through cfg, mark the default, say "after restart" for start-only settings and grey out what an environment variable fixes; totk.ini is written 0.4 s after the last change and when the menu closes. The graphics card list comes from the Vulkan devices, the window sizes from the monitor, and the language names of Japanese, Korean and Chinese are drawn with glyphs merged in from a system font (plat_font_path). The font atlas and style follow the window height. TOTK_MENU_TEST saves one shot per tab and ignores real input meanwhile; TOTK_MENU_TEST_SET sets settings at given frames (SAVE=1 writes totk.ini). A background test window going fullscreen no longer comes to the front or takes focus, and the log names the present mode the swapchain gets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 10:13:33 +03:00
Valiantsin DzerakhandClaude Opus 5.5 4d4b0efeb8 Latch the Minus+Plus combo until both are released, serialise menu open and close, pack the cursor release flags into one word, and drop menu_available
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:51:56 +03:00
Valiantsin DzerakhandClaude Opus 5.5 0cfc489bbf Open the menu for everyone: F1, Esc and Minus+Plus toggle it, the combo never reaches the game, the page offers Continue and Quit game, and closing after Esc gives the mouse capture back
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:49:15 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c6a7a28ab4 Compile Dear ImGui and draw the menu overlay into the swapchain image, behind the test hook TOTK_MENU_TEST until the pages are agreed
The window follows TOTK_WINDOW_SIZE, TOTK_FULLSCREEN and TOTK_VK_PRESENT while the game runs, and F11 saves the fullscreen state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 08:35:24 +03:00