Repository navigation
Fixes
Widescreen: objects in the side bands (buildings, buses, signs) no longer disappear outside the 4:3 area, especially when rotating the camera. The mesh draw routines clipped against the original 640×480 bounds, and those bounds are now widened only while they run.
Periodic stutter: controller detection (XInput on empty slots and the 16-ID winmm scan) used to run on the game thread and caused ~130 ms spikes every ~120 frames. It now runs on a background thread. A newly plugged controller can take up to ~2 s to be recognized.
Performance
Direct GPU presentation: the frame is no longer read back to the CPU. Post-processing (AA and brightness) and scaling run on the GPU and go straight to a swap chain. This makes 4K playable on mid-range GPUs.
Frame pacing: the swap chain tries FLIP_DISCARD first and falls back to blit mode. GPU work is paced so the CPU does not run ahead.
Opt-out: to go back to the old path, create no_direct.txt next to the exe or set CT2_GPUDIRECT=0.
Notes
Delete recomp\obj, ct2.exe and the old dist folder before rebuilding.
Disc data and generated C are not included. You need your own copy of the game.