os_init_cmdline() contains the legacy-mode codepath in a conditional, but then doesn't put the non-legacy mode code in an else branch, resulting in cmdline_fso.cfg getting processed twice, leading to e.g. every mod getting loaded twice (which can cause all kinds of issues). This just wraps the non-legacy code in an else branch so that FSO running in legacy mode won't do both.
This makes the debug window resizable and also reduces the default size
to ~80% of the used display. This also makes sure that the main window
has input focus after the debug window was created.
Currently there are multiple locations in the code where the version is
constructed by printing the individual numbers together. This is mostly
sufficient but it hides information such as the commit hash or the build
name (e.g. RC1). These changes unify that behavior by always using the
version string generated by CMake.
This allows to show the debug output in a second window in real time.
This system could be expanded further to allow more interactivity but
the current status is good enough.
This is basically the old code but it has been ported to the new tracing
system.
There is still some weirdness with the percentages but I have no idea
where that comes from since I don't know the code.
The new design is centered around the Event Trace JSON format but it
should still be possible to adapt it for other profiling tools. The old
profiling system has been removed.
This uses the program binary support included in OpenGL 4.1 to build a
cache of compiled shaders. It does this by computing the MD5 of the
source code of the shaders and using that hash to save the files. That
should make sure that a change to a shader is automatically reflected in
the shader cache.
This disables all mouse grabbing which is useful for debugging when SDL gets interrupted without giving up
control of the mouse. That usually leads to problems since you can't
interact with the debugger window anymore.
This is a new implementation of the JSON dumping which was already
proposed in #22 but this version tries to allow implementing both
reading and writing JSON files without having to change the existing
code too much. This is done by using an abstract class to hide the
differences between writing the JSON and binary files.
This is currently only capable of writing the files but not reading them
so if the option is enabled all changes to the pilot file are lost. I
will implement reading after this PR has been merged since I would like
to reduce the amount of changes that need to be reviewed.
If the -noninteractive command line option is set then dialogs won't be
shown and the default action is taken. This should be useful for
the standalone server.
GCC 6 warns about misleading indentation because it counts tabs as 8
spaces. The rest of the code uses tabs, these lines use 4 spaces.
Replace spaces with tabs.
Whitespace changes only.
This will use SDL_GetPrefPath to determine a suitable config directory which will be used for all runtime writing. Additionally all platforms will now use the configuration ini files, the Windows registry will be deprecated. For better compatibility with current installs there is a "legacy mode" which will work like the current install. It will be used as long as the launcher doesn't write the configuration file to the new location. Migrating old installs requires copying the existing pilot files to the new location and copying any existing configuration data.
Given the number of unintended consequences that can result from use of this command-line flag, we should return to the pre-137eb7e4d4cb0f9c153d15bbcce847347aa3d716 behavior of not including it in the exe_params[] array; anyone who knows what it does and why we don't advertise it can still use it for testing purposes, but it should prevent the typical user from turning it on without knowing exactly what can go wrong.
Ignore failure to open directories that the filesystem gave us.
There's nothing we can do about it.
Also improve missing mod warning.
Tiny style improvement.