Persist a default browse directory for file dialogs, if none is provided

* This provides a slightly more sensible default than the application working
  directory.
* The default is shared across all dialogs and open/save.
This commit is contained in:
baldurk
2018-06-15 12:10:23 +01:00
parent efd11bb7f2
commit 4561b55464
4 changed files with 40 additions and 3 deletions
@@ -287,6 +287,8 @@ bool PersistantConfig::Load(const rdcstr &filename)
RENDERDOC_SetConfigSetting("Disassembly_FriendlyNaming", ShaderViewer_FriendlyNaming ? "1" : "0");
RDDialog::DefaultBrowsePath = LastFileBrowsePath;
// localhost should always be available as a remote host
bool foundLocalhost = false;
@@ -396,6 +398,8 @@ bool PersistantConfig::Save()
RENDERDOC_SetConfigSetting("Disassembly_FriendlyNaming", ShaderViewer_FriendlyNaming ? "1" : "0");
LastFileBrowsePath = RDDialog::DefaultBrowsePath;
return Serialize(m_Filename);
}