The latter more clearly shows that the code flow will not proceed past
this point while the menu is open. This conversion sets the stage for
later changes to make these menus asynchronous.
Add RAII wrappers for unmounting PHYSFS paths. Use them in places that
previously handled unmounting explicitly. Also, use it for descent.hog
/ descent2.hog, which previously were left mounted indefinitely.
Some callers will need access to the computed path. Change the callers
to pass in a buffer for this path, and have PHYSFSX_addRelToSearchPath
fill that buffer directly.
lastsize was never updated from 0, so every pass would reallocate the
buffer. Switch to a std::vector and rely on it to remember the size.
Manually tracking the size would be slightly more efficient, but this is
not a hot path and the vector approach is easier to review.
gr_init_bitmap can be passed a pointer to uninitialized memory, and
will save that pointer into the bitmap for the underlying memory to be
initialized later. In gcc-11, this triggers a warning because the
`const` qualifier leads gcc to expect that the memory will only be read
(while uninitialized) and not written.
Reported-by: TheDemonicSurfer <https://github.com/dxx-rebirth/dxx-rebirth/issues/593>
- Add support for a sequence of guard predicates for a test, rather than
limiting to a single predicate.
- Use that support to skip the dylibbundler test when
user_settings.macos_add_frameworks makes the test unnecessary.
- Use StaticSubprocess to avoid running dylibbundler repeatedly if
building multiple targets for which the test is necessary.
- Capture stderr from the child process, and log it, instead of letting
it be written directly to the stderr inherited from the caller of
SCons.
- On failure, write to the SConf log the return code of dylibbundler,
its stdout, and its stderr. This may help users diagnose the problem
if it is more complicated than the tool not being installed.
- On failure, show a more direct suggestion about how to avoid needing
dylibbundler.
Avoids switching cockpit views to CM_LETTERBOX when player dies or
level ends which stereo viewport is active, as well as other calls
to select_cockpit().
When player gets killed, the screen inexplicably switches to
another viewport format to show explosion POV and then switches
to cockpit viewport, which is not compatible with stereo formats.
Unable to locate where exactly cockpit gets switched on player
dead state, so hack is in place to keep stereo formats fullscreen.