1
0
Fork 0

New "pause" fgcommand.

Original property-rules in keyboard.xml toggled master and clock freeze
independently - which caused issues when only one property was true. New
command toggles both properties consistently.
This commit is contained in:
ThorstenB 2011-05-21 13:27:09 +02:00
parent 473d1447c3
commit 53a954d631

View file

@ -314,6 +314,15 @@ do_resume (const SGPropertyNode * arg)
#endif
static bool
do_pause (const SGPropertyNode * arg)
{
bool paused = fgGetBool("/sim/freeze/master",true);
fgSetBool("/sim/freeze/master",!paused);
fgSetBool("/sim/freeze/clock",!paused);
if (fgGetBool("/sim/freeze/replay-state",false))
fgSetBool("/sim/replay/disable",true);
}
/**
* Built-in command: load flight.
@ -1432,6 +1441,7 @@ static struct {
{ "reinit", do_reinit },
{ "suspend", do_reinit },
{ "resume", do_reinit },
{ "pause", do_pause },
{ "load", do_load },
{ "save", do_save },
{ "panel-load", do_panel_load },