1
0
Fork 0

Nasal security: allow reading explicit --terrasync-dir

(but not /sim/terrasync/scenery-dir - https://bugs.debian.org/780716 )
Needed for animated jetways:
https://sourceforge.net/p/flightgear/mailman/message/34870606/
This commit is contained in:
Rebecca N. Palmer 2016-02-21 20:25:02 +00:00
parent de959a14f3
commit 41b78ce150

View file

@ -855,6 +855,14 @@ fgOptFgScenery( const char *arg )
return FG_OPTIONS_OK;
}
static int
fgOptTerrasyncDir( const char *arg )
{
globals->append_fg_scenery(arg, true);
fgSetString("/sim/terrasync/scenery-dir", arg);
return FG_OPTIONS_OK;
}
static int
fgOptFov( const char *arg )
{
@ -1620,7 +1628,7 @@ struct OptionDesc {
{"materials-file", true, OPTION_STRING, "/sim/rendering/materials-file", false, "", 0 },
{"disable-terrasync", false, OPTION_BOOL, "/sim/terrasync/enabled", false, "", 0 },
{"enable-terrasync", false, OPTION_BOOL, "/sim/terrasync/enabled", true, "", 0 },
{"terrasync-dir", true, OPTION_STRING, "/sim/terrasync/scenery-dir", false, "", 0 },
{"terrasync-dir", true, OPTION_FUNC, "", false, "", fgOptTerrasyncDir },
{"download-dir", true, OPTION_STRING, "/sim/paths/download-dir", false, "", 0 },
{"geometry", true, OPTION_FUNC, "", false, "", fgOptGeometry },
{"bpp", true, OPTION_FUNC, "", false, "", fgOptBpp },