Migration to the new dir struct (in code only!, no deletion of old dirs...yet). VS projects copy Data/* to Binary/<arch>. Added SConscript to some projects where it was missing. This is the time to move over all your files!

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1140 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman 2008-11-12 04:54:17 +00:00
parent 8c7d7a6c36
commit f7cb34f1e0
30 changed files with 218 additions and 126 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Version="9.00"
Name="Common"
ProjectGUID="{C573CAF7-EE6A-458E-8049-16C0BF34C2E9}"
RootNamespace="Common"
@ -590,6 +590,10 @@
RelativePath=".\Src\MemoryUtil.h"
>
</File>
<File
RelativePath=".\Src\Paths.h"
>
</File>
<File
RelativePath=".\Src\Plugin.cpp"
>

View File

@ -12,11 +12,18 @@
#endif
#define PLUGINS_DIR "Plugins"
#define DATA_DIR "."
#define ROOT_DIR "."
#define USERDATA_DIR "User"
#define SYSDATA_DIR "Sys"
// Under User
// Dirs in both User and Sys
#define EUR_DIR "EUR"
#define USA_DIR "USA"
#define JAP_DIR "JAP"
// Dirs in User
#define GC_USER_DIR "GC"
#define WII_USER_DIR "Wii"
#define CONFIG_DIR "Config"
#define GAMECONFIG_DIR "GameConfig"
#define CACHE_DIR "Cache"
@ -24,25 +31,82 @@
#define SCREENSHOTS_DIR "ScreenShots"
#define LOGS_DIR "Logs"
// Under Sys
// Dirs in Sys
#define GC_SYS_DIR "GC"
#define WII_SYS_DIR "Wii"
// Files
// Filenames
#define DOLPHIN_CONFIG "Dolphin.ini"
#define DEBUGGER_CONFIG "Debugger.ini"
#define TOTALDB "totaldb.dsy"
#define DEFAULT_GFX_PLUGIN PLUGIN_PREFIX "Plugin_VideoOGL" PLUGIN_SUFFIX
#define DEFAULT_DSP_PLUGIN PLUGIN_PREFIX "Plugin_DSP_HLE" PLUGIN_SUFFIX
#define DEFAULT_PAD_PLUGIN PLUGIN_PREFIX "Plugin_PadSimple" PLUGIN_SUFFIX
#define DEFAULT_WIIMOTE_PLUGIN PLUGIN_PREFIX "Plugin_Wiimote" PLUGIN_SUFFIX
// shorts
#ifdef _WIN32
#define FULL_DATA_DIR ""
#define FULL_GAMECONFIG_DIR "GameIni/"
#define CONFIG_FILE DOLPHIN_CONFIG
#else
#define FULL_DATA_DIR DATA_DIR DIR_SEP USERDATA_DIR DIR_SEP
#define FULL_GAMECONFIG_DIR FULL_DATA_DIR GAMECONFIG_DIR
#define CONFIG_FILE FULL_DATA_DIR CONFIG_DIR DIR_SEP DOLPHIN_CONFIG
#endif
#define FONT_ANSI "font_ansi.bin"
#define FONT_SJIS "font_sjis.bin"
#define DSP_ROM "dsp_rom.bin"
#define DSP_COEF "dsp_coef.bin"
#define GC_IPL "IPL.bin"
#define GC_SRAM "SRAM.raw"
#define GC_MEMCARDA "MemoryCardA.raw"
#define GC_MEMCARDB "MemoryCardB.raw"
#define WII_MASTERKEY "masterkey.bin"
#define WII_EUR_SETTING "setting-eur.txt"
#define WII_USA_SETTING "setting-usa.txt"
#define WII_JAP_SETTING "setting-jpn.txt"
// Shorts - dirs
// User dirs
#define FULL_USERDATA_DIR ROOT_DIR DIR_SEP USERDATA_DIR DIR_SEP
#define FULL_GC_USER_DIR FULL_USERDATA_DIR GC_USER_DIR DIR_SEP
//#define GC_USER_EUR_DIR FULL_GC_USER_DIR EUR_DIR
//#define GC_USER_USA_DIR FULL_GC_USER_DIR USA_DIR
//#define GC_USER_JAP_DIR FULL_GC_USER_DIR JAP_DIR
#define FULL_WII_USER_DIR FULL_USERDATA_DIR WII_USER_DIR DIR_SEP // Currently this is used as the "root" for Wii fs, is that correct?
#define FULL_GAMECONFIG_DIR FULL_USERDATA_DIR GAMECONFIG_DIR DIR_SEP
#define FULL_CONFIG_DIR FULL_USERDATA_DIR CONFIG_DIR DIR_SEP
#define FULL_CACHE_DIR FULL_USERDATA_DIR CACHE_DIR
#define FULL_SAVESTATES_DIR FULL_USERDATA_DIR SAVESTATES_DIR
#define FULL_SCREENSHOTS_DIR FULL_USERDATA_DIR SCREENSHOTS_DIR
#define FULL_LOGS_DIR FULL_USERDATA_DIR LOGS_DIR
// Sys dirs
#define FULL_SYSDATA_DIR ROOT_DIR DIR_SEP SYSDATA_DIR DIR_SEP
#define FULL_GC_SYS_DIR FULL_SYSDATA_DIR GC_SYS_DIR DIR_SEP
//#define GC_SYS_EUR_DIR FULL_GC_SYS_DIR EUR_DIR
//#define GC_SYS_USA_DIR FULL_GC_SYS_DIR USA_DIR
//#define GC_SYS_JAP_DIR FULL_GC_SYS_DIR JAP_DIR
#define FULL_WII_SYS_DIR FULL_SYSDATA_DIR WII_SYS_DIR DIR_SEP
// Shorts - files
// User files
#define CONFIG_FILE FULL_CONFIG_DIR DOLPHIN_CONFIG
#define DEBUGGER_CONFIG_FILE FULL_CONFIG_DIR DEBUGGER_CONFIG
#define TOTALDB_FILE FULL_SYSDATA_DIR TOTALDB
#define GC_SRAM_FILE FULL_USERDATA_DIR GC_USER_DIR DIR_SEP GC_SRAM
// Sys files
#define FONT_ANSI_FILE FULL_GC_SYS_DIR FONT_ANSI
#define FONT_SJIS_FILE FULL_GC_SYS_DIR FONT_SJIS
#define DSP_ROM_FILE FULL_GC_SYS_DIR DSP_ROM
#define DSP_COEF_FILE FULL_GC_SYS_DIR DSP_COEF
#define WII_MASTERKEY_FILE FULL_WII_SYS_DIR WII_MASTERKEY
#define WII_EUR_SETTING_FILE FULL_WII_SYS_DIR WII_EUR_SETTING
#define WII_USA_SETTING_FILE FULL_WII_SYS_DIR WII_USA_SETTING
#define WII_JAP_SETTING_FILE FULL_WII_SYS_DIR WII_JAP_SETTING
#endif // PATHS_H

View File

@ -185,7 +185,7 @@ bool CBoot::EmulatedBIOS_Wii(bool _bDebug)
{
LOG(BOOT, "Faking Wii BIOS...");
FILE* pDump = fopen("WII/dump_0x0000_0x4000.bin", "rb");
FILE* pDump = fopen(FULL_WII_SYS_DIR "dump_0x0000_0x4000.bin", "rb");
if (pDump != NULL)
{
LOG(MASTER_LOG, "Init from memory dump.");
@ -198,26 +198,26 @@ bool CBoot::EmulatedBIOS_Wii(bool _bDebug)
{
// load settings.txt
{
std::string filename("WII/setting-eur.txt");
std::string filename(WII_EUR_SETTING_FILE);
if (VolumeHandler::IsValid())
{
switch(VolumeHandler::GetVolume()->GetCountry())
{
case DiscIO::IVolume::COUNTRY_JAP:
filename = "WII/setting-jpn.txt";
filename = WII_JAP_SETTING_FILE;
break;
case DiscIO::IVolume::COUNTRY_USA:
filename = "WII/setting-usa.txt";
filename = WII_USA_SETTING_FILE;
break;
case DiscIO::IVolume::COUNTRY_EUROPE:
filename = "WII/setting-eur.txt";
filename = WII_EUR_SETTING_FILE;
break;
default:
PanicAlert("Unknown country. Wii boot process will be switched to European settings.");
filename = "WII/setting-eur.txt";
filename = WII_EUR_SETTING_FILE;
break;
}
}

View File

@ -50,11 +50,7 @@ void SCoreStartupParameter::LoadDefaults()
bool SCoreStartupParameter::AutoSetup(EBootBios _BootBios)
{
static const char *s_DataBasePath_EUR = "Data_EUR";
static const char *s_DataBasePath_USA = "Data_USA";
static const char *s_DataBasePath_JAP = "Data_JAP";
std::string BaseDataPath(s_DataBasePath_EUR);
std::string Region(EUR_DIR);
switch (_BootBios)
{
@ -81,18 +77,18 @@ bool SCoreStartupParameter::AutoSetup(EBootBios _BootBios)
{
case DiscIO::IVolume::COUNTRY_USA:
bNTSC = true;
BaseDataPath = s_DataBasePath_USA;
Region = USA_DIR;
break;
case DiscIO::IVolume::COUNTRY_JAP:
bNTSC = true;
BaseDataPath = s_DataBasePath_JAP;
Region = JAP_DIR;
break;
case DiscIO::IVolume::COUNTRY_EUROPE:
case DiscIO::IVolume::COUNTRY_FRANCE:
bNTSC = false;
BaseDataPath = s_DataBasePath_EUR;
Region = EUR_DIR;
break;
default:
@ -105,13 +101,13 @@ bool SCoreStartupParameter::AutoSetup(EBootBios _BootBios)
else if (!strcasecmp(Extension.c_str(), ".elf"))
{
bWii = CBoot::IsElfWii(m_strFilename.c_str());
BaseDataPath = s_DataBasePath_USA;
Region = USA_DIR;
m_BootType = BOOT_ELF;
bNTSC = true;
}
else if (!strcasecmp(Extension.c_str(), ".dol"))
{
BaseDataPath = s_DataBasePath_USA;
Region = USA_DIR;
m_BootType = BOOT_DOL;
bNTSC = true;
}
@ -124,29 +120,29 @@ bool SCoreStartupParameter::AutoSetup(EBootBios _BootBios)
break;
case BOOT_BIOS_USA:
BaseDataPath = s_DataBasePath_USA;
Region = USA_DIR;
m_strFilename.clear();
bNTSC = true;
break;
case BOOT_BIOS_JAP:
BaseDataPath = s_DataBasePath_JAP;
Region = JAP_DIR;
m_strFilename.clear();
bNTSC = true;
break;
case BOOT_BIOS_EUR:
BaseDataPath = s_DataBasePath_EUR;
Region = EUR_DIR;
m_strFilename.clear();
bNTSC = false;
break;
}
// setup paths
m_strBios = BaseDataPath + "/IPL.bin";
m_strMemoryCardA = BaseDataPath + "/MemoryCardA.raw";
m_strMemoryCardB = BaseDataPath + "/MemoryCardB.raw";
m_strSRAM = BaseDataPath + "/SRAM.raw";
m_strBios = FULL_GC_SYS_DIR + Region + DIR_SEP GC_IPL;
m_strMemoryCardA = FULL_GC_USER_DIR + Region + DIR_SEP GC_MEMCARDA;
m_strMemoryCardB = FULL_GC_USER_DIR + Region + DIR_SEP GC_MEMCARDB;
m_strSRAM = GC_SRAM_FILE;
if (!File::Exists(m_strBios.c_str())) {
LOG(BOOT, "BIOS file %s not found - using HLE.", m_strBios.c_str());
bHLEBios = true;

View File

@ -59,10 +59,10 @@ CEXIIPL::CEXIIPL() :
m_uRWOffset(0),
m_count(0)
{
// load the IPL
// Load the IPL
m_pIPL = (u8*)AllocateMemoryPages(ROM_SIZE);
FILE* pStream = NULL;
pStream = fopen("./Data/font_ansi.bin", "rb");
pStream = fopen(FONT_ANSI_FILE, "rb");
if (pStream != NULL)
{
fseek(pStream, 0, SEEK_END);
@ -77,7 +77,7 @@ CEXIIPL::CEXIIPL() :
PanicAlert("Error: failed to load font_ansi.bin. Fonts may bug");
}
pStream = fopen("./Data/font_sjis.bin", "rb");
pStream = fopen(FONT_SJIS_FILE, "rb");
if (pStream != NULL)
{
fseek(pStream, 0, SEEK_END);
@ -94,10 +94,10 @@ CEXIIPL::CEXIIPL() :
memcpy(m_pIPL, iplver, sizeof(iplver));
// clear RTC
// Clear RTC
memset(m_RTC, 0, sizeof(m_RTC));
// SRam
// SRAM
pStream = fopen(Core::GetStartupParameter().m_strSRAM.c_str(), "rb");
if (pStream != NULL)
{
@ -129,7 +129,7 @@ CEXIIPL::~CEXIIPL()
m_pIPL = NULL;
}
// SRam
// SRAM
FILE* pStream = NULL;
pStream = fopen(Core::GetStartupParameter().m_strSRAM.c_str(), "wb");
if (pStream != NULL)
@ -154,8 +154,8 @@ bool CEXIIPL::IsPresent()
void CEXIIPL::TransferByte(u8& _uByte)
{
// the first 4 bytes must be the address
// if we havnt read it, do it now
// The first 4 bytes must be the address
// If we haven't read it, do it now
if (m_uPosition < 4)
{
m_uAddress <<= 8;
@ -163,10 +163,10 @@ void CEXIIPL::TransferByte(u8& _uByte)
m_uRWOffset = 0;
_uByte = 0xFF;
// check if the command is complete
// Check if the command is complete
if (m_uPosition == 3)
{
// get the time ...
// Get the time ...
u32 GCTime = CEXIIPL::GetGCTime();
u8* pGCTime = (u8*)&GCTime;
for (int i=0; i<4; i++)
@ -231,7 +231,7 @@ void CEXIIPL::TransferByte(u8& _uByte)
_uByte = m_RTC[(m_uAddress & 0x03) + m_uRWOffset];
}
//
// --- SRam ---
// --- SRAM ---
//
else if ((m_uAddress & 0x7FFFFF00) == 0x20000100)
{
@ -266,7 +266,7 @@ void CEXIIPL::TransferByte(u8& _uByte)
u32 CEXIIPL::GetGCTime()
{
// get sram bias
// Get SRAM bias
u32 Bias;
for (int i=0; i<4; i++)
@ -274,8 +274,8 @@ u32 CEXIIPL::GetGCTime()
((u8*)&Bias)[i] = sram_dump[0xc + (i^3)];
}
// get the time ...
const u32 cJanuary2000 = 0x386d35a1; // seconds between 1.1.1970 and 1.1.2000
// Get the time ...
const u32 cJanuary2000 = 0x386d35a1; // Seconds between 1.1.1970 and 1.1.2000
u64 ltime = Common::Timer::GetTimeSinceJan1970();
return ((u32)ltime - cJanuary2000 - Bias);
}

View File

@ -26,7 +26,7 @@ std::string HLE_IPC_BuildFilename(const char* _pFilename, int _size)
char Buffer[128];
memcpy(Buffer, _pFilename, _size);
std::string Filename("WII");
std::string Filename(WII_SYS_DIR);
if (Buffer[1] == '0')
Filename += std::string("/title"); // this looks and feel like an hack...

View File

@ -46,7 +46,7 @@ bool CWII_IPC_HLE_Device_fs::Open(u32 _CommandAddress, u32 _Mode)
{
// clear tmp folder
{
std::string WiiTempFolder("Wii/tmp");
std::string WiiTempFolder(FULL_WII_USER_DIR "tmp");
bool Result = File::DeleteDirRecursively(WiiTempFolder.c_str());
if (Result == false)
{
@ -64,7 +64,7 @@ bool CWII_IPC_HLE_Device_fs::Open(u32 _CommandAddress, u32 _Mode)
char* pTitleID = (char*)&TitleID;
char Path[260+1];
sprintf(Path, "Wii/title/00010000/%02x%02x%02x%02x/data/nocopy/", (u8)pTitleID[3], (u8)pTitleID[2], (u8)pTitleID[1], (u8)pTitleID[0]);
sprintf(Path, FULL_WII_USER_DIR "title/00010000/%02x%02x%02x%02x/data/nocopy/", (u8)pTitleID[3], (u8)pTitleID[2], (u8)pTitleID[1], (u8)pTitleID[0]);
CreateDirectoryStruct(Path);
}

View File

@ -226,7 +226,7 @@ CBreakPointWindow::OnAddBreakPointMany(wxCommandEvent& event)
{
// load ini
IniFile ini;
std::string filename = std::string("GameIni/BreakPoints.ini");
std::string filename = std::string(FULL_GAMECONFIG_DIR "BreakPoints.ini");
if (ini.Load(filename.c_str())) // check if there is any file there
{
@ -275,7 +275,7 @@ CBreakPointWindow::OnAddMemoryCheckMany(wxCommandEvent& event)
{
// load ini
IniFile ini;
std::string filename = std::string("GameIni/MemoryChecks.ini");
std::string filename = std::string(FULL_GAMECONFIG_DIR "MemoryChecks.ini");
if (ini.Load(filename.c_str()))
{
@ -354,7 +354,7 @@ CBreakPointWindow::OnAddMemoryCheckMany(wxCommandEvent& event)
}
else
{
wxMessageBox(_T("You have no GameIni/MemoryChecks.ini file"));
wxMessageBox(_T("You have no " FULL_GAMECONFIG_DIR "MemoryChecks.ini file"));
}
}
// =================

View File

@ -160,7 +160,7 @@ CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter
// load ini...
IniFile file;
file.Load("Debugger.ini");
file.Load(DEBUGGER_CONFIG_FILE);
this->Load(file);
if (m_BreakpointWindow) m_BreakpointWindow->Load(file);
@ -175,7 +175,7 @@ CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter
CCodeWindow::~CCodeWindow()
{
IniFile file;
file.Load("Debugger.ini");
file.Load(DEBUGGER_CONFIG_FILE);
this->Save(file);
if (m_BreakpointWindow) m_BreakpointWindow->Save(file);
@ -184,7 +184,7 @@ CCodeWindow::~CCodeWindow()
if (m_MemoryWindow) m_MemoryWindow->Save(file);
if (m_JitWindow) m_JitWindow->Save(file);
file.Save("Debugger.ini");
file.Save(DEBUGGER_CONFIG_FILE);
}
@ -224,7 +224,7 @@ void CCodeWindow::CreateGUIControls(const SCoreStartupParameter& _LocalCoreStart
// Decide what windows to use
// --------------
IniFile ini;
ini.Load("Debugger.ini");
ini.Load(DEBUGGER_CONFIG_FILE);
ini.Get("ShowOnStart", "LogWindow", &bLogWindow, true);
ini.Get("ShowOnStart", "RegisterWindow", &bRegisterWindow, true);
@ -547,7 +547,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
{
PPCAnalyst::FindFunctions(0x80000000, 0x80400000, &g_symbolDB);
SignatureDB db;
if (db.Load("data/totaldb.dsy"))
if (db.Load(TOTALDB_FILE))
db.Apply(&g_symbolDB);
// HLE::PatchFunctions();
@ -560,7 +560,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
g_symbolDB.Clear();
PPCAnalyst::FindFunctions(0x80000000, 0x80400000, &g_symbolDB);
SignatureDB db;
if (db.Load("data/totaldb.dsy"))
if (db.Load(TOTALDB_FILE))
db.Apply(&g_symbolDB);
} else {
g_symbolDB.LoadMap(mapfile.c_str());
@ -859,9 +859,9 @@ void CCodeWindow::OnToggleLogWindow(wxCommandEvent& event)
// this may be a little ugly to have these here - you're more than welcome to
// turn this into the same fancy class stuff like the load windows positions
IniFile ini;
ini.Load("Debugger.ini");
ini.Load(DEBUGGER_CONFIG_FILE);
ini.Set("ShowOnStart", "LogWindow", show);
ini.Save("Debugger.ini");
ini.Save(DEBUGGER_CONFIG_FILE);
if (show)
{
@ -894,9 +894,9 @@ void CCodeWindow::OnToggleRegisterWindow(wxCommandEvent& event)
bool show = GetMenuBar()->IsChecked(event.GetId());
IniFile ini;
ini.Load("Debugger.ini");
ini.Load(DEBUGGER_CONFIG_FILE);
ini.Set("ShowOnStart", "RegisterWindow", show);
ini.Save("Debugger.ini");
ini.Save(DEBUGGER_CONFIG_FILE);
if (show)
{
@ -931,9 +931,9 @@ void CCodeWindow::OnToggleSoundWindow(wxCommandEvent& event)
bool show = GetMenuBar()->IsChecked(event.GetId());
IniFile ini;
ini.Load("Debugger.ini");
ini.Load(DEBUGGER_CONFIG_FILE);
ini.Set("ShowOnStart", "SoundWindow", show);
ini.Save("Debugger.ini");
ini.Save(DEBUGGER_CONFIG_FILE);
if (show)
{
@ -959,9 +959,9 @@ void CCodeWindow::OnToggleVideoWindow(wxCommandEvent& event)
bool show = GetMenuBar()->IsChecked(event.GetId());
IniFile ini;
ini.Load("Debugger.ini");
ini.Load(DEBUGGER_CONFIG_FILE);
ini.Set("ShowOnStart", "VideoWindow", show);
ini.Save("Debugger.ini");
ini.Save(DEBUGGER_CONFIG_FILE);
if (show)
{
@ -984,9 +984,9 @@ void CCodeWindow::OnToggleJitWindow(wxCommandEvent& event)
bool show = GetMenuBar()->IsChecked(event.GetId());
IniFile ini;
ini.Load("Debugger.ini");
ini.Load(DEBUGGER_CONFIG_FILE);
ini.Set("ShowOnStart", "JitWindow", show);
ini.Save("Debugger.ini");
ini.Save(DEBUGGER_CONFIG_FILE);
if (show)
{
@ -1018,9 +1018,9 @@ void CCodeWindow::OnToggleBreakPointWindow(wxCommandEvent& event)
bool show = GetMenuBar()->IsChecked(event.GetId());
IniFile ini;
ini.Load("Debugger.ini");
ini.Load(DEBUGGER_CONFIG_FILE);
ini.Set("ShowOnStart", "BreakpointWindow", show);
ini.Save("Debugger.ini");
ini.Save(DEBUGGER_CONFIG_FILE);
if (show)
{
@ -1051,9 +1051,9 @@ void CCodeWindow::OnToggleMemoryWindow(wxCommandEvent& event)
bool show = GetMenuBar()->IsChecked(event.GetId());
IniFile ini;
ini.Load("Debugger.ini");
ini.Load(DEBUGGER_CONFIG_FILE);
ini.Set("ShowOnStart", "MemoryWindow", show);
ini.Save("Debugger.ini");
ini.Save(DEBUGGER_CONFIG_FILE);
if (show)
{

View File

@ -177,7 +177,7 @@ void CLogWindow::OnEnableAll(wxCommandEvent& event)
static bool enable = true;
int v = LogManager::m_LogSettings->m_iVerbosity;
IniFile ini;
ini.Load("Debugger.ini");
ini.Load(DEBUGGER_CONFIG_FILE);
for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; i++)
{
m_checks->Check(i, enable);
@ -185,7 +185,7 @@ void CLogWindow::OnEnableAll(wxCommandEvent& event)
LogManager::m_Log[i + v*100]->m_bShowInLog = enable;
ini.Set("LogManager", LogManager::m_Log[i + v*100]->m_szShortName, enable);
}
ini.Save("Debugger.ini");
ini.Save(DEBUGGER_CONFIG_FILE);
enable = !enable;
}
@ -220,7 +220,7 @@ void CLogWindow::UpdateChecks()
// -------------
int v = LogManager::m_LogSettings->m_iVerbosity;
IniFile ini;
ini.Load("Debugger.ini");
ini.Load(DEBUGGER_CONFIG_FILE);
for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; i++)
{
@ -244,12 +244,12 @@ void CLogWindow::UpdateChecks()
void CLogWindow::OnOptionsCheck(wxCommandEvent& event)
{
IniFile ini;
ini.Load("Debugger.ini");
ini.Load(DEBUGGER_CONFIG_FILE);
LogManager::m_LogSettings->bResolve = m_options->IsChecked(0);
LogManager::m_LogSettings->bWriteMaster = m_options->IsChecked(1);
ini.Set("LogWindow", "ResolveSymbols", m_options->IsChecked(0));
ini.Set("LogWindow", "WriteMaster", m_options->IsChecked(1));
ini.Save("Debugger.ini");
ini.Save(DEBUGGER_CONFIG_FILE);
if (Core::GetState() != Core::CORE_UNINITIALIZED) UpdateLog();
}
@ -265,7 +265,7 @@ void CLogWindow::OnLogCheck(wxCommandEvent& event)
}
IniFile ini;
ini.Load("Debugger.ini");
ini.Load(DEBUGGER_CONFIG_FILE);
int v = LogManager::m_LogSettings->m_iVerbosity;
for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; i++)
@ -278,7 +278,7 @@ void CLogWindow::OnLogCheck(wxCommandEvent& event)
ini.Set("LogManager", LogManager::m_Log[i + 100*v]->m_szShortName, Enabled);
}
ini.Save("Debugger.ini");
ini.Save(DEBUGGER_CONFIG_FILE);
m_bCheckDirty = true;
if (Core::GetState() != Core::CORE_UNINITIALIZED) UpdateLog();
@ -296,9 +296,9 @@ void CLogWindow::OnRadioChange(wxCommandEvent& event)
// save it
LogManager::m_LogSettings->m_iVerbosity = v;
IniFile ini;
ini.Load("Debugger.ini");
ini.Load(DEBUGGER_CONFIG_FILE);
ini.Set("LogWindow", "Verbosity", v);
ini.Save("Debugger.ini");
ini.Save(DEBUGGER_CONFIG_FILE);
// This check is because we allow this to be changed before a game has been loaded so
// that the boxes do not exist yet

View File

@ -35,7 +35,7 @@ CBannerLoaderWii::CBannerLoaderWii(DiscIO::IFileSystem& _rFileSystem)
char TitleID[4];
_rFileSystem.GetVolume()->Read(0, 4, (u8*)TitleID);
sprintf(Filename, "Wii/title/00010000/%02x%02x%02x%02x/data/banner.bin", (u8)TitleID[0], (u8)TitleID[1], (u8)TitleID[2], (u8)TitleID[3]);
sprintf(Filename, WII_USER_DIR "/title/00010000/%02x%02x%02x%02x/data/banner.bin", (u8)TitleID[0], (u8)TitleID[1], (u8)TitleID[2], (u8)TitleID[3]);
// load the opening.bnr
size_t FileSize = File::GetSize(Filename);

View File

@ -124,10 +124,10 @@ IVolume* CreateVolumeFromCryptedWiiImage(IBlobReader& _rReader, u32 _VolumeType)
{
if (!g_MasterKeyInit)
{
FILE* pT = fopen("WII/masterkey.bin", "rb");
FILE* pT = fopen(WII_MASTERKEY_FILE, "rb");
if (pT == NULL)
{
PanicAlert("Can't open WII/masterkey.bin");
PanicAlert("Can't open " WII_MASTERKEY_FILE);
return NULL;
}

View File

@ -126,6 +126,8 @@
/>
<Tool
Name="VCPostBuildEventTool"
Description="Copying Data\* to $(TargetDir)"
CommandLine="xcopy $(SolutionDir)..\Data $(TargetDir) /s /e /q /y"
/>
</Configuration>
<Configuration
@ -235,6 +237,8 @@
/>
<Tool
Name="VCPostBuildEventTool"
Description="Copying Data\* to $(TargetDir)"
CommandLine="xcopy $(SolutionDir)..\Data $(TargetDir) /s /e /q /y"
/>
</Configuration>
<Configuration
@ -342,6 +346,8 @@
/>
<Tool
Name="VCPostBuildEventTool"
Description="Copying Data\* to $(TargetDir)"
CommandLine="xcopy $(SolutionDir)..\Data $(TargetDir) /s /e /q /y"
/>
</Configuration>
<Configuration
@ -449,6 +455,8 @@
/>
<Tool
Name="VCPostBuildEventTool"
Description="Copying Data\* to $(TargetDir)"
CommandLine="xcopy $(SolutionDir)..\Data $(TargetDir) /s /e /q /y"
/>
</Configuration>
<Configuration
@ -558,6 +566,8 @@
/>
<Tool
Name="VCPostBuildEventTool"
Description="Copying Data\* to $(TargetDir)"
CommandLine="xcopy $(SolutionDir)..\Data $(TargetDir) /s /e /q /y"
/>
</Configuration>
<Configuration
@ -665,6 +675,8 @@
/>
<Tool
Name="VCPostBuildEventTool"
Description="Copying Data\* to $(TargetDir)"
CommandLine="xcopy $(SolutionDir)..\Data $(TargetDir) /s /e /q /y"
/>
</Configuration>
</Configurations>
@ -891,6 +903,10 @@
RelativePath=".\resource.h"
>
</File>
<File
RelativePath=".\Src\SConscript"
>
</File>
<File
RelativePath=".\src\stdafx.cpp"
>

View File

@ -87,7 +87,7 @@ bool BootCore(const std::string& _rFilename)
// Load overrides
IniFile ini;
std::string unique_id = StartUp.GetUniqueID();
if (unique_id.size() == 6 && ini.Load(("GameIni/" + unique_id + ".ini").c_str()))
if (unique_id.size() == 6 && ini.Load((FULL_GAMECONFIG_DIR + unique_id + ".ini").c_str()))
{
ini.Get("Core", "UseDualCore", &StartUp.bUseDualCore, StartUp.bUseDualCore);
ini.Get("Core", "SkipIdle", &StartUp.bSkipIdle, StartUp.bSkipIdle);

View File

@ -64,7 +64,7 @@ CConfigMain::CConfigMain(wxWindow* parent, wxWindowID id, const wxString& title,
// Load Wii SYSCONF
pStream = NULL;
pStream = fopen("./WII/shared2/sys/SYSCONF", "rb");
pStream = fopen(FULL_WII_USER_DIR "shared2/sys/SYSCONF", "rb");
if (pStream != NULL)
{
fread(m_SYSCONF, 1, 0x4000, pStream);
@ -307,7 +307,7 @@ void CConfigMain::OnClose(wxCloseEvent& WXUNUSED (event))
// Save Wii SYSCONF
pStream = NULL;
pStream = fopen("./WII/shared2/sys/SYSCONF", "wb");
pStream = fopen(FULL_WII_USER_DIR "shared2/sys/SYSCONF", "wb");
if (pStream != NULL)
{
fwrite(m_SYSCONF, 1, 0x4000, pStream);

View File

@ -239,7 +239,7 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
item.SetColumn(COLUMN_EMULATION_STATE);
//NOTE (Daco): i dont like the fact of having so much ini's just to have
//the game emulation state of every game you have. but 1 huge ini is no option
GameIni = "GameIni/" + (rISOFile.GetUniqueID()) + ".ini";
GameIni = FULL_GAMECONFIG_DIR + (rISOFile.GetUniqueID()) + ".ini";
ini.Load(GameIni.c_str());
ini.Get("EmuState","EmulationStateId",&EmuState);
if (!EmuState.empty())

View File

@ -139,9 +139,9 @@ bool GameListItem::LoadFromCache()
void GameListItem::SaveToCache()
{
if (!File::IsDirectory("ISOCache"))
if (!File::IsDirectory(FULL_CACHE_DIR))
{
File::CreateDir("ISOCache");
File::CreateDir(FULL_CACHE_DIR);
}
CChunkFileReader::Save<GameListItem>(CreateCacheFilename(), CACHE_REVISION, *this);
@ -166,7 +166,7 @@ std::string GameListItem::CreateCacheFilename()
SplitPath(m_FileName, NULL, &Filename, NULL);
Filename.append(".cache");
std::string fullname("ISOCache\\");
std::string fullname(FULL_CACHE_DIR "\\");
fullname += Filename;
return fullname;
}

View File

@ -49,7 +49,7 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
bRefreshList = false;
CreateGUIControls();
GameIniFile = "GameIni/" + (OpenISO->GetUniqueID()) + ".ini";
GameIniFile = FULL_GAMECONFIG_DIR + (OpenISO->GetUniqueID()) + ".ini";
if (GameIni.Load(GameIniFile.c_str()))
LoadGameConfig();
else

View File

@ -145,7 +145,7 @@ bool DolphinApp::OnInit()
// TODO: Save position and size on exit
// ---------
IniFile ini;
ini.Load("Debugger.ini");
ini.Load(DEBUGGER_CONFIG_FILE);
int x, y, w, h;

View File

@ -43,7 +43,7 @@ void CPluginManager::ScanForPlugins(wxWindow* _wxWindow)
Directories.push_back(std::string(PLUGINS_DIR));
CFileSearch::XStringVector Extensions;
Extensions.push_back("*." PLUGIN_SUFFIX);
Extensions.push_back("*" PLUGIN_SUFFIX);
CFileSearch FileSearch(Extensions, Directories);
const CFileSearch::XStringVector& rFilenames = FileSearch.GetFileNames();

View File

@ -86,7 +86,7 @@ CDebugger::CDebugger(wxWindow *parent, wxWindowID id, const wxString &title,
// load ini...
IniFile file;
file.Load("Debugger.ini");
file.Load(DEBUGGER_CONFIG_FILE);
this->Load(file);
}
@ -94,9 +94,9 @@ CDebugger::~CDebugger()
{
// empty
IniFile file;
file.Load("Debugger.ini");
file.Load(DEBUGGER_CONFIG_FILE);
this->Save(file);
file.Save("Debugger.ini");
file.Save(DEBUGGER_CONFIG_FILE);
}
void CDebugger::Save(IniFile& _IniFile) const
@ -426,9 +426,9 @@ void CDebugger::OnClose(wxCloseEvent& /*event*/)
{
// save the window position when we hide the window to
IniFile file;
file.Load("Debugger.ini");
file.Load(DEBUGGER_CONFIG_FILE);
this->Save(file);
file.Save("Debugger.ini");
file.Save(DEBUGGER_CONFIG_FILE);
EndModal(0);

View File

@ -235,14 +235,14 @@ void DSP_Initialize(DSPInitialize _dspInitialize)
g_dsp.irq_request = dspi_req_dsp_irq;
gdsp_reset();
if (!gdsp_load_rom((char *)"data\\dsp_rom.bin"))
if (!gdsp_load_rom((char *)DSP_ROM_FILE))
{
bCanWork = false;
PanicAlert("No DSP ROM");
ErrorLog("Cannot load DSP ROM\n");
}
if (!gdsp_load_coef((char *)"data\\dsp_coef.bin"))
if (!gdsp_load_coef((char *)DSP_COEF_FILE))
{
bCanWork = false;
PanicAlert("No DSP COEF");

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Version="9.00"
Name="Plugin_PadSimple"
ProjectGUID="{9A183B48-ECC2-4121-876A-9B3793686073}"
RootNamespace="Plugin_PadSimple"
@ -758,6 +758,10 @@
RelativePath="..\..\PluginSpecs\pluginspecs_pad.h"
>
</File>
<File
RelativePath=".\Src\SConscript"
>
</File>
<File
RelativePath=".\Src\stdafx.cpp"
>

View File

@ -628,7 +628,7 @@ void LoadConfig()
};
#endif
IniFile file;
file.Load("pad.ini");
file.Load(FULL_CONFIG_DIR "pad.ini");
for(int i = 0; i < 4; i++)
{
@ -658,7 +658,7 @@ void LoadConfig()
void SaveConfig()
{
IniFile file;
file.Load("pad.ini");
file.Load(FULL_CONFIG_DIR "pad.ini");
for(int i = 0; i < 4; i++)
{
@ -676,7 +676,7 @@ void SaveConfig()
file.Set(SectionName, controlNames[x], pad[i].keyForControl[x]);
}
}
file.Save("pad.ini");
file.Save(FULL_CONFIG_DIR "pad.ini");
}

View File

@ -27,7 +27,7 @@ Config::Config()
void Config::Load()
{
IniFile iniFile;
iniFile.Load("gfx_dx9.ini");
iniFile.Load(FULL_CONFIG_DIR "gfx_dx9.ini");
iniFile.Get("Hardware", "Adapter", &iAdapter, 0);
iniFile.Get("Hardware", "WindowedRes", &iWindowedRes, 0);
iniFile.Get("Hardware", "FullscreenRes", &iFSResolution, 0);
@ -56,7 +56,7 @@ void Config::Load()
void Config::Save()
{
IniFile iniFile;
iniFile.Load("gfx_dx9.ini");
iniFile.Load(FULL_CONFIG_DIR "gfx_dx9.ini");
iniFile.Set("Hardware", "Adapter", iAdapter);
iniFile.Set("Hardware", "WindowedRes", iWindowedRes);
iniFile.Set("Hardware", "FullscreenRes", iFSResolution);
@ -78,5 +78,5 @@ void Config::Save()
iniFile.Set("Enhancements", "ForceFiltering", bForceFiltering);
iniFile.Set("Enhancements", "ForceMaxAniso", bForceMaxAniso);
iniFile.Save("gfx_dx9.ini");
iniFile.Save(FULL_CONFIG_DIR "gfx_dx9.ini");
}

View File

@ -31,7 +31,7 @@ void Config::Load()
{
std::string temp;
IniFile iniFile;
iniFile.Load("gfx_opengl.ini");
iniFile.Load(FULL_CONFIG_DIR "gfx_opengl.ini");
// get resolution
iniFile.Get("Hardware", "WindowedRes", &temp, 0);
@ -82,7 +82,7 @@ void Config::Load()
void Config::Save()
{
IniFile iniFile;
iniFile.Load("gfx_opengl.ini");
iniFile.Load(FULL_CONFIG_DIR "gfx_opengl.ini");
iniFile.Set("Hardware", "WindowedRes", iWindowedRes);
iniFile.Set("Hardware", "FullscreenRes", iFSResolution);
iniFile.Set("Hardware", "Fullscreen", bFullscreen);
@ -110,5 +110,5 @@ void Config::Save()
iniFile.Set("Hacks", "EFBToTextureDisable", bEBFToTextureDisable);
iniFile.Save("gfx_opengl.ini");
iniFile.Save(FULL_CONFIG_DIR "gfx_opengl.ini");
}

View File

@ -56,7 +56,7 @@ CDebugger::CDebugger(wxWindow *parent, wxWindowID id, const wxString &title,
// load ini...
IniFile file;
file.Load("Debugger.ini");
file.Load(DEBUGGER_CONFIG_FILE);
this->Load(file);
}
@ -64,9 +64,9 @@ CDebugger::~CDebugger()
{
// empty
IniFile file;
file.Load("Debugger.ini");
file.Load(DEBUGGER_CONFIG_FILE);
this->Save(file);
file.Save("Debugger.ini");
file.Save(DEBUGGER_CONFIG_FILE);
}
void CDebugger::Save(IniFile& _IniFile) const
@ -276,9 +276,9 @@ void CDebugger::OnClose(wxCloseEvent& /*event*/)
{
// save the window position when we hide the window to
IniFile file;
file.Load("Debugger.ini");
file.Load(DEBUGGER_CONFIG_FILE);
this->Save(file);
file.Save("Debugger.ini");
file.Save(DEBUGGER_CONFIG_FILE);
EndModal(0); // it seems like this works for Show() to, not just ShowModal();

View File

@ -218,7 +218,7 @@ namespace EmuWindow
// started so we have to use an ini file setting here
bool bVideoWindow = false;
IniFile ini;
ini.Load("Debugger.ini");
ini.Load(DEBUGGER_CONFIG_FILE);
ini.Get("ShowOnStart", "VideoWindow", &bVideoWindow, false);
if(bVideoWindow) DoDllDebugger();
}

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Version="9.00"
Name="Plugin_Wiimote"
ProjectGUID="{8D612734-FAA5-4B8A-804F-4DEA2367D495}"
RootNamespace="Plugin_Wiimote_Test"
@ -537,6 +537,10 @@
RelativePath=".\Src\main.cpp"
>
</File>
<File
RelativePath=".\Src\SConscript"
>
</File>
<File
RelativePath=".\Src\wiimote_emu.cpp"
>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Version="9.00"
Name="Plugin_nJoy_SDL"
ProjectGUID="{521498BE-6089-4780-8223-E67C22F4E068}"
RootNamespace="Plugin_nJoy_SDL"
@ -540,6 +540,10 @@
RelativePath=".\readme.txt"
>
</File>
<File
RelativePath=".\Src\SConscript"
>
</File>
</Files>
<Globals>
</Globals>