SpiritQuaddicted / reQuiem

reQuiem is a custom OpenGL Quake engine for Windows and Linux. It's designed for maximum compatibility with all things Quake - past, present and future. It's fast, reliable, and easy to configure. In short: it fixes what was broken, improves what needed improving, and leaves the rest alone. It was developed by jdhack.
GNU General Public License v2.0
17 stars 2 forks source link

requiem.cfg is written but not read on windows (7) #29

Closed SpiritQuaddicted closed 10 years ago

SpiritQuaddicted commented 10 years ago

Maybe it is just me but I have trouble getting reQuiem to save and load its settings (id1/requiem.cfg). cfg_savevars is set to 2 in game, then I quit. The requiem.cfg is created and "full of things". When I launch reQuiem again, it will not even try to load that file but use its defaults again, then on quitting, write out an almost empty requiem.cfg.

neogeographica commented 10 years ago

It looks like requiem.cfg is only executed if there is also an autoexec.cfg.

I believe this is to enforce that requiem.cfg should be executed after autoexec.cfg, but it fails to take into account the case where autoexec.cfg does not exist. (See Cmd_Exec_f in cmd.c.)

I think the saving works fine, it's just that when it doesn't get executed, some variables revert to other values, which (depending on cfg_savevars) will affect whether they get written back out to requiem.cfg when Quake shuts down.

Can you verify that the autoexec.cfg thing is the source of your problem? Even just an empty autoexec.cfg file in id1 (or whatever the gamedir is) should make requiem.cfg start behaving.

If that's the issue, then I assume the behavior we want is for requiem.cfg to be executed even in the absence of autoexec.cfg. (But still after autoexec.cfg if autoexec.cfg exists.) If you're on board with that I can look at the best way to fix it.

P.S. reQuiem's Cmd_Exec_f is doing some funky stuff in general. Another thing I noticed there is that when using a gamedir, it will still execute any autoexec.cfg in id1 before it executes autoexec.cfg in the gamedir. Which is kind of nice in most cases, but nonstandard/surprising.

neogeographica commented 10 years ago

Potential solution in the commit above. It's working for me so far.