1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-04-01 17:06:40 +00:00
openmw/components
AnyOldName3 a130ca57a4 Track source of settings
This one's a biggie.

The basic idea's that GameSettings should know:
* what the interpreted value of a setting is, so it can actually be used.
* what the original value the user put in their config was, so it can be put back when the config's saved.
* which path it's processing the openmw.cfg from so relative paths can be resolved correctly.
* whether a setting's a user setting that can be modified, or from one of the other openmw.cfg files that can't necessarily be modified.

This had fairly wide-reaching implications.

The first is that paths are resolved properly in cases where they previously wouldn't have been.
Without this commit, if the launcher saw a relative path in an openmw.cfg, it'd be resolved relative to the process' working directory (which we always set to the binary directory for reasons I won't get into).
That's not what the engine does, so is bad.
It's also not something a user's likely to suspect.
This mess is no longer a problem as paths are resolved correctly when they're loaded instead of on demand when they're used by whatever uses them.

Another problem was that if paths used slugs like ?userconfig? would be written back to openmw.cfg with the slugs replaced, which defeats the object of using the slugs.
This is also fixed.

Tracking which settings are user settings and which are in a non-editable openmw.cfg allows the launcher to grey out rows so they can't be edited (which is sensible as they can't be edited on-disk) while still being aware of content files that are provided by non-user data directories etc.
This is done in a pretty straightforward way for the data directories and fallback-archives, as those bits of UI are basic, but it's more complicated for content files as that uses a nmodel/view approach and has a lot more moving parts.
Thankfully, I'd already implemented that when dealing with builtin.omwscripts, so it just needed wiring up.

One more thing of note is that I made the SettingValue struct storable as a QVariant so it could be attached to the UI widgets as userdata, and then I could just grab the original representation and use it instead of needing any complicated mapping from display value to on-disk value.
2024-03-06 00:36:13 +00:00
..
bsa Avoid seek for detecting BSA type 2024-02-18 14:54:51 +01:00
bullethelpers Remove unused includes 2022-10-09 16:44:18 +02:00
compiler Parse special characters that have been put back as names too 2024-01-24 18:31:04 +01:00
config Track source of settings 2024-03-06 00:36:13 +00:00
contentselector Track source of settings 2024-03-06 00:36:13 +00:00
crashcatcher Make crashCatcherInstall no-op for Android 2024-02-11 03:18:43 +01:00
debug DebugCustomDraw: Correct PerContextProgram use, clean up drawImplementation 2024-02-16 14:43:16 +03:00
detournavigator Update next tile_id when there is a duplicate in navmeshdb 2024-02-07 11:28:34 +01:00
esm Merge branch 'master' into menuscripts 2024-01-27 15:45:31 +01:00
esm3 Allow the NAM9 field to be used if COUN is omitted 2024-02-20 20:04:28 +01:00
esm4 Use forward declaration for VFS::Manager 2024-01-24 21:52:48 +01:00
esmloader Gets rid of most ESM::CellId 2023-04-03 14:16:05 +02:00
esmterrain Move local variables in components 2024-01-19 16:01:48 +04:00
fallback Correct MaxNumberRipples and Timescale Clouds validation categories 2024-01-26 17:12:58 +03:00
files There's no such thing as the global data directory 2024-02-27 14:11:48 +00:00
fontloader Merge Assumeru/mystringvui 2023-10-17 23:53:04 +02:00
fx Actually normalize the sun position exposed to post-processing 2024-01-28 05:38:12 +03:00
interpreter Use string_view in more places and reduce the number of empty string literals 2023-05-21 16:39:32 +02:00
l10n Deploy base Qt translations when needed 2024-02-15 09:26:14 +04:00
loadinglistener Fix crash related to async content loading (#7508) 2023-07-29 21:13:57 +02:00
lua Test LuaUtil::safeGet preventing crash 2024-02-14 09:49:32 +01:00
lua_ui Merge branch 'master' into menuscripts 2024-01-27 15:45:31 +01:00
misc Merge branch 'bookart-is-textures-too' into 'master' 2024-02-24 10:31:13 +00:00
myguiplatform Merge Assumeru/mystringvui 2023-10-17 23:53:04 +02:00
navmeshtool Stop updating navmeshtool progress on first bad message 2023-01-27 19:10:53 +01:00
nif Merge branch 'move_components' into 'master' 2024-01-20 15:53:07 +00:00
nifbullet Merge branch 'russianroulette' into 'master' 2023-12-26 10:33:20 +00:00
nifosg Use move semantics for osg::ref_ptr 2024-01-21 13:48:33 +04:00
platform Add missing headers to components/CMakeLists.txt 2023-10-15 15:44:24 +01:00
process Do not include formatting spaces to localizable strings 2023-11-30 13:06:50 +04:00
resource Lua: Animation bindings 2024-01-26 21:39:33 +00:00
sceneutil Capitulate 2024-02-20 23:51:42 +00:00
sdlutil Use settings values for Video settings 2023-10-27 14:31:23 +02:00
serialization Add missing array include 2023-07-29 00:29:03 +02:00
settings Add option to use camera as sound listener 2024-02-13 09:18:18 +00:00
shader Fix some Coverity Scan complaints 2024-02-02 09:28:19 +04:00
sqlite3 Minor header cleanup 2023-04-30 16:26:03 +02:00
std140 Add missing array include 2023-07-29 00:29:03 +02:00
stereo Do not copy due to auto misuse 2024-01-07 18:52:10 +04:00
terrain Don't use height cull callback when there's no terrain 2024-01-19 12:24:15 +03:00
to_utf8 Address feedback 2024-01-17 18:10:42 +01:00
translation Use string_view in more UI code 2023-05-21 18:14:12 +02:00
version [Postprocessing] Add an API version, mirroring Lua 2023-11-16 15:24:16 +00:00
vfs Merge branch 'use_is_directory_member' into 'master' 2024-02-23 12:36:40 +00:00
widgets Pass some arguments by references 2024-02-01 10:02:15 +04:00
CMakeLists.txt Set components property after it is defined 2024-02-22 11:15:39 +01:00
doc.hpp second set of additional doxygen comments 2010-09-25 20:15:05 +02:00