mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-18 11:54:30 +01:00
win32: Add menu option to open memory stick directory
This commit is contained in:
1 parent
63463f7959
commit
e7027b6c9c
7 files changed
+60
-35
No files matched your search
@@ -15,6 +15,12 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#ifdef _WIN32
|
||||
#define NOMINMAX
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
#include "MemMap.h"
|
||||
|
||||
#include "MIPS/MIPS.h"
|
||||
@@ -122,3 +128,32 @@ CoreParameter &PSP_CoreParameter()
|
||||
{
|
||||
return coreParameter;
|
||||
}
|
||||
|
||||
|
||||
void GetSysDirectories(std::string &memstickpath, std::string &flash0path) {
|
||||
#ifdef _WIN32
|
||||
char path_buffer[_MAX_PATH], drive[_MAX_DRIVE] ,dir[_MAX_DIR], file[_MAX_FNAME], ext[_MAX_EXT];
|
||||
char memstickpath_buf[_MAX_PATH];
|
||||
char flash0path_buf[_MAX_PATH];
|
||||
|
||||
GetModuleFileName(NULL,path_buffer,sizeof(path_buffer));
|
||||
|
||||
char *winpos = strstr(path_buffer, "Windows");
|
||||
if (winpos)
|
||||
*winpos = 0;
|
||||
strcat(path_buffer, "dummy.txt");
|
||||
|
||||
_splitpath_s(path_buffer, drive, dir, file, ext );
|
||||
|
||||
// Mount a couple of filesystems
|
||||
sprintf(memstickpath_buf, "%s%smemstick\\", drive, dir);
|
||||
sprintf(flash0path_buf, "%s%sflash0\\", drive, dir);
|
||||
|
||||
memstickpath = memstickpath_buf;
|
||||
flash0path = flash0path_buf;
|
||||
#else
|
||||
// TODO
|
||||
memstickpath = g_Config.memCardDirectory;
|
||||
flash0path = g_Config.flashDirectory;
|
||||
#endif
|
||||
}
|
||||
Reference in new issue
Block a user