20,741
edits
Line 157: | Line 157: | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
std::string | std::string target_mode = fgGetString("/startup/target", "default"); | ||
if ( | if (target_mode == "default") { | ||
// default code | // default code | ||
} | } | ||
else { | else if (target_mode =="android") { | ||
// | // android-specific code | ||
} | |||
else if (target_mode =="maemo") { | |||
// maemo-specific code | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
To test the non-default code path, just start up with something like --prop:/startup/target=android | |||
This is really just intended to get us started. Ideally, subsystem-specific switches would be added, so that all subsystems can be individually disabled or customized, analogous to how other subsystems like the AI traffic system can already be disabled purely from the command line. | |||
Some possible candidates include: | Some possible candidates include: |