- Defined NOMINMAX macro to disable windef.h's min/max macros; they were clashing with the C++ standard library's std::min/std::max.
- All uses of min/max that had ambiguous type deduction were explicitly instantiated as min<long> and max<long>.
- Header includes were sorted
Many thanks to DKO for the patch.
This is to stop XInput controller one from having to be used in first player.
Also remove the need for the bconnected variable, allows controllers that are connected at game start to be disconnected and reconnected for XInput.