Commit Graph

33 Commits (b89b9b810958df4654356a44fe62d945eb4866b6)

Author SHA1 Message Date
Witold Baryluk 4f20da781d Improve code for program name extraction
This cleans up the code, as well fixes the bug of not setting
program_name if the MANGOHUD_CONFIG env is specified.

Instead of global variable, that could be not-initialized
use a function to get a program name in logging.

While at it, revamp code and separate things into own functions,
and return by value, and make them easier to use / share code.
4 years ago
FlightlessMango af0658e137 Change win config location to mangohud folder 4 years ago
FlightlessMango cc38924997 Added graphs 4 years ago
FlightlessMango 378cc1e089 Push params to HudElements options 4 years ago
FlightlessMango dd741cdda3 Assume MangoHud.conf in C:\ root on win32 4 years ago
FlightlessMango ac85815d82 Changed output_file to output_folder 4 years ago
jackun edf9f95517
Use std::locale::classic with confiog file ifstream, just in case 4 years ago
jackun f5e3f3b73b
[config] Add MANGOHUD_CONFIGFILE envvar for specific configuration file
Issue #104
4 years ago
jackun 25b0adfbf9
Move Wine exe name code from config.cpp to get_wine_exe_name(...) 4 years ago
jackun 341aa21b87
[config] Move options map and config_file_path to overlay_params 4 years ago
FlightlessMango c5dad16612 Listen for modify on config file 4 years ago
jackun f7a7256374
Clear options map so reloading config files actually has an effect 4 years ago
jackun 6b4103eae9
[config] Parse Wine application name without absolute path 4 years ago
jackun 50cef9621b
Remove ~/.local/share/MangoHud/MangoHud.conf support 4 years ago
jackun 72d7f6ef71
Print also a reason for skipping a config file 4 years ago
jackun 417b1aac8d
config: trim only surrounding whitespace 4 years ago
jackun 9053b63142
Allocate instance_data with "new" 4 years ago
jackun ad2ed4a99a
config: load highest priority config available only 4 years ago
jackun f7e7146883
config: find_last_of can search for multiple characters, doh 4 years ago
jackun 6a45ac84b3
config: sometimes wine exe has forward-slashes instead 4 years ago
jackun 65b90fc01b
config file: respect XDG dirs
Other half of #37
4 years ago
jackun 67eab673d8
Override previous setting, std::unordered_map::insert() does not. 4 years ago
jackun 69cf83d3bc
config file: print that config file is skipped if we failed to open it 4 years ago
jackun 3e0eda559d
print if done parsing config file 4 years ago
jackun 6086a6b9ab
config file: try to detect Wine executable's path 4 years ago
jackun 169d5ff99a
Search configs in ~/.config/MangoHud 4 years ago
jackun 08debe5d09
Add per-executable config file support
* executable's name + ".conf" in config dir
* "MangoHud.conf" in executable's folder
4 years ago
jackun 74c9803087
config file: if parameter line has no equal sign, default value to 1 4 years ago
FlightlessMango f56c53c152 Removed unused header 4 years ago
FlightlessMango 2003ae93c9 Continue parsing overlay params without env 4 years ago
FlightlessMango 5a62a1b0de Cleaning up 4 years ago
FlightlessMango 33f48c91be Apply params from config file 4 years ago
FlightlessMango ebc49ae8c5 Basic parse config 4 years ago