Remove dxwrapper; test scripts focus the game window

The default render size (1835x768) is below Direct3D 7's 2048 limit, so the
D3D7 -> D3D9 wrapper and its device-info workaround are no longer needed.
The game pauses start-up until its window is active; game-input.ps1 now
activates it reliably (Alt + SetForegroundWindow, polled), which dxwrapper
had masked. borderless logs the first failed presents.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
khallaandClaude Opus 5.5 committed 2026-10-14 03:17:23 +02:00
1 parent df31c9c105
commit f73c4154ad
9 files changed
+38 -344

No files matched your search

+8 -3
View File
@@ -33,7 +33,6 @@
#include "game/engine/input.h"
#include "game/render/dx_driver7.h"
#include "mods/dxwrapper.h"
#include "mods/widescreen.h"
#include "re/config.h"
#include "game/addresses.h"
@@ -168,7 +167,6 @@ RE_HOOK(addr::MainWindowProc, MainWindowProc);
int __fastcall DxDriver7_SetDisplayMode(DxDriver7* self, void* edx, void* deviceCaps, const DxDisplayMode* mode,
uint32_t unknown) {
mods::dxwrapper::FixDeviceInfo(deviceCaps);
if (!Enabled()) {
return DxDriver7_SetDisplayMode_original(self, edx, deviceCaps, mode, unknown);
}
@@ -197,7 +195,14 @@ int __fastcall DxDriver7_Flip(DxDriver7* self, void* edx) {
self->blitSource = {0, 0, layout.gameWidth, layout.gameHeight};
self->blitDest = layout.screen;
}
return DxDriver7_Flip_original(self, edx);
const int result = DxDriver7_Flip_original(self, edx);
static std::atomic<int> failures = 0;
if (result != 0 && failures++ < 5) {
re::Log("borderless: present failed (0x%08x), source %ldx%ld -> dest (%ld,%ld)-(%ld,%ld)",
static_cast<unsigned>(result), self->blitSource.right, self->blitSource.bottom, self->blitDest.left,
self->blitDest.top, self->blitDest.right, self->blitDest.bottom);
}
return result;
}
void __cdecl GetMouseClientPos(HWND window, POINT* position) {