Nioh
Cutscene runs with sound and no picture. Its video is WMV3, which the fix decodes itself where the engine cannot. Runs on DXMT only.
GPL-3.0-or-laterThis fix in MacGameFix
What you see
Failure to play movie. (RTM_ID_EV0001), then a crash
Why it happens
Two faults, the first hiding the second: no CrossOver ships a WMV3 decoder, so the DirectShow graph never builds; and the D3D9 render target the game asks to share comes back with a null share handle.
What the fix changes
The fix's own WMV3 reader (or a staged decoder), then hand the game a share handle that exists
The code
Wine's d3d9 answers a shared render target with S_OK and a null handle; where it leaves that hole, the bridge hands the game a real shared handle.
fixes/p5s-video-bridge.c · my_CreateRenderTarget, lines 1437–1466c
static HRESULT WINAPI my_CreateRenderTarget(void *self, UINT w, UINT h, DWORD fmt,
DWORD ms, DWORD msq, BOOL lockable,
void **surface, HANDLE *shared)
{
HRESULT hr = real_CreateRenderTarget(self, w, h, fmt, ms, msq, lockable, surface, shared);
note_shared("CreateRenderTarget", w, h, fmt, hr, shared);
/* Only where Wine left a hole: it succeeded and shared nothing. */
if (SUCCEEDED(hr) && shared && !*shared && make_sidecar(w, h))
{
static LONG said;
*shared = sidecar_handle;
sidecar_w = w; sidecar_h = h;
if (surface && *surface)
{
static void *su;
void **vt;
shared_surface = *surface;
vt = *(void ***)shared_surface;
real_SurfUnlock = (HRESULT (WINAPI *)(void *))vt[SLOT_SURF_UNLOCKRECT];
if (!watch_write_path || !patch_slot("surface UnlockRect", shared_surface,
SLOT_SURF_UNLOCKRECT, (void *)my_SurfUnlock, &su))
real_SurfUnlock = NULL;
}
if (InterlockedIncrement(&said) == 1)
logf_(" handed the game a real shared handle %p instead of null -- "
"nothing copies into it yet; this only asks whether the game "
"then carries on", sidecar_handle);
}
return hr;
}Thanks to
- winevideoIndependent confirmation of the shared-texture cutscene path, which winevideo repairs inside a patched Wine d3d9.dll.
Details
- Needs
- DXMT only. The sidecar needs
GetSharedHandle,E_NOTIMPLunder D3DMetal - Installer
- install-nioh-bridge.sh
- Executable
- nioh.exe
- Built from
- p5s-video-bridge.c, asf-reader.c, wmv-dmo.c, wm-reader.c, dshow-graph.c
- Verified on
- Stable 26.3 (
cxoffice-26.3.0rc2), with winevideo 0.5 in the bottle — 27 Aug 2026; CrossOver Preview 27 through NotProton with nothing staged (2026-10-14)