mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-11 09:51:02 +00:00
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.
10 lines
569 B
C
10 lines
569 B
C
// The Win32 window's input seams: gfx_window_win.c's window procedure calls these first. Windows only.
|
|
#pragma once
|
|
#include <windows.h>
|
|
|
|
HWND gfx_window_handle(void); // gfx_window_win.c; NULL before gfx_window_start
|
|
int input_window_msg(HWND h, UINT m, WPARAM w, LPARAM l, LRESULT *res);
|
|
// The menu's Win32 adapter (ui/menu_win.cpp), called next: F1 / Esc open or close the menu; while it is open, keys,
|
|
// mouse and focus go to it. Returns 1 with *res set when the message is fully handled.
|
|
int menu_window_msg(HWND h, UINT m, WPARAM w, LPARAM l, LRESULT *res);
|