8 : speedSetting(commandController,
"speed",
9 "controls the emulation speed: higher is faster, 100 is normal",
10 100.0, 0.01, 10000.0,
Setting::Save::NO)
11 , fastforwardSpeedSetting(commandController,
"fastforwardspeed",
12 "controls the emulation speed in fastforward mode: "
13 "higher is faster, 100 is normal speed",
14 2000.0, 0.01, 10000.0)
15 , fastforwardSetting(commandController,
"fastforward",
16 "select emulation speed:\n"
17 " on -> fastforward speed ('fastforwardspeed' setting)\n"
18 " off -> normal speed ('speed' setting)",
21 speedSetting.
attach(*
this);
22 fastforwardSpeedSetting.
attach(*
this);
23 fastforwardSetting.
attach(*
this);
28 fastforwardSetting.
detach(*
this);
29 fastforwardSpeedSetting.
detach(*
this);
30 speedSetting.
detach(*
this);
33void SpeedManager::updateSpeed()
35 speed = (fastforwardSetting.
getBoolean() ? fastforwardSpeedSetting : speedSetting)
36 .getDouble() * (1.0 / 100.0);
40void SpeedManager::update(
const Setting& )
noexcept
bool getBoolean() const noexcept
SpeedManager(CommandController &commandController)
void detach(Observer< T > &observer)
void attach(Observer< T > &observer)
This file implemented 3 utility functions: