Files
wowdecomp/_Triage/Clamp.cpp
T
SatyandClaude Opus 5.5 250c8817ee Os O6: W32 joystick (DirectInput 8)
Port the OsJoystick API, device enumeration, polling with dead zones,
hat emulation and joystick mouse mode. OsJoystickPoll becomes Mac's
OsPollJoysticks. Clamp (0x5C59F0) goes to _Triage. Os links dinput8
and dxguid.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-25 16:58:04 +02:00

12 lines
290 B
C++

#include "_Triage/Clamp.h"
// VERIFY: c8057e49 manual
// OFFSET: 0x005C59F0
int32_t Clamp(int32_t value, int32_t low, int32_t high) {
if (static_cast<uint32_t>(value - low) > static_cast<uint32_t>(high - low)) {
value = value - low < 0 ? low : high;
}
return value;
}