commandline launch with compatmode

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
krutomisi
Posts: 24
Joined: Mon Jan 11, 2021 10:17 am

commandline launch with compatmode

Post by krutomisi »

Windows 10, GZDoom v4.5.0
launching via commandline using switches for compatmode i.e

+compatmode 1
+set compatmode 1

changes what is shown as the selected compat mode preset but doesn't appear to change any of the underlying variables
the numbers in the menu under compatflags/compatflags2 don't change either
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48514
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: commandline launch with compatmode

Post by Graf Zahl »

What we have here is the great undefined-ness of order of execution for static C++ constructors. In this case they pretty much mess up each other's values.
Fixing this would require some major refactoring of how CVARs get set up. It has been on my wishlist for some time, but never became urgent.

Maybe after 4.6.0 - it's something that could be useful for Raze as well.
User avatar
Delfino Furioso
Posts: 89
Joined: Sat Mar 27, 2021 3:21 pm

Re: commandline launch with compatmode

Post by Delfino Furioso »

hi graf, sorry to resurrect this discussion BUT...

I'm in the process of setting up a bunch of .bat files and I'm facing the same as OP
it happens either when trying "+set compatmode <value>" using the command line or when adding "compatmode <value>" in autoexec.cfg
I've tried both 4.7.1 and 4.8pre

is this enhancement still something you'd like to implement?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48514
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: commandline launch with compatmode

Post by Graf Zahl »

It required a bit of hackery but it should work now.
User avatar
Delfino Furioso
Posts: 89
Joined: Sat Mar 27, 2021 3:21 pm

Re: commandline launch with compatmode

Post by Delfino Furioso »

I've noticed over @github that the hackery has been removed and gzdoom will support the "-compatmode" parameter

thank you graf!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48514
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: commandline launch with compatmode

Post by Graf Zahl »

Yeah, the initial attempt to fix this did not work. So I had to redo it.

Return to “Closed Bugs [GZDoom]”