lethal-guitar / RigelEngine

A modern re-implementation of the classic DOS game Duke Nukem II
GNU General Public License v2.0
922 stars 60 forks source link

Can't save options or game #892

Closed mitsvan closed 2 years ago

mitsvan commented 2 years ago

I can't save either options nor games, I use the latest release 0.8.5, every time I start the engine it asks me to find the installation, in AppData\Roaming\lethal-guitar\Rigel Engine there is only one file ImGui.ini, am I doing something wrong?

lethal-guitar commented 2 years ago

Hi @mitsvan, thanks for reporting, and sorry that it's not working for you - I don't think you're doing anything wrong! Not sure yet why that would be happening, but we'll figure it out. What's the full path to your AppData directory? Maybe there's a bug where paths with certain special characters cause issues, so that could help me narrow it down if you tell me the full path.

mitsvan commented 2 years ago

It's C:\Users\Μιτσοτάκης\AppData\Roaming\lethal-guitar\Rigel Engine could be the Greek characters that are creating the problem? Although when I close the engine it creates and updates this ini file "ImGui.ini" that I could provide if necessary.

Also thank you for the quick reply.

lethal-guitar commented 2 years ago

Cool, thanks!

could be the Greek characters that are creating the problem?

Yeah that's definitely a possibility - I had a similar issue with usernames in the past with a different project, so that's why I asked for the full path.

Although when I close the engine it creates and updates this ini file "ImGui.ini" that I could provide if necessary.

Ah, no need to send it - that file is created by the UI library I'm using, so my guess is that the library already handles Unicode file paths correctly and thus it's able to create the file, whereas my own code maybe isn't.

I'll look into this, and let you know as soon as I have a fix!

mitsvan commented 2 years ago

Oh, alright, thank you for looking to this and again for the quick replies.

lethal-guitar commented 2 years ago

@mitsvan I was able to identify the issue and fix it (when using a Windows user with the same username as yours). Here's a build with the fix included:

rigelengine_win_x64.zip

Alternatively, if you'd prefer, you can also build the branch fix-non-ascii-usernames-win from source.

Let me know if this fixes it for you as well! And many thanks for reporting this, this would affect any non-ASCII Windows usernames AFAICT so it's likely that someone else might also have been affected.

mitsvan commented 2 years ago

Yes, now it works as intended.

One thing though that I fixed and somebody might not thing about is about mod folders, when you create a new folder in Greek Windows and I guess other non-ASCII Windows it names it with the language of the Windows in my case Greek Νέος φάκελος, the engine will see that there is a folder named ???? ??????? you can enable it but it will not run the mod, if you rename it in English it will run the mod as intended, either there should be a warning in the readme, FAQ or a fix if possible.

Thank you very much for your time. Edit: Should I close the issue?

lethal-guitar commented 2 years ago

Yes, now it works as intended.

Great, happy to hear that!

One thing though that I fixed and somebody might not thing about is about mod folders, when you create a new folder in Greek Windows and I guess other non-ASCII Windows it names it with the language of the Windows in my case Greek Νέος φάκελος, the engine will see that there is a folder named ???? ??????? you can enable it but it will not run the mod, if you rename it in English it will run the mod as intended, either there should be a warning in the readme, FAQ or a fix if possible.

Oh I see, thanks for letting me know - it's probably a similar kind of oversight, and hopefully just as easy to fix. I will look into it as well!

Thank you very much for your time. Edit: Should I close the issue?

It's my pleasure 🙂 You can leave the issue open, I will close it once I've merged the fix.

mitsvan commented 2 years ago

Oh alright, thank you again for the fix and your time.