mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
cfg: d3d9 standalone configurator (#720)
## Description of change **Configurator (spicecfg.exe)** - Attempts to create a D3D9 device on startup and uses the hardware ImGui DX9 path when successful; falls back to the existing software rasterizer automatically if D3D9 init fails. - Rewrites the configurator window loop: refresh-rate-aware render timer, minimize/resize/`WM_DISPLAYCHANGE` handling, direct Win32 -> ImGui input (keyboard, mouse, wheel), and optimized software painting via `SetDIBitsToDevice` instead of per-frame GDI `HBITMAP` allocation. **Overlay / input (scoped to standalone configurator)** - Skips expensive per-frame rawinput polling in `ImGui_ImplSpice_NewFrame` when `CONFIGURATOR_STANDALONE` is set (Win32 messages drive input instead). - Adds software-renderer idle-frame detection (`sw_pixels_dirty` + draw-data hash) so spicecfg only repaints when pixels actually change. - Adds `ImGuiWindowFlags_NoScrollWithMouse` on the configurator root window to prevent scroll jolt on non-scrollable child widgets.
This commit is contained in:
@@ -765,7 +765,7 @@ set(SOURCE_FILES ${SOURCE_FILES} launcher/options.h launcher/options.cpp)
|
||||
set(RESOURCE_FILES cfg/manifest.manifest cfg/manifest.rc cfg/icon.rc cfg/Win32D.rc)
|
||||
add_executable(spicetools_cfg WIN32 ${SOURCE_FILES} ${RESOURCE_FILES})
|
||||
target_link_libraries(spicetools_cfg
|
||||
PUBLIC ws2_32 version comctl32 shlwapi iphlpapi hid secur32 setupapi psapi winmm winhttp strmiids
|
||||
PUBLIC d3d9 ws2_32 version comctl32 shlwapi iphlpapi hid secur32 setupapi psapi winmm winhttp strmiids
|
||||
PRIVATE fmt::fmt-header-only discord-rpc imgui hash-library minhook imm32 dwmapi CpuFeatures::cpu_features)
|
||||
target_link_libraries(spicetools_cfg PUBLIC winscard)
|
||||
set_target_properties(spicetools_cfg PROPERTIES PREFIX "")
|
||||
@@ -783,7 +783,7 @@ set(SOURCE_FILES ${SOURCE_FILES} launcher/options.h launcher/options.cpp)
|
||||
set(RESOURCE_FILES cfg/manifest.manifest cfg/manifest.rc cfg/icon.rc cfg/Win32D.rc)
|
||||
add_executable(spicetools_cfg_linux WIN32 ${SOURCE_FILES} ${RESOURCE_FILES})
|
||||
target_link_libraries(spicetools_cfg_linux
|
||||
PUBLIC ws2_32 version comctl32 shlwapi iphlpapi hid secur32 setupapi psapi winmm winhttp strmiids
|
||||
PUBLIC d3d9 ws2_32 version comctl32 shlwapi iphlpapi hid secur32 setupapi psapi winmm winhttp strmiids
|
||||
PRIVATE fmt::fmt-header-only discord-rpc imgui hash-library minhook imm32 dwmapi CpuFeatures::cpu_features)
|
||||
set_target_properties(spicetools_cfg_linux PROPERTIES PREFIX "")
|
||||
set_target_properties(spicetools_cfg_linux PROPERTIES OUTPUT_NAME "spicecfg_linux")
|
||||
|
||||
Reference in New Issue
Block a user