diff options
| author | nakeee <nakeee@gmail.com> | 2009-02-24 19:31:32 +0000 |
|---|---|---|
| committer | nakeee <nakeee@gmail.com> | 2009-02-24 19:31:32 +0000 |
| commit | ab93b003857d9975705e10ae8755fa32682db07d (patch) | |
| tree | 6f4f0fdff83cba3eea5a07c196ac151933c9e33c /Source/Core/Common | |
| parent | e59869e63cb0164af0d22d66561fedfae07c6a4c (diff) | |
Ported wxutils from soap branch (Should make launch and explore work in Linux and osx as well) please test on windows.
Fixed a compile bug and a small bug in the cdutils(thanks lp).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2420 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/Src/CDUtils.cpp | 3 | ||||
| -rw-r--r-- | Source/Core/Common/Src/FileUtil.cpp | 31 | ||||
| -rw-r--r-- | Source/Core/Common/Src/FileUtil.h | 2 |
3 files changed, 2 insertions, 34 deletions
diff --git a/Source/Core/Common/Src/CDUtils.cpp b/Source/Core/Common/Src/CDUtils.cpp index 6b5927287e..533a102942 100644 --- a/Source/Core/Common/Src/CDUtils.cpp +++ b/Source/Core/Common/Src/CDUtils.cpp @@ -2,7 +2,6 @@ With minor adjustments */ #include "CDUtils.h" -#include "common.h" /*! Follow symlinks until we have the real device file @@ -413,7 +412,7 @@ bool cdio_is_cdrom(const char *device) { char **devices = cdio_get_devices(); bool res = false; for (int i = 0; devices[i] != NULL; i++) { - if (strncmp(devices[i], device, PATH_MAX)) { + if (strncmp(devices[i], device, PATH_MAX) == 0) { res = true; break; } diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp index 0d79954fa2..e849c56a15 100644 --- a/Source/Core/Common/Src/FileUtil.cpp +++ b/Source/Core/Common/Src/FileUtil.cpp @@ -113,36 +113,6 @@ std::string SanitizePath(const char *filename) return copy; } -void Launch(const char *filename) -{ -#ifdef _WIN32 - std::string win_filename = SanitizePath(filename); - SHELLEXECUTEINFO shex = { sizeof(shex) }; - shex.fMask = SEE_MASK_NO_CONSOLE; // | SEE_MASK_ASYNC_OK; - shex.lpVerb = "open"; - shex.lpFile = win_filename.c_str(); - shex.nShow = SW_SHOWNORMAL; - ShellExecuteEx(&shex); -#else - // TODO: Insert GNOME/KDE code here. -#endif -} - -void Explore(const char *path) -{ -#ifdef _WIN32 - std::string win_path = SanitizePath(path); - SHELLEXECUTEINFO shex = { sizeof(shex) }; - shex.fMask = SEE_MASK_NO_CONSOLE; // | SEE_MASK_ASYNC_OK; - shex.lpVerb = "explore"; - shex.lpFile = win_path.c_str(); - shex.nShow = SW_SHOWNORMAL; - ShellExecuteEx(&shex); -#else - // TODO: Insert GNOME/KDE code here. -#endif -} - // Returns true if successful, or path already exists. bool CreateDir(const char *path) { @@ -545,3 +515,4 @@ bool SetCurrentDirectory(const std::string& _rDirectory) } // namespace + diff --git a/Source/Core/Common/Src/FileUtil.h b/Source/Core/Common/Src/FileUtil.h index fd3816eaf4..5befbb7b46 100644 --- a/Source/Core/Common/Src/FileUtil.h +++ b/Source/Core/Common/Src/FileUtil.h @@ -37,8 +37,6 @@ struct FSTEntry std::string SanitizePath(const char *filename); 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); |
