1
0
Fork 0

Sound: trigger subsystem reinit instead of relying on property listener.

Disable sound dialog when sound system is globally disabled (command-line/
compile-time).
This commit is contained in:
ThorstenB 2012-09-21 13:30:31 +02:00 committed by Vivian Meazza
parent 69f8a3bb31
commit ecbce19b47
3 changed files with 3 additions and 0 deletions

View file

@ -159,6 +159,7 @@ _setlistener("/sim/signals/nasal-dir-initialized", func {
menuEnable("rendering-buffers", getprop("/sim/rendering/rembrandt/enabled"));
menuEnable("rembrandt-buffers-choice", getprop("/sim/rendering/rembrandt/enabled"));
menuEnable("stereoscopic-options", !getprop("/sim/rendering/rembrandt/enabled"));
menuEnable("sound-config", getprop("/sim/sound/working"));
# frame-per-second display
var fps = props.globals.getNode("/sim/rendering/fps-display", 1);

View file

@ -356,6 +356,7 @@
if (cmp(current, new) != 0) {
setprop("sim/sound/devices/name", new);
setprop("sim/sound/device-name", new);
fgcommand("reinit", props.Node.new({ "subsystem" : "sound" }));
}
}

View file

@ -64,6 +64,7 @@
<command>dialog-show</command>
<dialog-name>sound-dialog</dialog-name>
</binding>
<enabled>false</enabled>
</item>
<item>