benjamimgois / goverlay

GOverlay is an opensource project that aims to create a Graphical UI to help manage Linux overlays.
GNU General Public License v3.0
597 stars 42 forks source link

[MANGOHUD] [error] [overlay_params.cpp:145] Unrecognized key: '=Shift_L' #87

Closed kamikaze211 closed 7 months ago

kamikaze211 commented 8 months ago

Describe the bug:

When using goverlay, click the "save" button, it will take more than 2 minutes to complete, and the terminal will give an error report like this: [MANGOHUD] [error] [overlay_params.cpp:145] Unrecognized key: '=Shift_L'

List relevant hardware/software information

Linux Distribution: Archlinux
MangoHud version : 0.7.1.rc2-1
GPU : AMD RX6600XT

To Reproduce Steps to reproduce the behavior:

Open "goverlay" in terminal
Click "save" button
Goverlay will not respond
See error in terminal : [MANGOHUD] [error] [overlay_params.cpp:145] Unrecognized key: '=Shift_L'
After about 2 minutes, the configuration file will be saved

The error message is shown as MANGOHUD, so I thought it will be an mangohud issue. But flightlessmango said: "This doesn't seem related to mangohud". So I now report this issue here. Also I found a similar issue here: https://github.com/benjamimgois/goverlay/issues/56 But I couldn't find any way to resolve.

penumbraego commented 8 months ago

Hi,

Not a programmer by any stretch of the imagination but I have noticed that this error is caused by a misconfiguration in the MangoHud.conf file that is output by goverlay.

In this file the logging key is set as thus: toggle_logging==Shift_L+F2 Hence the error message as MangoHud is trying to convert the key "=Shift_L" rather than "Shift_L". I believe that this error is caused by lines 2204-2209 of overlayunit.pas:

      case logtoggleComboBox.ItemIndex of
        0:LOGTOGGLE := 'toggle_logging==Shift_L+F2' ;
        1:LOGTOGGLE := 'toggle_logging==Shift_L+F3' ;
        2:LOGTOGGLE := 'toggle_logging==Shift_L+F4' ;
        3:LOGTOGGLE := 'toggle_logging==Shift_L+F5' ;
      end;

I'm sorry I don't know how to raise this as a patch request, as I said not a programmer just applying some logic. Sorry if I am off base.

Thanks!

benjamimgois commented 8 months ago

Hey guys , it seems that @penumbraego got it right. Might be a error of mine while coping and pasting the lines for that case. Sorry for that, will try to make a fix ASAP

kamikaze211 commented 8 months ago

Thanks to @penumbraego I'm glad that you pinpointed the problem. Also thanks to @benjamimgois

penumbraego commented 8 months ago

Glad I could make a tiny contribution. Thanks for hearing me out. Have a great day!

kamikaze211 commented 8 months ago

New report: I tried to

git clone https://github.com/benjamimgois/goverlay
cd goverlay (and edit the file:overlayunit.pas, then change == to = in line 2204-2209)
make
sudo make install

Now, I won't get the error that I reported:

 [MANGOHUD] [error] [overlay_params.cpp:145] Unrecognized key: '=Shift_L'

But when I changed something, and clicked the save button, it will still take me about 2 minutes to complete.