1
0
Fork 0

Revert "issue #127: make screen shots work with OSG multi-threading"

This reverts commit 5106935b92ad31be69d4ef82ebb34305a658948e.
This commit is contained in:
ThorstenB 2011-06-13 00:58:26 +02:00
parent b8eecab9cf
commit 3e3ecb49e2
2 changed files with 14 additions and 12 deletions

View file

@ -1254,17 +1254,6 @@ var common_aircraft_keys = {
],
};
_setlistener("/sim/signals/screenshot", func {
var path = getprop("/sim/paths/screenshot-last");
var button = { button: { legend: "Ok", default: 1, binding: { command: "dialog-close" }}};
var success= getprop("/sim/signals/screenshot");
if (success) {
popupTip("Screenshot written to '" ~ path ~ "'", 3);
} else {
popupTip("Error writing screenshot '" ~ path ~ "'", 600, button);
}
});
var do_welcome = 1;
_setlistener("/sim/signals/fdm-initialized", func {
var haveTutorials = size(props.globals.getNode("/sim/tutorials", 1).getChildren("tutorial"));

View file

@ -1106,7 +1106,20 @@ top down before the key bindings are parsed.
<name>F3</name>
<desc>Capture screen</desc>
<binding>
<command>screen-capture</command>
<command>nasal</command>
<script>
var success = fgcommand("screen-capture");
var path = getprop("/sim/paths/screenshot-last");
var threading = getprop("/sim/rendering/multithreading-mode");
var button = { button: { legend: "Ok", default: 1, binding: { command: "dialog-close" }}};
if (threading and threading != "SingleThreaded") {
gui.popupTip("Threading model must be SingleThreaded (or not defined) for snapshots to work.", 600, button);
} elsif (success) {
gui.popupTip("Screenshot written to '" ~ path ~ "'", 2);
} else {
gui.popupTip("Error writing screenshot '" ~ path ~ "'", 600, button);
}
</script>
</binding>
<mod-shift>
<desc>Load panel</desc>