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

-40
View File
@@ -1,40 +0,0 @@
# dxwrapper (zlib; github.com/elishacloud/dxwrapper): translates the game's
# DirectDraw 7 / Direct3D 7 to Direct3D 9, lifting D3D7's 2048x2048 render
# target limit. Pinned release, verified by hash; installed next to
# sacred_re.dll in dxwrapper/ and loaded by src/mods/dxwrapper.cpp, so the
# game folder stays untouched.
include(FetchContent)
# Some CMake builds (e.g. WinLibs/MinGW) ship curl without a CA store, so
# HTTPS downloads fail certificate verification. Fall back to Git for
# Windows' bundle when nothing else is configured.
if(NOT CMAKE_TLS_CAINFO AND NOT DEFINED ENV{SSL_CERT_FILE})
file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _program_files)
foreach(_bundle "${_program_files}/Git/mingw64/etc/ssl/certs/ca-bundle.crt"
"${_program_files}/Git/mingw64/ssl/certs/ca-bundle.crt")
if(EXISTS "${_bundle}")
set(CMAKE_TLS_CAINFO "${_bundle}")
break()
endif()
endforeach()
endif()
FetchContent_Declare(dxwrapper_bin
URL https://github.com/elishacloud/dxwrapper/releases/download/v1.8.8600.25/dxwrapper.zip
URL_HASH SHA256=3894368ebce69f348d08e189c2f0818c49aa3b18ad01e06348743bf6a29af97a
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
)
FetchContent_MakeAvailable(dxwrapper_bin)
function(sacred_re_install_dxwrapper target)
set(_dest "$<TARGET_FILE_DIR:${target}>/dxwrapper")
add_custom_command(TARGET ${target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory "${_dest}"
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${dxwrapper_bin_SOURCE_DIR}/Stub/ddraw.dll"
"${dxwrapper_bin_SOURCE_DIR}/dxwrapper.dll"
"${dxwrapper_bin_SOURCE_DIR}/License.txt"
"${CMAKE_SOURCE_DIR}/config/dxwrapper.ini"
"${_dest}"
VERBATIM)
endfunction()