summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorAestek <thib.gilles@gmail.com>2016-07-16 21:40:19 +0200
committerAestek <thib.gilles@gmail.com>2016-07-16 22:48:46 +0200
commit9c5b546e2e61be91ae35c4becf04ea24151e2c77 (patch)
tree635b2f8831a649b6d2180d274e9bb73eabc04b70 /Source
parent51c77e8eeae8244818a1cbb716c3410940826973 (diff)
Add Wii sdcard to CommonPaths
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Common/CommonPaths.h2
-rw-r--r--Source/Core/Common/FileUtil.cpp1
-rw-r--r--Source/Core/Common/FileUtil.h1
-rw-r--r--Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp2
-rw-r--r--Source/Core/Core/NetPlayClient.cpp5
-rw-r--r--Source/Core/DolphinWX/NetPlay/NetWindow.cpp3
6 files changed, 10 insertions, 4 deletions
diff --git a/Source/Core/Common/CommonPaths.h b/Source/Core/Common/CommonPaths.h
index 916e711764..5c1cac999b 100644
--- a/Source/Core/Common/CommonPaths.h
+++ b/Source/Core/Common/CommonPaths.h
@@ -118,6 +118,8 @@
#define WII_STATE "state.dat"
+#define WII_SDCARD "sd.raw"
+
#define WII_SETTING "setting.txt"
#define GECKO_CODE_HANDLER "codehandler.bin"
diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp
index 564ab58d8f..aae85d6458 100644
--- a/Source/Core/Common/FileUtil.cpp
+++ b/Source/Core/Common/FileUtil.cpp
@@ -798,6 +798,7 @@ static void RebuildUserDirectories(unsigned int dir_index)
s_user_paths[F_ARAMDUMP_IDX] = s_user_paths[D_DUMP_IDX] + ARAM_DUMP;
s_user_paths[F_FAKEVMEMDUMP_IDX] = s_user_paths[D_DUMP_IDX] + FAKEVMEM_DUMP;
s_user_paths[F_GCSRAM_IDX] = s_user_paths[D_GCUSER_IDX] + GC_SRAM;
+ s_user_paths[F_WIISDCARD_IDX] = s_user_paths[D_WIIROOT_IDX] + DIR_SEP WII_SDCARD;
s_user_paths[D_MEMORYWATCHER_IDX] = s_user_paths[D_USER_IDX] + MEMORYWATCHER_DIR DIR_SEP;
s_user_paths[F_MEMORYWATCHERLOCATIONS_IDX] =
diff --git a/Source/Core/Common/FileUtil.h b/Source/Core/Common/FileUtil.h
index b1168561c4..7beb4fca2e 100644
--- a/Source/Core/Common/FileUtil.h
+++ b/Source/Core/Common/FileUtil.h
@@ -55,6 +55,7 @@ enum
F_GCSRAM_IDX,
F_MEMORYWATCHERLOCATIONS_IDX,
F_MEMORYWATCHERSOCKET_IDX,
+ F_WIISDCARD_IDX,
NUM_PATH_INDICES
};
diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp
index 1f22d6c722..e1d88b0db5 100644
--- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp
+++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp
@@ -62,7 +62,7 @@ void CWII_IPC_HLE_Device_sdio_slot0::EventNotify()
void CWII_IPC_HLE_Device_sdio_slot0::OpenInternal()
{
- const std::string filename = File::GetUserPath(D_WIIROOT_IDX) + "/sd.raw";
+ const std::string filename = File::GetUserPath(F_WIISDCARD_IDX);
m_Card.Open(filename, "r+b");
if (!m_Card)
{
diff --git a/Source/Core/Core/NetPlayClient.cpp b/Source/Core/Core/NetPlayClient.cpp
index 4f8f088988..db42554a24 100644
--- a/Source/Core/Core/NetPlayClient.cpp
+++ b/Source/Core/Core/NetPlayClient.cpp
@@ -9,6 +9,7 @@
#include <memory>
#include <thread>
#include "Common/Common.h"
+#include "Common/CommonPaths.h"
#include "Common/CommonTypes.h"
#include "Common/ENetUtil.h"
#include "Common/MD5.h"
@@ -1261,8 +1262,8 @@ void NetPlayClient::ComputeMD5(const std::string& file_identifier)
m_should_compute_MD5 = true;
std::string file;
- if (file_identifier == "sd.raw")
- file = File::GetUserPath(D_WIIROOT_IDX) + "/sd.raw";
+ if (file_identifier == WII_SDCARD)
+ file = File::GetUserPath(F_WIISDCARD_IDX);
else
file = m_dialog->FindGame(file_identifier);
diff --git a/Source/Core/DolphinWX/NetPlay/NetWindow.cpp b/Source/Core/DolphinWX/NetPlay/NetWindow.cpp
index 62597831ef..ee81bb4e91 100644
--- a/Source/Core/DolphinWX/NetPlay/NetWindow.cpp
+++ b/Source/Core/DolphinWX/NetPlay/NetWindow.cpp
@@ -24,6 +24,7 @@
#include <wx/string.h>
#include <wx/textctrl.h>
+#include "Common/CommonPaths.h"
#include "Common/CommonTypes.h"
#include "Common/FifoQueue.h"
#include "Common/FileUtil.h"
@@ -563,7 +564,7 @@ void NetPlayDialog::OnMD5ComputeRequested(wxCommandEvent&)
break;
case MD5Target::SdCard:
- file_identifier = "sd.raw";
+ file_identifier = WII_SDCARD;
break;
default: