small fixes

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1369 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee
2008-12-01 15:41:02 +00:00
parent 159d33a251
commit 751124bb68
3 changed files with 7 additions and 7 deletions

View File

@ -168,9 +168,7 @@ bool CreateDirectoryStructure(const std::string& _rFullPath)
{ {
// Find next sub path, support both \ and / directory separators // Find next sub path, support both \ and / directory separators
{ {
size_t nextPosition = _rFullPath.find('/', Position); size_t nextPosition = _rFullPath.find(DIR_SEP_CHR, Position);
if (nextPosition == std::string::npos)
nextPosition = _rFullPath.find('\\', Position);
Position = nextPosition; Position = nextPosition;
if (Position == std::string::npos) if (Position == std::string::npos)

View File

@ -5,10 +5,12 @@
#define PLUGIN_PREFIX "" #define PLUGIN_PREFIX ""
#define PLUGIN_SUFFIX ".dll" #define PLUGIN_SUFFIX ".dll"
#define DIR_SEP "\\" #define DIR_SEP "\\"
#define DIR_SEP_CHR '\\'
#else #else
#define PLUGIN_PREFIX "lib" #define PLUGIN_PREFIX "lib"
#define PLUGIN_SUFFIX ".so" #define PLUGIN_SUFFIX ".so"
#define DIR_SEP "/" #define DIR_SEP "/"
#define DIR_SEP_CHR '/'
#endif #endif
#define PLUGINS_DIR "Plugins" #define PLUGINS_DIR "Plugins"

View File

@ -234,13 +234,13 @@ bool AckCommand(u32 _Address)
// Let the game read the setting.txt file // Let the game read the setting.txt file
void CopySettingsFile(std::string DeviceName) void CopySettingsFile(std::string DeviceName)
{ {
std::string Source; std::string Source = FULL_WII_SYS_DIR;
if(Core::GetStartupParameter().bNTSC) if(Core::GetStartupParameter().bNTSC)
Source = "Sys/Wii/setting-usa.txt"; Source += "setting-usa.txt";
else else
Source = "Sys/Wii/setting-eur.txt"; Source += "setting-eur.txt";
std::string Target = "User/Wii" + DeviceName; std::string Target = FULL_WII_USER_DIR + DeviceName;
// Check if the target dir exists, otherwise create it // Check if the target dir exists, otherwise create it
std::string TargetDir = Target.substr(0, Target.find_last_of("/")); std::string TargetDir = Target.substr(0, Target.find_last_of("/"));