Add support for standard file paths on Windows.
- If the current user does not have write permissions for the directory zdoom.exe is located in, use standard folder paths located in their home directory instead. This is a common scenario when people put ZDoom into Program Files. (Ironically, zdoom.ini used to be in AppData, buth then people complained when it wasn't in the same directory as zdoom.exe, so it got turned into zdoom-<user>.ini so at least it could retain some multi-user support. I'm not sure when the AppData support was removed, though, since it should have still been kept around for migrating configs to the new name.)
This commit is contained in:
parent
da02a44126
commit
0645053431
4 changed files with 202 additions and 49 deletions
|
|
@ -646,8 +646,9 @@ void M_ScreenShot (const char *filename)
|
|||
if (dirlen == 0)
|
||||
{
|
||||
autoname = M_GetScreenshotsPath();
|
||||
dirlen = autoname.Len();
|
||||
}
|
||||
else if (dirlen > 0)
|
||||
if (dirlen > 0)
|
||||
{
|
||||
if (autoname[dirlen-1] != '/' && autoname[dirlen-1] != '\\')
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue