summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
authorLPFaint99 <lpfaint99@gmail.com>2010-09-06 04:36:58 +0000
committerLPFaint99 <lpfaint99@gmail.com>2010-09-06 04:36:58 +0000
commit3bdeb923ef78eccd1efeae694d774d696a6da5d3 (patch)
tree53a924f3d3f0907bf41b213595494e1726334719 /Source/Core/Common
parent402b1d83e2e5ea059a8ccd3dba558180b83178e6 (diff)
Some work towards launching by titleid rather than content path,
update some var names in WII_IPC_HLE_Device_fs, filter out some spam logs from VolumeCommon git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6182 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/Common.vcproj8
-rw-r--r--Source/Core/Common/Src/CommonPaths.h1
-rw-r--r--Source/Core/Common/Src/FileUtil.cpp4
-rw-r--r--Source/Core/Common/Src/FileUtil.h1
-rw-r--r--Source/Core/Common/Src/NandPaths.cpp40
-rw-r--r--Source/Core/Common/Src/NandPaths.h29
-rw-r--r--Source/Core/Common/Src/SConscript1
7 files changed, 78 insertions, 6 deletions
diff --git a/Source/Core/Common/Common.vcproj b/Source/Core/Common/Common.vcproj
index 5bfba22fc7..0e63a8359c 100644
--- a/Source/Core/Common/Common.vcproj
+++ b/Source/Core/Common/Common.vcproj
@@ -758,6 +758,14 @@
>
</File>
<File
+ RelativePath=".\Src\NandPaths.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Src\NandPaths.h"
+ >
+ </File>
+ <File
RelativePath=".\Src\OpenCL.cpp"
>
</File>
diff --git a/Source/Core/Common/Src/CommonPaths.h b/Source/Core/Common/Src/CommonPaths.h
index fd3d1e0d3c..a7f13c3ebd 100644
--- a/Source/Core/Common/Src/CommonPaths.h
+++ b/Source/Core/Common/Src/CommonPaths.h
@@ -110,7 +110,6 @@
#define MAIL_LOGS_DIR LOGS_DIR DIR_SEP "Mail"
#define SHADERS_DIR "Shaders"
#define WII_SYSCONF_DIR WII_USER_DIR DIR_SEP "shared2" DIR_SEP "sys"
-#define WII_MENU_DIR WII_USER_DIR DIR_SEP "title" DIR_SEP "00000001" DIR_SEP "00000002" DIR_SEP "content"
// Filenames
// Files in the directory returned by GetUserPath(D_CONFIG_IDX)
diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp
index 7722d4aab4..9e8e2ac4cc 100644
--- a/Source/Core/Common/Src/FileUtil.cpp
+++ b/Source/Core/Common/Src/FileUtil.cpp
@@ -636,7 +636,6 @@ const char *GetUserPath(int DirIDX)
static char LogsDir[MAX_PATH] = {0};
static char MailLogsDir[MAX_PATH] = {0};
static char WiiSYSCONFDir[MAX_PATH] = {0};
- static char WiiMenuDir[MAX_PATH] = {0};
static char DolphinConfig[MAX_PATH] = {0};
static char DebuggerConfig[MAX_PATH] = {0};
static char LoggerConfig[MAX_PATH] = {0};
@@ -679,7 +678,6 @@ const char *GetUserPath(int DirIDX)
snprintf(LogsDir, sizeof(LogsDir), "%s" LOGS_DIR DIR_SEP, UserDir);
snprintf(MailLogsDir, sizeof(MailLogsDir), "%s" MAIL_LOGS_DIR DIR_SEP, UserDir);
snprintf(WiiSYSCONFDir, sizeof(WiiSYSCONFDir), "%s" WII_SYSCONF_DIR DIR_SEP, UserDir);
- snprintf(WiiMenuDir, sizeof(WiiMenuDir), "%s" WII_MENU_DIR DIR_SEP, UserDir);
snprintf(DolphinConfig, sizeof(DolphinConfig), "%s" DOLPHIN_CONFIG, ConfigDir);
snprintf(DebuggerConfig, sizeof(DebuggerConfig), "%s" DEBUGGER_CONFIG, ConfigDir);
snprintf(LoggerConfig, sizeof(LoggerConfig), "%s" LOGGER_CONFIG, ConfigDir);
@@ -731,8 +729,6 @@ const char *GetUserPath(int DirIDX)
return MailLogsDir;
case D_WIISYSCONF_IDX:
return WiiSYSCONFDir;
- case D_WIIMENU_IDX:
- return WiiMenuDir;
case F_DOLPHINCONFIG_IDX:
return DolphinConfig;
case F_DEBUGGERCONFIG_IDX:
diff --git a/Source/Core/Common/Src/FileUtil.h b/Source/Core/Common/Src/FileUtil.h
index e0315f67d4..bf2a3118cb 100644
--- a/Source/Core/Common/Src/FileUtil.h
+++ b/Source/Core/Common/Src/FileUtil.h
@@ -46,7 +46,6 @@ enum {
D_LOGS_IDX,
D_MAILLOGS_IDX,
D_WIISYSCONF_IDX,
- D_WIIMENU_IDX,
F_DOLPHINCONFIG_IDX,
F_DEBUGGERCONFIG_IDX,
F_LOGGERCONFIG_IDX,
diff --git a/Source/Core/Common/Src/NandPaths.cpp b/Source/Core/Common/Src/NandPaths.cpp
new file mode 100644
index 0000000000..4c0f263ead
--- /dev/null
+++ b/Source/Core/Common/Src/NandPaths.cpp
@@ -0,0 +1,40 @@
+// Copyright (C) 2010 Dolphin Project.
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, version 2.0.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License 2.0 for more details.
+
+// A copy of the GPL 2.0 should have been included with the program.
+// If not, see http://www.gnu.org/licenses/
+
+// Official SVN repository and contact information can be found at
+// http://code.google.com/p/dolphin-emu/
+
+#include "NandPaths.h"
+#include "CommonPaths.h"
+#include "FileUtil.h"
+#include <string.h>
+namespace Common
+{
+std::string CreateTicketFileName(u64 _TitleID)
+{
+ char TicketFilename[1024];
+ sprintf(TicketFilename, "%sticket/%08x/%08x.tik", File::GetUserPath(D_WIIUSER_IDX), (u32)(_TitleID >> 32), (u32)_TitleID);
+
+ return TicketFilename;
+}
+
+std::string CreateTitleContentPath(u64 _TitleID)
+{
+ char ContentPath[1024];
+ sprintf(ContentPath, "%stitle/%08x/%08x/content", File::GetUserPath(D_WIIUSER_IDX), (u32)(_TitleID >> 32), (u32)_TitleID);
+
+ return ContentPath;
+}
+
+}; \ No newline at end of file
diff --git a/Source/Core/Common/Src/NandPaths.h b/Source/Core/Common/Src/NandPaths.h
new file mode 100644
index 0000000000..54d4934a3d
--- /dev/null
+++ b/Source/Core/Common/Src/NandPaths.h
@@ -0,0 +1,29 @@
+// Copyright (C) 2010 Dolphin Project.
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, version 2.0.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License 2.0 for more details.
+
+// A copy of the GPL 2.0 should have been included with the program.
+// If not, see http://www.gnu.org/licenses/
+
+// Official SVN repository and contact information can be found at
+// http://code.google.com/p/dolphin-emu/
+
+#ifndef __NANDPATHS_H__
+#define __NANDPATHS_H__
+#include "CommonTypes.h"
+
+#define TITLEID_SYSMENU 0x0000000100000002ull
+
+namespace Common
+{
+ std::string CreateTicketFileName(u64 _TitleID);
+ std::string CreateTitleContentPath(u64 _TitleID);
+}
+#endif
diff --git a/Source/Core/Common/Src/SConscript b/Source/Core/Common/Src/SConscript
index bbb83eb7a2..890ccd9c5f 100644
--- a/Source/Core/Common/Src/SConscript
+++ b/Source/Core/Common/Src/SConscript
@@ -26,6 +26,7 @@ files = [
"MemoryUtil.cpp",
"Misc.cpp",
"MsgHandler.cpp",
+ "NandPaths.cpp",
"OpenCL.cpp",
"Plugin.cpp",
"PluginDSP.cpp",