mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 17:23:40 +01:00
Windows: Normalize paths for OpenDirectory().
This was making GE frame dumps not automatically browse when run from MSVC debugging by default, because of the relative path.
This commit is contained in:
1 parent
7b4cc3334b
commit
e727570fae
1 file changed
+5
-1
+5
-1
@@ -34,6 +34,7 @@
|
||||
#include "Common/System/Display.h"
|
||||
#include "Common/System/NativeApp.h"
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/File/FileUtil.h"
|
||||
#include "Common/File/VFS/VFS.h"
|
||||
#include "Common/File/VFS/AssetReader.h"
|
||||
#include "Common/Data/Text/I18n.h"
|
||||
@@ -109,9 +110,12 @@ static std::thread inputBoxThread;
|
||||
static bool inputBoxRunning = false;
|
||||
|
||||
void OpenDirectory(const char *path) {
|
||||
// SHParseDisplayName can't handle relative paths, so normalize first.
|
||||
std::string resolved = ReplaceAll(File::ResolvePath(path), "/", "\\");
|
||||
|
||||
SFGAOF flags;
|
||||
PIDLIST_ABSOLUTE pidl = nullptr;
|
||||
HRESULT hr = SHParseDisplayName(ConvertUTF8ToWString(ReplaceAll(path, "/", "\\")).c_str(), nullptr, &pidl, 0, &flags);
|
||||
HRESULT hr = SHParseDisplayName(ConvertUTF8ToWString(resolved).c_str(), nullptr, &pidl, 0, &flags);
|
||||
|
||||
if (pidl) {
|
||||
if (SUCCEEDED(hr))
|
||||
|
||||
Reference in new issue
Block a user