Commit Graph
20 Commits
Author SHA1 Message Date
Ryan Houdek d10fd4ddd4 Config: Remove warnings 2021-06-10 14:57:14 -07:00
Lioncash 525d50f07e config: Pass strings by const reference where applicable
In a few cases, the strings aren't ever directly modified, so they can
be passed by reference to eliminate a few trivial copies.
2021-06-04 12:46:34 -04:00
Lioncash 5cec8ddca0 config: Move input strings in Loader constructors
Eliminates a copy, minor, but basically a "free" change.
2021-06-04 12:40:38 -04:00
Lioncash 39b2be15ab config: Make use of heterogenous map lookup
Same behavior, but allows lookups without constructing a std::string
(in most cases find() inputs use const char*, so this gets rid of some
string churn).
2021-06-04 12:36:54 -04:00
Ryan Houdek 1ab6726498 Moves Config directory finding to FEXCore
This will be necessary in the next commit
2021-03-31 23:46:07 -07:00
Ryan Houdek c3854c211a Fix finding home directory when we have no environment variables. 2021-03-31 23:37:56 -07:00
Ryan Houdek 15dd70487f Removes legacy difference between FEX config env variable and enum names 2021-03-29 00:26:11 -07:00
Ryan Houdek a3ba1ae199 Deduplicates some configuration data
Configuration mapping was duplicated between three different tables.
Additionally default configuration values were strewn about. Making it confusing as to what the default value would end up being

Adds a new ConfigValues.inl header that defines a few things right next to each other.
Defines the enum name as usual.
Defines the JSON config option name.
Defines the Environment config option name
Defines the default value that the configuration should be
2021-03-08 22:53:41 -08:00
Stefanos Kornilios Mitsis Poiitidis fafc987eab AOTIR: Rename Generate to Capture 2021-02-23 12:08:57 +02:00
Stefanos Kornilios Mitsis Poiitidis 57680a8614 AOTIR: Add --aotir-generate and --aotir-load to FEXLoader & Config 2021-02-23 12:08:57 +02:00
Scott Mansell 93d5cdde1f Fix missing libc++ includes
gnu's libc++ is lenient and allows you to miss includes at times.

Android's binoic is more strict and needs these fixes to build.
2021-02-01 21:08:45 +13:00
Ryan Houdek 544a1f307f Adds an option to disable optimization passes
Instead of forcing someone to test by modifying code, allow a -O0 option
to be passed in.
Also added to FEXConfig GUI for easily touching.

Fixes #652
2021-01-17 23:51:22 -08:00
Ryan Houdek f14cd54791 Switches over to having a correctly layered configuration system
Instead of having the configuration being loaded and stored in to a
frontend system. First moves the backing store of the configuration in
to FEXCore.

Each layer that is constructed then loads its particular configuration.
After the layers are loaded, then a meta layer is constructed that
merges the layers flat.

This means we will no longer hit the problem where a configuration is
stored in the "main" configuration file, then environment and arguments
passed manage to overwrite it.

The order of the layers going from inner most layer to outer most, with
outermost overwriting previous layer configurations is as follows:

Main < Global application < Local application < Arguments < Environment

One step that needs to be changed in the future is that FEXCore can then
just load its configuration from the layers directly since the data is
in FEXCore now. This will be reserved for a future change so we are less
disruptive.
2020-12-07 11:15:48 -08:00
Ryan Houdek a28df9f5c1 Moves SonicUtils in to FEXCore
Removes the extraneous and dead VM CPU backend
2020-11-29 00:30:28 -08:00
Ryan Houdek a9d0ecda52 Removes a debug log
I set -w on the config file while testing, so this log message is just
being annoying
2020-08-02 17:59:16 -07:00
Ryan Houdek c64ad6f868 Adds support for Config values with lists of variables
Only works for lists with std::string at the moment since that is all we
need for environment variables
2020-07-11 09:36:24 +01:00
Ryan Houdek 826464d894 Ensures that Config.json stores to ${CONFIG}/Config.json
Just ensures that it gets stored in the correct XDG or ~/ config
directories.
If these don't exist then it'll get dumped in to PWD or cwdir, whichever
is available as fallback
2020-06-12 15:08:16 -07:00
Ryan Houdek 03b885816e Fixes a crash that can occur when the config exists but has nothing
Common when I'm testing and wiping the config away
2020-05-30 18:56:39 -07:00
Ryan Houdek 5e4a75e8a6 Fixes crashes in unit tests
In the case of multiple dozens of tests running, they will end up
loading and saving the config files dozens of times.
This was causing the configuration system to load in half saved files
that were causing common crashes in the posix unit tests.

Theoretically this could have happened at any time but it looks like
with the posix unit tests added, it is just more likely to happen.

Makes it so loading the configuration file is much more robust and
verbose on failure.
Makes it so saving the config file first saves to a temporary and then
moves in to the correct location. This causes the config saving to be
atomic in a sense so the unit tests won't corrupt other processes of FEX
trying to load the config file.
2020-05-27 16:52:45 -07:00
Ryan Houdek 369686c992 Initial Commit 2020-03-06 09:08:13 +02:00