Skip to content

Commit cf1c737

Browse files
committed
Fix maximum turbo speed
1 parent a93a8a7 commit cf1c737

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

platforms/shared/desktop/emu.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -470,9 +470,6 @@ void emu_set_turbo(GG_Controllers controller, GG_Keys button, bool enabled)
470470

471471
void emu_set_turbo_speed(GG_Controllers controller, GG_Keys button, u8 speed)
472472
{
473-
if (speed < 0)
474-
speed = 1;
475-
476473
geargrafx->GetInput()->SetTurboSpeed(controller, button, speed);
477474
}
478475

src/input_inline.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ INLINE void Input::SetTurboSpeed(GG_Controllers controller, GG_Keys key, u8 spee
125125
if (key < GG_KEY_I || key > GG_KEY_II)
126126
return;
127127

128+
if (speed == 0)
129+
speed = 1;
130+
128131
int index = key - 1;
129132
m_turbo_speed[controller][index] = speed;
130133
}

0 commit comments

Comments
 (0)