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:
parent
69f8a3bb31
commit
ecbce19b47
3 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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" }));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
<command>dialog-show</command>
|
||||
<dialog-name>sound-dialog</dialog-name>
|
||||
</binding>
|
||||
<enabled>false</enabled>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
|
|
Loading…
Reference in a new issue