Move the build to VS2022 (v143) with runtime parity against VC9

Hand-converted the four .vcproj projects to .vcxproj (Win32, v143,
Windows 11 SDK + DXSDK June 2010 for d3dx9/dxerr only). WinTesla.sln now
builds the v143 projects; the legacy solution is kept as WinTesla_vc9.sln.

Kept: /Zp1 in Munga_L4+RP_L4, Unicode, x86, /DYNAMICBASE:NO,
/FORCE:MULTIPLE (header-defined globals still duplicated across TUs).
Changed: CRT unified to /MD(d); import libs linked by the exes instead of
merged into Munga_L4.lib; WINDOWS_IGNORE_PACKING_MISMATCH and
_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS defined;
legacy_stdio_definitions.lib for the June-2010 dxerr.lib.

Source fixes, all behavior-preserving: Time gains standard (non-volatile)
copy-ctor/assignment overloads (rvalues cannot bind to volatile& in
standard C++); operator==(SOCKADDR_IN&,...) made inline; L4DINPUT's
Enum*Callback pair renamed DIEnum* (collided with L4CTRL's under LTCG);
std::ios.in -> std::ios::in in CAMMGR.cpp.

Verified: VC9 baseline rebuilt from this tree first, then the v143 build
compared against it in a sandboxed game working copy - identical logs and
behavior through RIO init (against vRIO) and mission load, including the
same pre-existing AV in d3d_OBJECT::LoadTexture (L4D3D.cpp:262) that both
toolchains hit; documented in BUILD.md 4 as the next debugging target.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-12 12:22:31 -05:00
co-authored by Claude Fable 5
parent 467934c968
commit 12b31187f9
17 changed files with 2561 additions and 203 deletions
+4 -4
View File
@@ -15,11 +15,11 @@ DIJoystick::DIJoystick(HINSTANCE hInstance, HWND hWnd)
if (SUCCEEDED(DirectInput8Create(hInstance, DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&mDI, NULL)))
{
mDI->EnumDevices(DI8DEVCLASS_GAMECTRL, EnumJoysticksCallback, this, DIEDFL_ATTACHEDONLY);
mDI->EnumDevices(DI8DEVCLASS_GAMECTRL, DIEnumJoysticksCallback, this, DIEDFL_ATTACHEDONLY);
if (mJoystick)
if (SUCCEEDED(mJoystick->SetDataFormat(&c_dfDIJoystick2)))
if (SUCCEEDED(mJoystick->SetCooperativeLevel(hWnd, DISCL_EXCLUSIVE | DISCL_BACKGROUND)))
if (SUCCEEDED(mJoystick->EnumObjects(EnumAxesCallback, this, DIDFT_AXIS)))
if (SUCCEEDED(mJoystick->EnumObjects(DIEnumAxesCallback, this, DIDFT_AXIS)))
return;
}
@@ -51,7 +51,7 @@ DIJoystick::~DIJoystick()
}
}
BOOL CALLBACK EnumJoysticksCallback(const DIDEVICEINSTANCE* pdidInstance, VOID* pContext)
BOOL CALLBACK DIEnumJoysticksCallback(const DIDEVICEINSTANCE* pdidInstance, VOID* pContext)
{
DIJoystick *joystick = (DIJoystick*)pContext;
if (FAILED(joystick->mDI->CreateDevice(pdidInstance->guidInstance, &joystick->mJoystick, NULL)))
@@ -60,7 +60,7 @@ BOOL CALLBACK EnumJoysticksCallback(const DIDEVICEINSTANCE* pdidInstance, VOID*
return DIENUM_STOP;
}
BOOL CALLBACK EnumAxesCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef)
BOOL CALLBACK DIEnumAxesCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef)
{
DIJoystick *joystick = (DIJoystick*)pvRef;
DIPROPRANGE diprg;