diff options
| author | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-23 04:42:53 -0500 |
|---|---|---|
| committer | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-23 04:42:53 -0500 |
| commit | 57c175391db7b70ac2ec8dc7a7bf04afec52cb88 (patch) | |
| tree | 4cbd07a10787a6d340268ec8be2b8e8bad7d7823 /runtime/shims/registry.cpp | |
| parent | e2ac2238fa5cb7ca23e653cce15fd5c1d004e0a7 (diff) | |
Revert #2490: its console-ABI list proxy breaks run_tiny_frame (please rebase and split)
With it, d3d12_xs reads list slot 48 as the console's IASetVertexBuffers, so the PC-shaped fixture list's
ClearRenderTargetView never runs and Close fails. The branch also changes runtime/src/pe_loader.cpp and carried
committed conflict markers in docs/fssm_crosscheck.md. Its docs rows go with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/shims/registry.cpp')
| -rw-r--r-- | runtime/shims/registry.cpp | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/runtime/shims/registry.cpp b/runtime/shims/registry.cpp index 730c3cbf9..37ff540c5 100644 --- a/runtime/shims/registry.cpp +++ b/runtime/shims/registry.cpp | |||
| @@ -76,11 +76,9 @@ std::vector<Lookup> g_lookups; | |||
| 76 | // left out on purpose. | 76 | // left out on purpose. |
| 77 | // gameinput.dll GameInputCreate: HRESULT (gaming/gdk/docs/reference/input/gameinput/functions/ | 77 | // gameinput.dll GameInputCreate: HRESULT (gaming/gdk/docs/reference/input/gameinput/functions/ |
| 78 | // gameinputcreate). The shim implements it (runtime/shims/gameinput.cpp); the class is | 78 | // gameinputcreate). The shim implements it (runtime/shims/gameinput.cpp); the class is |
| 79 | // listed anyway for a build or import it misses. "#1" is the same function by ordinal: | 79 | // listed anyway for a build or import it misses. |
| 80 | // ordinal 1 is GameInputCreate in the console export inventory (docs/d3d12_vulkan.md §7). | ||
| 81 | // xaudio2_9.dll XAudio2Create: HRESULT (learn.microsoft.com/windows/win32/api/xaudio2/ | 80 | // xaudio2_9.dll XAudio2Create: HRESULT (learn.microsoft.com/windows/win32/api/xaudio2/ |
| 82 | // xaudio2_9redist.dll nf-xaudio2-xaudio2create). xaudio2_9.dll is the console name (docs/d3d12_vulkan.md §7). | 81 | // xaudio2_9redist.dll nf-xaudio2-xaudio2create). xaudio2_9.dll is the console name (docs/d3d12_vulkan.md §7). |
| 83 | // "#1" is XAudio2Create by ordinal, ordinal 1 verified in the same inventory. | ||
| 84 | // dstorage.dll DStorageGetFactory: HRESULT (learn.microsoft.com/windows/win32/api/dstorage/ | 82 | // dstorage.dll DStorageGetFactory: HRESULT (learn.microsoft.com/windows/win32/api/dstorage/ |
| 85 | // dstorage_xs.dll nf-dstorage-dstoragegetfactory). dstorage_xs.dll is the console name. | 83 | // dstorage_xs.dll nf-dstorage-dstoragegetfactory). dstorage_xs.dll is the console name. |
| 86 | const char* const kNotHResult[] = { | 84 | const char* const kNotHResult[] = { |
| @@ -110,14 +108,9 @@ ReturnClass classify(const std::string& dll, const std::string& name) { | |||
| 110 | name == "DXGIDeclareAdapterRemovalSupport") | 108 | name == "DXGIDeclareAdapterRemovalSupport") |
| 111 | return ReturnClass::HResult; | 109 | return ReturnClass::HResult; |
| 112 | } else if (dll == "xaudio2_9.dll" || dll == "xaudio2_9redist.dll") { | 110 | } else if (dll == "xaudio2_9.dll" || dll == "xaudio2_9redist.dll") { |
| 113 | if (name == "XAudio2Create" || name == "#1") return ReturnClass::HResult; | 111 | if (name == "XAudio2Create") return ReturnClass::HResult; |
| 114 | // Host xaudio2_9.dll ordinals 8-10 are XAudio2CreateV2_9 / XAudio2CreateWithVersionInfo / | ||
| 115 | // XAudio2CreateWithSharedContexts (measured on the System32 export table); the redist's ordinal | ||
| 116 | // table is not confirmed, so only the system copy gets them. | ||
| 117 | if (dll == "xaudio2_9.dll" && (name == "#8" || name == "#9" || name == "#10")) | ||
| 118 | return ReturnClass::HResult; | ||
| 119 | } else if (dll == "gameinput.dll") { | 112 | } else if (dll == "gameinput.dll") { |
| 120 | if (name == "GameInputCreate" || name == "#1") return ReturnClass::HResult; | 113 | if (name == "GameInputCreate") return ReturnClass::HResult; |
| 121 | } else if (dll == "dstorage.dll" || dll == "dstorage_xs.dll") { | 114 | } else if (dll == "dstorage.dll" || dll == "dstorage_xs.dll") { |
| 122 | if (name == "DStorageGetFactory") return ReturnClass::HResult; | 115 | if (name == "DStorageGetFactory") return ReturnClass::HResult; |
| 123 | } else if (dll == "xgameruntime.dll") { | 116 | } else if (dll == "xgameruntime.dll") { |
| @@ -461,20 +454,6 @@ bool owns_bundled_module_handle(void* module) { | |||
| 461 | return false; | 454 | return false; |
| 462 | } | 455 | } |
| 463 | 456 | ||
| 464 | void* bundled_main_module() { | ||
| 465 | for (const auto& entry : snapshot_bundled_loaders()) | ||
| 466 | if (entry.ops->main_module) | ||
| 467 | if (void* h = entry.ops->main_module(entry.ctx)) return h; | ||
| 468 | return nullptr; | ||
| 469 | } | ||
| 470 | |||
| 471 | const std::filesystem::path* bundled_module_path(void* module) { | ||
| 472 | for (const auto& entry : snapshot_bundled_loaders()) | ||
| 473 | if (entry.ops->module_path) | ||
| 474 | if (const std::filesystem::path* p = entry.ops->module_path(entry.ctx, module)) return p; | ||
| 475 | return nullptr; | ||
| 476 | } | ||
| 477 | |||
| 478 | Table::Table(const Entry* entries, size_t count) { | 457 | Table::Table(const Entry* entries, size_t count) { |
| 479 | for (size_t i = 0; i < count; ++i) table()[lower_ascii(entries[i].dll) + "!" + entries[i].name] = entries[i].fn; | 458 | for (size_t i = 0; i < count; ++i) table()[lower_ascii(entries[i].dll) + "!" + entries[i].name] = entries[i].fn; |
| 480 | } | 459 | } |