Adds IsDrive to FileUtil for win32,

Adds booting from drive to gui. disabled as it is currently too slow unless it is a virtual drive

Changes DriveUtil to start checking at D: as it is unlikely that a, b, or c will be a cd/dvd drive

Addes DriveBlob functions, untested on linux/osx probably needs more work

Removes duplicate message from EXI_DeviceMemoryCard.cpp when creating a brand new memcard



git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2345 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
LPFaint99
2009-02-21 23:44:40 +00:00
parent b4b94fe594
commit 9cfa4e9385
14 changed files with 270 additions and 101 deletions

View File

@ -29,7 +29,7 @@ void GetAllRemovableDrives(std::vector<std::string> *drives) {
HANDLE hDisk;
DISK_GEOMETRY diskGeometry;
for (int i = 'A'; i < 'Z'; i++)
for (int i = 'D'; i < 'Z'; i++)
{
char path[MAX_PATH];
sprintf(path, "\\\\.\\%c:", i);
@ -55,4 +55,3 @@ void GetAllRemovableDrives(std::vector<std::string> *drives) {
// stat("/media/cdrom") or whatever etc etc
#endif
}

View File

@ -69,6 +69,18 @@ bool Exists(const char *filename)
return (result == 0);
}
bool IsDisk(const char *filename)
{
#ifdef _WIN32
std::string copy = filename;
if (copy.size() < 4 && copy.c_str()[1] == ':')
return true;
#else
// TODO: add linux \ osx
#endif
return false;
}
bool IsDirectory(const char *filename)
{
struct stat file_info;

View File

@ -40,6 +40,7 @@ bool Exists(const char *filename);
void Launch(const char *filename);
void Explore(const char *path);
bool IsDirectory(const char *filename);
bool IsDisk(const char *filename);
bool CreateDir(const char *filename);
bool CreateDirectoryStructure(const std::string& _rFullPath);
bool Delete(const char *filename);

View File

@ -162,7 +162,7 @@ std::string* IniFile::GetLine(Section* section, const char* key, std::string* va
std::string lineKey;
ParseLine(line, &lineKey, valueOut, commentOut);
if (!stricmp(lineKey.c_str(), key))
if (!strcasecmp(lineKey.c_str(), key))
{
return &line;
}