Paths: Made a WII_SYSCONF_FILE path for the Wii configuration, and removed an unused variable
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2444 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
0b8f7439cb
commit
bd891cfff6
|
@ -30,6 +30,7 @@
|
|||
// Dirs in User
|
||||
#define GC_USER_DIR "GC"
|
||||
#define WII_USER_DIR "Wii"
|
||||
#define WII_SYSCONF_DIR "shared2/sys"
|
||||
#define CONFIG_DIR "Config"
|
||||
#define GAMECONFIG_DIR "GameConfig"
|
||||
#define MAPS_DIR "Maps"
|
||||
|
@ -72,6 +73,7 @@
|
|||
#define WII_EUR_SETTING "setting-eur.txt"
|
||||
#define WII_USA_SETTING "setting-usa.txt"
|
||||
#define WII_JAP_SETTING "setting-jpn.txt"
|
||||
#define WII_SYSCONF "SYSCONF"
|
||||
|
||||
#define MEMORY_DUMP_FILE "mainram.dump"
|
||||
|
||||
|
@ -130,5 +132,6 @@
|
|||
#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
|
||||
#define WII_SYSCONF_FILE FULL_WII_USER_DIR WII_SYSCONF_DIR DIR_SEP WII_SYSCONF
|
||||
|
||||
#endif // PATHS_H
|
||||
|
|
|
@ -141,24 +141,15 @@ bool BootCore(const std::string& _rFilename)
|
|||
{
|
||||
//bRefreshList = false;
|
||||
FILE* pStream; // file handle
|
||||
u8 m_SYSCONF[0x4000]; // SYSCONF file
|
||||
u16 IPL_PGS = 0x17CC; // progressive scan
|
||||
u16 IPL_AR = 0x04D9; // widescreen
|
||||
std::string FullSYSCONFPath = FULL_WII_USER_DIR "shared2/sys/SYSCONF";
|
||||
|
||||
//wxMessageBox(wxString::Format(": %02x", m_SYSCONF[IPL_AR]));
|
||||
|
||||
ini.Get("Wii", "ProgressiveScan", &StartUp.bProgressiveScan, StartUp.bProgressiveScan);
|
||||
ini.Get("Wii", "Widescreen", &StartUp.bWidescreen, StartUp.bWidescreen);
|
||||
|
||||
m_SYSCONF[IPL_PGS] = StartUp.bProgressiveScan;
|
||||
m_SYSCONF[IPL_AR] = StartUp.bWidescreen;
|
||||
|
||||
//wxMessageBox(wxString::Format(": %02x", m_SYSCONF[IPL_AR]));
|
||||
|
||||
// Save the update Wii SYSCONF settings
|
||||
pStream = NULL;
|
||||
pStream = fopen(FullSYSCONFPath.c_str(), "r+b");
|
||||
pStream = fopen(WII_SYSCONF_FILE, "r+b");
|
||||
if (pStream != NULL)
|
||||
{
|
||||
fseek(pStream, IPL_PGS, 0);
|
||||
|
@ -169,7 +160,7 @@ bool BootCore(const std::string& _rFilename)
|
|||
}
|
||||
else
|
||||
{
|
||||
PanicAlert("Could not write to %s", FullSYSCONFPath.c_str());
|
||||
PanicAlert("Could not write to %s", WII_SYSCONF_FILE);
|
||||
}
|
||||
}
|
||||
// ---------------
|
||||
|
|
|
@ -94,9 +94,8 @@ CConfigMain::CConfigMain(wxWindow* parent, wxWindowID id, const wxString& title,
|
|||
bRefreshList = false;
|
||||
|
||||
// Load Wii SYSCONF
|
||||
FullSYSCONFPath = FULL_WII_USER_DIR "shared2/sys/SYSCONF";
|
||||
pStream = NULL;
|
||||
pStream = fopen(FullSYSCONFPath.c_str(), "rb");
|
||||
pStream = fopen(WII_SYSCONF_FILE, "rb");
|
||||
if (pStream != NULL)
|
||||
{
|
||||
fread(m_SYSCONF, 1, 0x4000, pStream);
|
||||
|
@ -105,7 +104,7 @@ CConfigMain::CConfigMain(wxWindow* parent, wxWindowID id, const wxString& title,
|
|||
}
|
||||
else
|
||||
{
|
||||
PanicAlert("Could not read %s. Please recover the SYSCONF file to that location.", FullSYSCONFPath.c_str());
|
||||
PanicAlert("Could not read %s. Please recover the SYSCONF file to that location.", WII_SYSCONF_FILE);
|
||||
m_bSysconfOK = false;
|
||||
}
|
||||
|
||||
|
@ -544,7 +543,7 @@ void CConfigMain::OnClose(wxCloseEvent& WXUNUSED (event))
|
|||
if(m_bSysconfOK)
|
||||
{
|
||||
// Save SYSCONF with the new settings
|
||||
pStream = fopen(FullSYSCONFPath.c_str(), "wb");
|
||||
pStream = fopen(WII_SYSCONF_FILE, "wb");
|
||||
if (pStream != NULL)
|
||||
{
|
||||
fwrite(m_SYSCONF, 1, 0x4000, pStream);
|
||||
|
@ -552,7 +551,7 @@ void CConfigMain::OnClose(wxCloseEvent& WXUNUSED (event))
|
|||
}
|
||||
else
|
||||
{
|
||||
PanicAlert("Could not write to %s", FullSYSCONFPath.c_str());
|
||||
PanicAlert("Could not write to %s", WII_SYSCONF_FILE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,6 @@ class CConfigMain
|
|||
FILE* pStream;
|
||||
u8 m_SYSCONF[0x4000];
|
||||
bool m_bSysconfOK;
|
||||
std::string FullSYSCONFPath;
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue