Howto:Optimizing FlightGear for mobile devices: Difference between revisions

Jump to navigation Jump to search
Line 154: Line 154:
Being able to disable subsystems individually will be useful for the whole simulator, not just for this effort: [[FlightGear Run Levels]].
Being able to disable subsystems individually will be useful for the whole simulator, not just for this effort: [[FlightGear Run Levels]].


There are many other subsystems which are started by default and which cannot be currently disabled, so more CPU/RAM resources can be saved by editing [https://gitorious.org/fg/flightgear/blobs/next/src/Main/fg_init.cxx#line1043 $FG_SRC/Main/fg_init.cxx] and by making more subsystems optional there, using a property to decide if the subsystem shall be started or not.
There are many other subsystems which are started by default and which cannot be currently disabled, so more CPU/RAM resources can be saved by editing [https://gitorious.org/fg/flightgear/blobs/next/src/Main/fg_init.cxx#line1043 $FG_SRC/Main/fg_init.cxx] and by making more subsystems optional there, using a property to decide if the subsystem shall be started or not, e.g.:
 
<syntaxhighlight lang="cpp">
std::string mode = fgGetString("/startup/mode", "default");
if (mode == "default") {
// default code
}
else {
// without default code
}
</syntaxhighlight>
 


Some possible candidates include:
Some possible candidates include:

Navigation menu