-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Labels
T-Feature-RequestProposed new featureProposed new feature
Description
Floating point exceptions can be useful to detect bugs such as floating point division by zero. A cvar to turn that on would be a useful debugging tool. Preferably on a per-module basis (engine/cgame/sgame). To turn it on for only a gamelogic module you'll need to use a native exe since a DLL shares the global state with the engine and I doubt this functionality is available in NaCl.
On Windows the exceptions can be enabled like
unsigned dummy;
if (0 != _controlfp_s(&dummy, 0, _EM_INVALID | _EM_ZERODIVIDE /* | _EM_OVERFLOW */))
Log::Warn("error");
On Linux feenableexcept can be used
Metadata
Metadata
Assignees
Labels
T-Feature-RequestProposed new featureProposed new feature