Healix / Gw2Launcher

Manages and allows for multiple Guild Wars 2 clients to be launched
MIT License
180 stars 24 forks source link

Full Screen Gamma #375

Open arukAdo-tas opened 1 year ago

arukAdo-tas commented 1 year ago

It seems that this option doesnt work (gw2launcher), wether I use the slide or type in the box, it result in the client been set at 0.50 everytime. Ironically despite its call "full screen" its working for windows as well, usefull if you set graphics options to low as it seems to darken a bit everything.

Healix commented 1 year ago

If you set the gamma to 1.5 in Gw2Launcher, OK, then open the settings again, is it still 1.5? Launch the account. It's showing 0.5 in-game? Change the gamma in-game to 2.0 and close the game. Is it now 2.0 in Gw2Launcher?

Note changing the option in-game will also change it in Gw2Launcher, and multiple accounts sharing the same GFXSettings.xml file will overwrite each other, so if you try changing it while multiple accounts are running, it's going to save whichever was last.

As for why it works under windowed mode, that's due to DX11 having to emulate full screen effects.

arukAdo-tas commented 1 year ago

Sorry for not answering earlier, I ended setting it in game at 1.50; it does persist so I "fixed" it that way. Each client has its own GFX xml, my cloned still use the old setting at 1. When I click on edit it show 1 and the slider to the left for the older ones, it show 0 and the slider to left for the ones set at 1.5 ingame

Healix commented 1 year ago

Close all accounts. Only 1 account can be active for this test.

Pick one of your accounts that you know isn't saving. Edit > Launch options. Add -test to the arguments. Under Local.dat > Graphics, copy the path of the xml file. Open notepad and paste that path (to be used later). OK out of the settings.

Right click the account > Selected > Launch (normal). Once you're in the game, open the graphics settings. Slide the gamma bar to the max (or minimum), then double click the text box and enter 1, then press enter to apply it. Close the settings, then click the X in the top right to close the game.

Wait for Gw2Launcher to say the account isn't active.

Back in notepad, copy the path, then File > Open and paste the path to open it. Near the top is a line that starts with <EXECCMD that has the arguments that were used to launch GW2. Confirm that -test is in the arguments. If it's not, GW2 likely isn't using this GFXSettings.xml file, which should only happen if you're not using Windows. Assuming it's there, Edit > Find... and search for gamma. This is what it'll look like if the gamma was set to 1.0 (Value="1") (it may also be something like 1.001):

<OPTION Name="gamma" Registered="True" Type="Float" Value="1">
    <RANGE MinValue="0.5" MaxValue="3.5" NumSteps="0"/>
</OPTION>

If -test is in there, you've confirmed GW2 is saving it. If the value is 1, but GW2 doesn't load it as 1, you've confirmed a bug with GW2. If the value isn't 1, you can try changing it to 1 to see if GW2 loads it.

If -test isn't in there, GW2 was likely using the default file, which would be: %appdata%\Guild Wars 2\GFXSettings.Gw2-64.exe.xml

You can remove -test from the arguments.

Lastly, does this problem occur outside of Gw2Launcher? If you can confirm the problem occurs outside of Gw2Launcher with a new Local.dat file, it's definitely a bug.

arukAdo-tas commented 1 year ago

it is 1.001 and -test was there, upon reloading its set to 1.00 in game but while editing settings in local.dat/graphics its still say 0 and the slider is on the left I only use gw2launcher so im not sure how to "test" outside of it there might be something trivial im missing but I dont understand what

Healix commented 1 year ago

it is 1.001 and -test was there, upon reloading its set to 1.00 in game

So GW2 is properly saving and loading it and your problem is only with Gw2Launcher changing the gamma? Was it a #.xml file or was it the default GFXSettings.Gw2-64.exe.xml file?

When you say it's showing 0, do you mean "0" or "0.5"? 0 is only possible if it's failing to parse the number. If you slide the bar all the way to the left, is it 0.5, and if you slide it all the way to the right, is it 3.5?

Looking at the code, I did find an obvious error - decimal points. GW2 is using "." as a decimal point, so if your system is using "," Gw2Launcher is going to read/save the gamma as "1,0" instead of "1.0". Use Gw2Launcher to change the gamma and open the file in notepad to check. Is that the problem?

arukAdo-tas commented 1 year ago

Im on windows, so I edit setting and slide the bar to left or right but the number is still 0, I put it in the middle, then click OK, then re-edit and it still 0, I open the xml and its 0, then I launch and ingame its 0.5 (I assume he write back the minimun...?) At that point I re-edit setting and type 1.5, I click ok, now in the xml there is 0

I think the problem is with gw2launcher yeah ? the file in question is named data\50.xml, next client is 51.xml ect... dat is 41.dat but I think those are the launcher internal IDs for the clones it seems others field works tho as I have lower setting for those ones

Healix commented 1 year ago

Try the beta version. I've added a fix for other types of decimals and added logging for when it fails to parse a decimal.

Right click any account > Tools > Log. Leave the log in the background.

Right click the account > Edit > Local.dat > Graphics. The log will show something once the xml file is loaded. Relevant log entries will start with [XML]. If it successfully parses, it'll show:

[XML] "OPTION" "gamma" has value "1" with range between "0.5" and "3.5"

Now test if it's saving.

arukAdo-tas commented 1 year ago

now I click edit and type 1.5 then click ok, reopen setting

now I click edit and move the slide to 1.5 then click ok, reopen

so this worked, somehow previously moving the slide did nothing, typing did nothing, now only typing seem wrong just for the sake of mentioning it, I never ever did type "0", it also seem to be an incorrect value so its overwritten with 0.5 by the game maybe he did wrote 0 when he couldnt figure the value? despite im not using coma just the dot or flat 1

edit: hes actually putting a coma, not a dot if I type 1,5 , he write 1,5, if I type 1.5 he put 1 so the xml need a coma BUT ingame it show up as a dot, mistery solved I guess, I was typing dots not coma