MegaGlest Forum
MegaGlest => Bug reports => Topic started by: titi on 30 December 2012, 23:04:34
-
I wasn't sure if this is more a bug or a feature request, but here we go:
The last days I often changed the monitor because I was on a LAN Party I have new hardware and so on ... All those monitors had different screen resolutions and I ended up on a small monitor with a huge resolution which I was not able to change from MG because the "ok" button was unreachable.
Another problem we had with last release was a broken language file and so on.
All those problems are very easy to fix for me by editing the ini files manually, but for computer noobs this might be hard to do. Even just removing the glestuser.ini is hard for them and makes MG unplayable for them. Maybe its a good idea to add a "program" that just removes all settings or just sets the default which is installed with MG and reachable via start menues.
-
What if the restore defaults option deleted glestuser.ini and automatically and created a new one instead of rewriteing the current one?
-
What if the restore defaults option deleted glestuser.ini and automatically and created a new one instead of rewriteing the current one?
As long as it stores still valid settings and applies them to the new one. Would suck to have to apply changes to the settings every time you update the program, though.
-
@Ishmaru: What should rewriting the glestuser.ini be good for ? I would just remove the whole file.
@Omega: This has nothing to do with updating the program. Usually we pay attention that new versions are compatible in the settings. It's just meant as a last help which results in a clear default state.
-
FYI in svn, changing screen resolution or toggling fullscreen will happen right away in game when clicking OK. Then it asks to confirm with ok cancel to save the change.
-
Maybe when the game starts up it could check whether the configured screen resolution is actually onewhich SDL reports as supported, and falls back to one SDL reports as supported if not so? However, this change of behaviour would also require introducing a new INI option which forces overriding SDL resolutions (diables this check at startup) for people who really know what they're doing.
This only solves half of the problem discussed here, though. There is the other problem where any kind of no longer supported and now problematic INI options may cause the game to fail to start / provide grpahical output (and thus be unable to provide visual feedback in error situations for the largest group of Windows users who don't know what cmd.exe is). And I don't have any real idea on how to solve this, other than to always run the game from a cmd.exe window and to pause (press a key) in case of a non-zero exit code of the megaglest.exe process, keeping the cmd.exe window open so the user can actually read the error message.
-
Yes for this special problem this is a solution but for all the other currently unknown problems one can rise with an defective ini file it will not help.
The idea is to have a way to reset all user settings to make the game work again in case it doesn't start up anymore caused by the ini file.
-
How exactly should it work. I have no desire to create another program to maintain. A command line option is easy but maybe too hard for windows users.
-
Its not exactly a "program", its for example a script that removes the glestuser.ini file. If possible with a warning.
-
You could just ship a shortcut that runs with the command line parameter?.
(for windows at least).
-
I think that to reset the game we should ship, with installers (only, since only there we know the exact setup), a POSIX and a Windows batch script which is accessible from the window managers' menu. Once run, these would prompt the user, then delete either all of $UserDataRoot, or, alternatively, both glestuser.ini and glestuserkeys.ini (which one is the better option?).
I don't think adding an option to the "megaglest(.exe)" binary to remove its very configuration files would be the right approach.
NB: I think this thread should go to "feature requests" since we're now discussing new code/an added feature (to overcome a possible issue).
-
I think that to reset the game we should ship, with installers (only, since only there we know the exact setup), a POSIX and a Windows batch script which is accessible from the window managers' menu. Once run, these would prompt the user, then delete either all of $UserDataRoot, or, alternatively, both glestuser.ini and glestuserkeys.ini (which one is the better option?).
Am I correct in assuming that "$userDataRoot" is the MegaGlest user folder containing the INI files along with downloaded mods? If so, I think that it'd be better to delete just the INI files, if that alone is enough to solve the problem. That way there's no need to redownload mods (or back them up before running a script).
Also, here's a batch script for deleting just the two INI files:
cd %APPDATA%/megaglest/
DEL /P *.ini
Should work for all versions of Windows NT. Note, however, that the windows command line is a bit buggy about drives. The CD command to change folders disregards the drive. As a result, if you're running the command line on drive F and want to change folders to appdata (which will be in drive C always, unless you manually moved it and make a symbolic link; Windows isn't very friendly with multiple drives), the cd command will fail since you're changing to a different drive. The only way to change drives is to manually type the drive letter followed by a colon (and interestingly, a prior cd command will be applied after changing drives). As far as I can tell, there's no way to derive the drive letter from the path of %appdata%. What does all this mean? The batch script must be on the same drive as appdata to work. So ideally, it would be in appdata and linked to (and if it's in appdata, only the second line is necessary).
Also, the /P flag after the DEL command will prompt the user Y/N to delete.
Oh, and we should also note that the folder containing the user data can be moved. Not sure how to deal with that, but presumably anyone with the experience to move the folder would be able to delete two files easily.
-
For sure we will NOT remove the entire directory, only the glestuser.ini file and maybe the glestuserkeys.ini too ( but I think this can be reset in game right ? )
If we delete the directoy people can loose a lot, like all their mods and so on !