Fix potential divide by zero.

This commit is contained in:
Stephen Anthony 2019-12-25 21:49:07 -03:30
parent b6fc984690
commit a061356202
1 changed files with 4 additions and 2 deletions

View File

@ -156,11 +156,13 @@ class DialogContainer
virtual Dialog* baseDialog() = 0;
/**
Set input speeds
Set input speeds.
*/
static void setDoubleClickDelay(int delay) { _DOUBLE_CLICK_DELAY = delay; }
static void setControllerDelay(int delay) { _REPEAT_INITIAL_DELAY = delay; }
static void setControllerRate(int rate) { _REPEAT_SUSTAIN_DELAY = 1000 / rate; }
static void setControllerRate(int rate) {
_REPEAT_SUSTAIN_DELAY = (rate > 0 ? (1000 / rate) : 50);
}
private:
void reset();