This background recording keeps the user aircraft stationary while recording
all movements of multiplayer aircraft. Allows one to look at replay without,
for example, disturbing continuous record to file.
This allows full-fidelity recordings of arbitrary length (limited only by disc
space) to be created and replayed. These recordings always contain multiplayer
information, regardless of /sim/replay/multiplayer.
When an uncompressed recording is loaded, it is not copied into memory. Instead
we extract individual frame information as required when replaying.
Recording to file is activated by setting /sim/replay/record-continuous to
true. We use the same filename pattern as ordinary fgtapes. The file format
is similar except for being uncompressed (so that replaying can seek within
the recording; gzip etc don't seem to support seeking within the uncompressed
stream.)
Lars T identified some cases where the launcher would fail to include
local aircraft due to them using weird ways to include additional
XML into their -set.xml. Add a temporary resource provider while the
launcher is scanning, to make this work.
Will pick to LTS branch once verified.
Was being shown before locale was selected, so always using default
translation. Fixed by deferring the dialog, and also added an assert
for debug builds, if trying to access translated string too early.
With this change, “Reload Input” will discover newly attached devices
on macOS, which previously did not work.
Also add correct detection of disconnected devices, which previously
was not handled well, especially with the new ‘keep trying to open
devices’ behaviour of FGJoystickInput.
Should fix:
https://sourceforge.net/p/flightgear/codetickets/2259/
Overlay menus work better than native popups for most use-cases, and
simplify integration (no window focus changes). Switch the remaining
menus to always use the overlay system
As part of this, fix how Overlay positions are adjusted, to avoid
the ugly zero-interval timer.
Fgtape:
If multipayer replay is active we write multiplayer packet information to
fgtape files. We also add /sim/replay/multiplayer to the properties written
to fgtape file so at load time we knows whether to expect multiplayer
packets.
New builds of fg can load and replay old recordings.
It is expected (but has not been tested) that old builds of fg will be able
to read new fgtape recordings where /sim/replay/multiplayer was unset or
false (currently the default).
Old builds of fg will not be able to load fgtape recordings that include
multiplayer data.
Avoid incorrect removal of multiplayer aircraft when replaying:
We now clear multiplayer motion history when we jump forwards or backwards
during replay. This ensures that multiplayer code doesn't remove
multiplayer aircraft because of inconsistent-looking time stamps.
We preserve some multiplay information when purging recorded information
to save space. This ensures that when replaying we get frequent enough
packets to avoid the multiplayer code thinking that multiplayer aircraft
have disappeared.
At the moment this only works for live replays - we don't (yet) write the
multiplayer information to fgtape files.
Enable with:
--prop:bool:/sim/replay/multiplayer=true
This works by copying all raw multiplayer packets into a buffer in
FGMultiplayMgr. Each time it is called, FGFlightRecorder::capture() moves all
the available packet from this buffer into its FGReplayData. Thus we store
roughly syncronised multiplayer packets along with the user aircraft's detailed
replay properties.
When replaying, FGFlightRecorder pushes packets into a buffer in
FGMultiplayMgr, which are used instead of live multiplayer packets. [Actually
when replaying FGMultiplayMgr still reads live packets in order to handle live
chat messages, and ignores chat messages from FGFlightRecorder.]