Global Variable: rename _Settings to g_Settings
This commit is contained in:
parent
ab57cdbc7e
commit
d09a8adf10
|
@ -458,7 +458,7 @@ void CLanguage::LoadCurrentStrings ( bool ShowSelectDialog )
|
|||
{
|
||||
if (ShowSelectDialog)
|
||||
{
|
||||
m_SelectedLanguage = _Settings->LoadString(Setting_CurrentLanguage);
|
||||
m_SelectedLanguage = g_Settings->LoadString(Setting_CurrentLanguage);
|
||||
}
|
||||
|
||||
LanguageList LangList = GetLangList();
|
||||
|
@ -828,7 +828,7 @@ LanguageList & CLanguage::GetLangList (void)
|
|||
return m_LanguageList;
|
||||
}
|
||||
|
||||
CPath LanguageFiles(_Settings->LoadString(Setting_LanguageDir),"*.pj.Lang");
|
||||
CPath LanguageFiles(g_Settings->LoadString(Setting_LanguageDir),"*.pj.Lang");
|
||||
if (LanguageFiles.FindFirst())
|
||||
{
|
||||
do {
|
||||
|
@ -915,7 +915,7 @@ void CLanguage::SetLanguage ( char * LanguageName )
|
|||
{
|
||||
m_SelectedLanguage = LanguageName;
|
||||
LoadCurrentStrings(false);
|
||||
_Settings->SaveString(Setting_CurrentLanguage,LanguageName);
|
||||
g_Settings->SaveString(Setting_CurrentLanguage,LanguageName);
|
||||
}
|
||||
|
||||
bool CLanguage::IsCurrentLang( LanguageFile & File )
|
||||
|
|
|
@ -65,7 +65,7 @@ void LoadLogOptions (LOG_OPTIONS * LogOptions, BOOL AlwaysFill) {
|
|||
HKEY hKeyResults = 0;
|
||||
char String[200];
|
||||
|
||||
sprintf(String,"Software\\N64 Emulation\\%s\\Logging",_Settings->LoadString(Setting_ApplicationName).c_str());
|
||||
sprintf(String,"Software\\N64 Emulation\\%s\\Logging",g_Settings->LoadString(Setting_ApplicationName).c_str());
|
||||
lResult = RegOpenKeyEx( HKEY_CURRENT_USER,String,0,KEY_ALL_ACCESS,
|
||||
&hKeyResults);
|
||||
|
||||
|
@ -380,7 +380,7 @@ void __cdecl LogMessage (char * Message, ...) {
|
|||
char Msg[400];
|
||||
va_list ap;
|
||||
|
||||
if(!_Settings->LoadBool(Debugger_Enabled)) { return; }
|
||||
if(!g_Settings->LoadBool(Debugger_Enabled)) { return; }
|
||||
if(hLogFile == NULL) { return; }
|
||||
|
||||
va_start( ap, Message );
|
||||
|
@ -642,7 +642,7 @@ void SaveLogOptions (void) {
|
|||
DWORD Disposition = 0;
|
||||
char String[200];
|
||||
|
||||
sprintf(String,"Software\\N64 Emulation\\%s\\Logging",_Settings->LoadString(Setting_ApplicationName).c_str());
|
||||
sprintf(String,"Software\\N64 Emulation\\%s\\Logging",g_Settings->LoadString(Setting_ApplicationName).c_str());
|
||||
lResult = RegCreateKeyEx( HKEY_CURRENT_USER,String,0,"", REG_OPTION_NON_VOLATILE,
|
||||
KEY_ALL_ACCESS,NULL,&hKeyResults,&Disposition);
|
||||
|
||||
|
|
|
@ -45,18 +45,18 @@ bool CCheats::LoadCode (int CheatNo, LPCSTR CheatString)
|
|||
|
||||
if (strncmp(ReadPos,"????",4) == 0) {
|
||||
if (CheatNo < 0 || CheatNo > MaxCheats) { return false; }
|
||||
stdstr CheatExt = _Settings->LoadStringIndex(Cheat_Extension,CheatNo);
|
||||
stdstr CheatExt = g_Settings->LoadStringIndex(Cheat_Extension,CheatNo);
|
||||
if (CheatExt.empty()) { return false; }
|
||||
CodeEntry.Value = CheatExt[0] == '$'?(WORD)AsciiToHex(&CheatExt.c_str()[1]):(WORD)atol(CheatExt.c_str());
|
||||
} else if (strncmp(ReadPos,"??",2) == 0) {
|
||||
if (CheatNo < 0 || CheatNo > MaxCheats) { return false; }
|
||||
stdstr CheatExt = _Settings->LoadStringIndex(Cheat_Extension,CheatNo);
|
||||
stdstr CheatExt = g_Settings->LoadStringIndex(Cheat_Extension,CheatNo);
|
||||
if (CheatExt.empty()) { return false; }
|
||||
CodeEntry.Value = (BYTE)(AsciiToHex(ReadPos));
|
||||
CodeEntry.Value |= (CheatExt[0] == '$'?(BYTE)AsciiToHex(&CheatExt.c_str()[1]):(BYTE)atol(CheatExt.c_str())) << 16;
|
||||
} else if (strncmp(&ReadPos[2],"??",2) == 0) {
|
||||
if (CheatNo < 0 || CheatNo > MaxCheats) { return false; }
|
||||
stdstr CheatExt = _Settings->LoadStringIndex(Cheat_Extension,CheatNo);
|
||||
stdstr CheatExt = g_Settings->LoadStringIndex(Cheat_Extension,CheatNo);
|
||||
if (CheatExt.empty()) { return false; }
|
||||
CodeEntry.Value = (WORD)(AsciiToHex(ReadPos) << 16);
|
||||
CodeEntry.Value |= CheatExt[0] == '$'?(BYTE)AsciiToHex(&CheatExt.c_str()[1]):(BYTE)atol(CheatExt.c_str());
|
||||
|
@ -83,14 +83,14 @@ bool CCheats::LoadCode (int CheatNo, LPCSTR CheatString)
|
|||
|
||||
void CCheats::LoadPermCheats (void)
|
||||
{
|
||||
if (_Settings->LoadBool(Debugger_DisableGameFixes))
|
||||
if (g_Settings->LoadBool(Debugger_DisableGameFixes))
|
||||
{
|
||||
return;
|
||||
}
|
||||
for (int CheatNo = 0; CheatNo < MaxCheats; CheatNo ++ )
|
||||
{
|
||||
stdstr LineEntry;
|
||||
if (!_Settings->LoadStringIndex(Rdb_GameCheatFix,CheatNo,LineEntry) || LineEntry.empty())
|
||||
if (!g_Settings->LoadStringIndex(Rdb_GameCheatFix,CheatNo,LineEntry) || LineEntry.empty())
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -105,15 +105,15 @@ void CCheats::LoadCheats(bool DisableSelected) {
|
|||
|
||||
for (int CheatNo = 0; CheatNo < MaxCheats; CheatNo ++ )
|
||||
{
|
||||
stdstr LineEntry = _Settings->LoadStringIndex(Cheat_Entry,CheatNo);
|
||||
stdstr LineEntry = g_Settings->LoadStringIndex(Cheat_Entry,CheatNo);
|
||||
if (LineEntry.empty()) { break; }
|
||||
if (!_Settings->LoadBoolIndex(Cheat_Active,CheatNo))
|
||||
if (!g_Settings->LoadBoolIndex(Cheat_Active,CheatNo))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (DisableSelected)
|
||||
{
|
||||
_Settings->SaveBoolIndex(Cheat_Active,CheatNo,false);
|
||||
g_Settings->SaveBoolIndex(Cheat_Active,CheatNo,false);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -518,7 +518,7 @@ void CCheats::AddCodeLayers (int CheatNumber, const stdstr &CheatName, WND_HANDL
|
|||
stdstr CCheats::GetCheatName(int CheatNo, bool AddExtension) const
|
||||
{
|
||||
if (CheatNo > MaxCheats) { g_Notify->BreakPoint(__FILE__,__LINE__); }
|
||||
stdstr LineEntry = _Settings->LoadStringIndex(Cheat_Entry,CheatNo);
|
||||
stdstr LineEntry = g_Settings->LoadStringIndex(Cheat_Entry,CheatNo);
|
||||
if (LineEntry.length() == 0) { return LineEntry; }
|
||||
|
||||
//Find the start and end of the name which is surrounded in ""
|
||||
|
@ -535,7 +535,7 @@ stdstr CCheats::GetCheatName(int CheatNo, bool AddExtension) const
|
|||
Name.replace("\\","\\*** ");
|
||||
}
|
||||
if (AddExtension && CheatUsesCodeExtensions(LineEntry)) {
|
||||
stdstr CheatValue(_Settings->LoadStringIndex(Cheat_Extension,CheatNo));
|
||||
stdstr CheatValue(g_Settings->LoadStringIndex(Cheat_Extension,CheatNo));
|
||||
Name.Format("%s (=>%s)",Name.c_str(),CheatValue.c_str());
|
||||
}
|
||||
|
||||
|
@ -576,7 +576,7 @@ void CCheats::RefreshCheatManager(void)
|
|||
stdstr Name = GetCheatName(i,true);
|
||||
if (Name.length() == 0) { break; }
|
||||
|
||||
AddCodeLayers(i,Name,(WND_HANDLE)TVI_ROOT, _Settings->LoadBoolIndex(Cheat_Active,i) != 0);
|
||||
AddCodeLayers(i,Name,(WND_HANDLE)TVI_ROOT, g_Settings->LoadBoolIndex(Cheat_Active,i) != 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -772,9 +772,9 @@ int CALLBACK CCheats::CheatAddProc (WND_HANDLE hDlg,DWORD uMsg,DWORD wParam, DWO
|
|||
stdstr_f Cheat("\"%s\"%s",NewCheatName.c_str(),ReadCodeString(hDlg,validcodes,validoptions,nooptions,CodeFormat).c_str());
|
||||
stdstr Options = ReadOptionsString(hDlg,validcodes,validoptions,nooptions,CodeFormat);
|
||||
|
||||
_Settings->SaveStringIndex(Cheat_Entry, _this->m_EditCheat,Cheat.c_str());
|
||||
_Settings->SaveStringIndex(Cheat_Notes, _this->m_EditCheat,GetDlgItemStr(hDlg,IDC_NOTES));
|
||||
_Settings->SaveStringIndex(Cheat_Options, _this->m_EditCheat,Options);
|
||||
g_Settings->SaveStringIndex(Cheat_Entry, _this->m_EditCheat,Cheat.c_str());
|
||||
g_Settings->SaveStringIndex(Cheat_Notes, _this->m_EditCheat,GetDlgItemStr(hDlg,IDC_NOTES));
|
||||
g_Settings->SaveStringIndex(Cheat_Options, _this->m_EditCheat,Options);
|
||||
_this->RecordCheatValues(hDlg);
|
||||
CSettingTypeCheats::FlushChanges();
|
||||
_this->RefreshCheatManager();
|
||||
|
@ -816,7 +816,7 @@ int CALLBACK CCheats::CheatAddProc (WND_HANDLE hDlg,DWORD uMsg,DWORD wParam, DWO
|
|||
break;
|
||||
}
|
||||
|
||||
stdstr CheatEntryStr = _Settings->LoadStringIndex(Cheat_Entry,_this->m_EditCheat);
|
||||
stdstr CheatEntryStr = g_Settings->LoadStringIndex(Cheat_Entry,_this->m_EditCheat);
|
||||
LPCSTR String = CheatEntryStr.c_str();
|
||||
|
||||
//Set Cheat Name
|
||||
|
@ -846,7 +846,7 @@ int CALLBACK CCheats::CheatAddProc (WND_HANDLE hDlg,DWORD uMsg,DWORD wParam, DWO
|
|||
SetDlgItemText((HWND)hDlg,IDC_CHEAT_CODES,Buffer.c_str());
|
||||
|
||||
//Add option values to screen
|
||||
stdstr CheatOptionStr = _Settings->LoadStringIndex(Cheat_Options,_this->m_EditCheat);
|
||||
stdstr CheatOptionStr = g_Settings->LoadStringIndex(Cheat_Options,_this->m_EditCheat);
|
||||
ReadPos = strchr(CheatOptionStr.c_str(),'$');
|
||||
Buffer.erase();
|
||||
if (ReadPos) {
|
||||
|
@ -869,7 +869,7 @@ int CALLBACK CCheats::CheatAddProc (WND_HANDLE hDlg,DWORD uMsg,DWORD wParam, DWO
|
|||
SetDlgItemText((HWND)hDlg,IDC_CHEAT_OPTIONS,Buffer.c_str());
|
||||
|
||||
//Add cheat Notes
|
||||
stdstr CheatNotesStr = _Settings->LoadStringIndex(Cheat_Notes,_this->m_EditCheat);
|
||||
stdstr CheatNotesStr = g_Settings->LoadStringIndex(Cheat_Notes,_this->m_EditCheat);
|
||||
SetDlgItemText((HWND)hDlg,IDC_NOTES,CheatNotesStr.c_str());
|
||||
|
||||
|
||||
|
@ -985,7 +985,7 @@ int CALLBACK CCheats::CheatListProc (WND_HANDLE hDlg,DWORD uMsg,DWORD wParam, DW
|
|||
|
||||
TreeView_HitTest(lpnmh->hwndFrom, &ht);
|
||||
_this->m_hSelectedItem = (WND_HANDLE)ht.hItem;
|
||||
if (_Settings->LoadBool(UserInterface_BasicMode)) { return true; }
|
||||
if (g_Settings->LoadBool(UserInterface_BasicMode)) { return true; }
|
||||
|
||||
//Show Menu
|
||||
HMENU hMenu = LoadMenu(GetModuleHandle(NULL),MAKEINTRESOURCE(IDR_CHEAT_MENU));
|
||||
|
@ -1032,11 +1032,11 @@ int CALLBACK CCheats::CheatListProc (WND_HANDLE hDlg,DWORD uMsg,DWORD wParam, DW
|
|||
item.mask = TVIF_PARAM ;
|
||||
item.hItem = (HTREEITEM)ht.hItem;
|
||||
TreeView_GetItem((HWND)_this->m_hCheatTree,&item);
|
||||
stdstr LineEntry = _Settings->LoadStringIndex(Cheat_Entry,item.lParam);
|
||||
stdstr LineEntry = g_Settings->LoadStringIndex(Cheat_Entry,item.lParam);
|
||||
if (CheatUsesCodeExtensions(LineEntry))
|
||||
{
|
||||
stdstr CheatExtension;
|
||||
if (!_Settings->LoadStringIndex(Cheat_Extension,item.lParam,CheatExtension))
|
||||
if (!g_Settings->LoadStringIndex(Cheat_Extension,item.lParam,CheatExtension))
|
||||
{
|
||||
SendMessage((HWND)hDlg, UM_CHANGECODEEXTENSION, 0, (LPARAM)ht.hItem);
|
||||
TV_SetCheckState(_this->m_hCheatTree,(WND_HANDLE)ht.hItem,TV_STATE_CLEAR);
|
||||
|
@ -1091,7 +1091,7 @@ int CALLBACK CCheats::CheatListProc (WND_HANDLE hDlg,DWORD uMsg,DWORD wParam, DW
|
|||
item.hItem = hItem;
|
||||
TreeView_GetItem((HWND)_this->m_hCheatTree,&item);
|
||||
|
||||
stdstr Notes(_Settings->LoadStringIndex(Cheat_Notes,item.lParam));
|
||||
stdstr Notes(g_Settings->LoadStringIndex(Cheat_Notes,item.lParam));
|
||||
SetDlgItemText((HWND)hDlg,IDC_NOTES,Notes.c_str());
|
||||
if (_this->m_AddCheat)
|
||||
{
|
||||
|
@ -1115,16 +1115,16 @@ int CALLBACK CCheats::CheatListProc (WND_HANDLE hDlg,DWORD uMsg,DWORD wParam, DW
|
|||
TreeView_GetItem((HWND)_this->m_hCheatTree,&item);
|
||||
|
||||
//Make sure the selected line can use code extensions
|
||||
stdstr LineEntry = _Settings->LoadStringIndex(Cheat_Entry,item.lParam);
|
||||
stdstr LineEntry = g_Settings->LoadStringIndex(Cheat_Entry,item.lParam);
|
||||
if (!CheatUsesCodeExtensions(LineEntry)) { break; }
|
||||
|
||||
stdstr Options;
|
||||
if (_Settings->LoadStringIndex(Cheat_Options,item.lParam,Options) && Options.length() > 0)
|
||||
if (g_Settings->LoadStringIndex(Cheat_Options,item.lParam,Options) && Options.length() > 0)
|
||||
{
|
||||
DialogBoxParam(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_Cheats_CodeEx),(HWND)hDlg,(DLGPROC)CheatsCodeExProc,(LPARAM)_this);
|
||||
} else {
|
||||
stdstr Range;
|
||||
if (_Settings->LoadStringIndex(Cheat_Range,item.lParam,Range) && Range.length() > 0)
|
||||
if (g_Settings->LoadStringIndex(Cheat_Range,item.lParam,Range) && Range.length() > 0)
|
||||
{
|
||||
DialogBoxParam(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_Cheats_Range),(HWND)hDlg,(DLGPROC)CheatsCodeQuantProc,(LPARAM)_this);
|
||||
}
|
||||
|
@ -1172,8 +1172,8 @@ int CALLBACK CCheats::CheatsCodeExProc (WND_HANDLE hDlg,DWORD uMsg,DWORD wParam,
|
|||
SetDlgItemText((HWND)hDlg,IDC_CHEAT_NAME,CheatName.c_str());
|
||||
|
||||
//Read through and add all options to the list box
|
||||
stdstr Options(_Settings->LoadStringIndex(Cheat_Options,item.lParam));
|
||||
stdstr CurrentExt(_Settings->LoadStringIndex(Cheat_Extension,item.lParam));
|
||||
stdstr Options(g_Settings->LoadStringIndex(Cheat_Options,item.lParam));
|
||||
stdstr CurrentExt(g_Settings->LoadStringIndex(Cheat_Extension,item.lParam));
|
||||
const char * ReadPos = Options.c_str();
|
||||
while (*ReadPos != 0) {
|
||||
const char * NextComma = strchr(ReadPos,',');
|
||||
|
@ -1210,7 +1210,7 @@ int CALLBACK CCheats::CheatsCodeExProc (WND_HANDLE hDlg,DWORD uMsg,DWORD wParam,
|
|||
if (index < 0) { index = 0; }
|
||||
SendMessage(GetDlgItem((HWND)hDlg,IDC_CHEAT_LIST),LB_GETTEXT,index,(LPARAM)CheatExten);
|
||||
|
||||
_Settings->SaveStringIndex(Cheat_Extension,item.lParam,CheatExten);
|
||||
g_Settings->SaveStringIndex(Cheat_Extension,item.lParam,CheatExten);
|
||||
_this->m_CheatSelectionChanged = true;
|
||||
}
|
||||
RemoveProp((HWND)hDlg,"Class");
|
||||
|
@ -1242,9 +1242,9 @@ int CALLBACK CCheats::CheatsCodeQuantProc (WND_HANDLE hDlg,DWORD uMsg,DWORD wPar
|
|||
item.mask = TVIF_PARAM ;
|
||||
TreeView_GetItem((HWND)_this->m_hCheatTree,&item);
|
||||
stdstr CheatName = _this->GetCheatName(item.lParam,false);
|
||||
stdstr RangeNote(_Settings->LoadStringIndex(Cheat_RangeNotes, item.lParam));
|
||||
stdstr Range(_Settings->LoadStringIndex(Cheat_Range,item.lParam));
|
||||
stdstr Value(_Settings->LoadStringIndex(Cheat_Extension,item.lParam));
|
||||
stdstr RangeNote(g_Settings->LoadStringIndex(Cheat_RangeNotes, item.lParam));
|
||||
stdstr Range(g_Settings->LoadStringIndex(Cheat_Range,item.lParam));
|
||||
stdstr Value(g_Settings->LoadStringIndex(Cheat_Extension,item.lParam));
|
||||
|
||||
//Set up language support for dialog
|
||||
SetWindowText((HWND)hDlg, GS(CHEAT_CODE_EXT_TITLE));
|
||||
|
@ -1310,7 +1310,7 @@ int CALLBACK CCheats::CheatsCodeQuantProc (WND_HANDLE hDlg,DWORD uMsg,DWORD wPar
|
|||
if (Value < Start) { Value = Start; }
|
||||
sprintf(CheatExten,"$%X",Value);
|
||||
|
||||
_Settings->SaveStringIndex(Cheat_Extension, item.lParam,CheatExten);
|
||||
g_Settings->SaveStringIndex(Cheat_Extension, item.lParam,CheatExten);
|
||||
_this->m_CheatSelectionChanged = true;
|
||||
}
|
||||
RemoveProp((HWND)hDlg,"Class");
|
||||
|
@ -1354,7 +1354,7 @@ int CALLBACK CCheats::ManageCheatsProc (WND_HANDLE hDlg,DWORD uMsg,DWORD wParam,
|
|||
ShowWindow((HWND)_this->m_hSelectCheat,SW_SHOW);
|
||||
|
||||
RECT * rc = &WndPlac.rcNormalPosition;
|
||||
if (_Settings->LoadDword(UserInterface_BasicMode))
|
||||
if (g_Settings->LoadDword(UserInterface_BasicMode))
|
||||
{
|
||||
RECT * rcList = (RECT *)_this->m_rcList;
|
||||
GetWindowRect(GetDlgItem((HWND)_this->m_hSelectCheat, IDC_CHEATSFRAME), rcList);
|
||||
|
@ -1534,62 +1534,62 @@ void CCheats::DeleteCheat(int Index)
|
|||
{
|
||||
for (int CheatNo = Index; CheatNo < MaxCheats; CheatNo ++ )
|
||||
{
|
||||
stdstr LineEntry = _Settings->LoadStringIndex(Cheat_Entry,CheatNo + 1);
|
||||
stdstr LineEntry = g_Settings->LoadStringIndex(Cheat_Entry,CheatNo + 1);
|
||||
if (LineEntry.empty())
|
||||
{
|
||||
_Settings->DeleteSettingIndex(Cheat_RangeNotes,CheatNo);
|
||||
_Settings->DeleteSettingIndex(Cheat_Range,CheatNo);
|
||||
_Settings->DeleteSettingIndex(Cheat_Options,CheatNo);
|
||||
_Settings->DeleteSettingIndex(Cheat_Notes,CheatNo);
|
||||
_Settings->DeleteSettingIndex(Cheat_Extension,CheatNo);
|
||||
_Settings->DeleteSettingIndex(Cheat_Entry,CheatNo);
|
||||
_Settings->DeleteSettingIndex(Cheat_Active,CheatNo);
|
||||
g_Settings->DeleteSettingIndex(Cheat_RangeNotes,CheatNo);
|
||||
g_Settings->DeleteSettingIndex(Cheat_Range,CheatNo);
|
||||
g_Settings->DeleteSettingIndex(Cheat_Options,CheatNo);
|
||||
g_Settings->DeleteSettingIndex(Cheat_Notes,CheatNo);
|
||||
g_Settings->DeleteSettingIndex(Cheat_Extension,CheatNo);
|
||||
g_Settings->DeleteSettingIndex(Cheat_Entry,CheatNo);
|
||||
g_Settings->DeleteSettingIndex(Cheat_Active,CheatNo);
|
||||
break;
|
||||
}
|
||||
stdstr Value;
|
||||
if (_Settings->LoadStringIndex(Cheat_RangeNotes,CheatNo+1,Value))
|
||||
if (g_Settings->LoadStringIndex(Cheat_RangeNotes,CheatNo+1,Value))
|
||||
{
|
||||
_Settings->SaveStringIndex(Cheat_RangeNotes,CheatNo, Value);
|
||||
g_Settings->SaveStringIndex(Cheat_RangeNotes,CheatNo, Value);
|
||||
} else {
|
||||
_Settings->DeleteSettingIndex(Cheat_RangeNotes,CheatNo);
|
||||
g_Settings->DeleteSettingIndex(Cheat_RangeNotes,CheatNo);
|
||||
}
|
||||
|
||||
if (_Settings->LoadStringIndex(Cheat_Range,CheatNo+1,Value))
|
||||
if (g_Settings->LoadStringIndex(Cheat_Range,CheatNo+1,Value))
|
||||
{
|
||||
_Settings->SaveStringIndex(Cheat_Range,CheatNo, Value);
|
||||
g_Settings->SaveStringIndex(Cheat_Range,CheatNo, Value);
|
||||
} else {
|
||||
_Settings->DeleteSettingIndex(Cheat_Range,CheatNo);
|
||||
g_Settings->DeleteSettingIndex(Cheat_Range,CheatNo);
|
||||
}
|
||||
|
||||
if (_Settings->LoadStringIndex(Cheat_Options,CheatNo+1,Value))
|
||||
if (g_Settings->LoadStringIndex(Cheat_Options,CheatNo+1,Value))
|
||||
{
|
||||
_Settings->SaveStringIndex(Cheat_Options,CheatNo, Value);
|
||||
g_Settings->SaveStringIndex(Cheat_Options,CheatNo, Value);
|
||||
} else {
|
||||
_Settings->DeleteSettingIndex(Cheat_Options,CheatNo);
|
||||
g_Settings->DeleteSettingIndex(Cheat_Options,CheatNo);
|
||||
}
|
||||
|
||||
if (_Settings->LoadStringIndex(Cheat_Notes,CheatNo+1,Value))
|
||||
if (g_Settings->LoadStringIndex(Cheat_Notes,CheatNo+1,Value))
|
||||
{
|
||||
_Settings->SaveStringIndex(Cheat_Notes,CheatNo, Value);
|
||||
g_Settings->SaveStringIndex(Cheat_Notes,CheatNo, Value);
|
||||
} else {
|
||||
_Settings->DeleteSettingIndex(Cheat_Notes,CheatNo);
|
||||
g_Settings->DeleteSettingIndex(Cheat_Notes,CheatNo);
|
||||
}
|
||||
|
||||
if (_Settings->LoadStringIndex(Cheat_Extension,CheatNo+1,Value))
|
||||
if (g_Settings->LoadStringIndex(Cheat_Extension,CheatNo+1,Value))
|
||||
{
|
||||
_Settings->SaveStringIndex(Cheat_Extension,CheatNo, Value);
|
||||
g_Settings->SaveStringIndex(Cheat_Extension,CheatNo, Value);
|
||||
} else {
|
||||
_Settings->DeleteSettingIndex(Cheat_Extension,CheatNo);
|
||||
g_Settings->DeleteSettingIndex(Cheat_Extension,CheatNo);
|
||||
}
|
||||
|
||||
bool bValue;
|
||||
if (_Settings->LoadBoolIndex(Cheat_Active,CheatNo+1,bValue))
|
||||
if (g_Settings->LoadBoolIndex(Cheat_Active,CheatNo+1,bValue))
|
||||
{
|
||||
_Settings->SaveBoolIndex(Cheat_Active,CheatNo, bValue);
|
||||
g_Settings->SaveBoolIndex(Cheat_Active,CheatNo, bValue);
|
||||
} else {
|
||||
_Settings->DeleteSettingIndex(Cheat_Active,CheatNo);
|
||||
g_Settings->DeleteSettingIndex(Cheat_Active,CheatNo);
|
||||
}
|
||||
_Settings->SaveStringIndex(Cheat_Entry,CheatNo, LineEntry);
|
||||
g_Settings->SaveStringIndex(Cheat_Entry,CheatNo, LineEntry);
|
||||
}
|
||||
CSettingTypeCheats::FlushChanges();
|
||||
}
|
||||
|
@ -1606,10 +1606,10 @@ void CCheats::ChangeChildrenStatus(WND_HANDLE hParent, bool Checked) {
|
|||
|
||||
//if cheat uses a extension and it is not set then do not set it
|
||||
if (Checked) {
|
||||
stdstr LineEntry = _Settings->LoadStringIndex(Cheat_Entry,item.lParam);
|
||||
stdstr LineEntry = g_Settings->LoadStringIndex(Cheat_Entry,item.lParam);
|
||||
if (CheatUsesCodeExtensions(LineEntry)) {
|
||||
stdstr CheatExten;
|
||||
if (!_Settings->LoadStringIndex(Cheat_Extension,item.lParam,CheatExten) || CheatExten.empty())
|
||||
if (!g_Settings->LoadStringIndex(Cheat_Extension,item.lParam,CheatExten) || CheatExten.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -1617,7 +1617,7 @@ void CCheats::ChangeChildrenStatus(WND_HANDLE hParent, bool Checked) {
|
|||
}
|
||||
//Save Cheat
|
||||
TV_SetCheckState(m_hCheatTree,hParent,Checked?TV_STATE_CHECKED:TV_STATE_CLEAR);
|
||||
_Settings->SaveBoolIndex(Cheat_Active,item.lParam,Checked);
|
||||
g_Settings->SaveBoolIndex(Cheat_Active,item.lParam,Checked);
|
||||
return;
|
||||
}
|
||||
TV_CHECK_STATE state = TV_STATE_UNKNOWN;
|
||||
|
|
|
@ -216,7 +216,7 @@ LRESULT CDumpMemory::OnClicked(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/,
|
|||
// char FileName[_MAX_PATH],Directory[_MAX_PATH];
|
||||
// memset(&FileName, 0, sizeof(FileName));
|
||||
// memset(&openfilename, 0, sizeof(openfilename));
|
||||
// strcpy(Directory,_Settings->LoadString(ApplicationDir).c_str());
|
||||
// strcpy(Directory,g_Settings->LoadString(ApplicationDir).c_str());
|
||||
// openfilename.lStructSize = sizeof( openfilename );
|
||||
// openfilename.hwndOwner = (HWND)hDlg;
|
||||
// openfilename.lpstrFilter = "Text file (*.txt)\0*.txt;\0All files (*.*)\0*.*\0";
|
||||
|
@ -434,7 +434,7 @@ bool CDumpMemory::DumpMemory ( LPCSTR FileName,DumpFormat Format, DWORD StartPC,
|
|||
// memset(&FileName, 0, sizeof(FileName));
|
||||
// memset(&openfilename, 0, sizeof(openfilename));
|
||||
//
|
||||
// strcpy(Directory,_Settings->LoadString(ApplicationDir).c_str());
|
||||
// strcpy(Directory,g_Settings->LoadString(ApplicationDir).c_str());
|
||||
//
|
||||
// openfilename.lStructSize = sizeof( openfilename );
|
||||
// openfilename.hwndOwner = (HWND)hDlg;
|
||||
|
|
|
@ -182,9 +182,9 @@ void CInterpreterCPU::BuildCPU (void )
|
|||
R4300iOp::m_NextInstruction = NORMAL;
|
||||
R4300iOp::m_JumpToLocation = 0;
|
||||
|
||||
m_CountPerOp = _Settings->LoadDword(Game_CounterFactor);
|
||||
m_CountPerOp = g_Settings->LoadDword(Game_CounterFactor);
|
||||
|
||||
if (_Settings->LoadBool(Game_32Bit))
|
||||
if (g_Settings->LoadBool(Game_32Bit))
|
||||
{
|
||||
m_R4300i_Opcode = R4300iOp32::BuildInterpreter();
|
||||
} else {
|
||||
|
|
|
@ -77,7 +77,7 @@ void CDMA::PI_DMA_WRITE (void) {
|
|||
_Reg->PI_STATUS_REG |= PI_STATUS_DMA_BUSY;
|
||||
if ( _Reg->PI_DRAM_ADDR_REG + _Reg->PI_WR_LEN_REG + 1 > _MMU->RdramSize())
|
||||
{
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("PI_DMA_WRITE not in Memory"); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("PI_DMA_WRITE not in Memory"); }
|
||||
_Reg->PI_STATUS_REG &= ~PI_STATUS_DMA_BUSY;
|
||||
_Reg->MI_INTR_REG |= MI_INTR_PI;
|
||||
_Reg->CheckInterrupts();
|
||||
|
@ -157,7 +157,7 @@ void CDMA::PI_DMA_WRITE (void) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("PI_DMA_WRITE not in ROM"); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("PI_DMA_WRITE not in ROM"); }
|
||||
_Reg->PI_STATUS_REG &= ~PI_STATUS_DMA_BUSY;
|
||||
_Reg->MI_INTR_REG |= MI_INTR_PI;
|
||||
_Reg->CheckInterrupts();
|
||||
|
|
|
@ -98,7 +98,7 @@ void CEeprom::EepromCommand ( BYTE * Command) {
|
|||
//Write RTC, unimplemented
|
||||
break;
|
||||
default:
|
||||
if (_Settings->LoadDword(Debugger_ShowPifErrors)) { g_Notify->DisplayError("Unknown EepromCommand %d",Command[2]); }
|
||||
if (g_Settings->LoadDword(Debugger_ShowPifErrors)) { g_Notify->DisplayError("Unknown EepromCommand %d",Command[2]); }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -108,8 +108,8 @@ void CEeprom::LoadEeprom (void) {
|
|||
|
||||
memset(m_EEPROM,0,sizeof(m_EEPROM));
|
||||
|
||||
FileName.SetDriveDirectory( _Settings->LoadString(Directory_NativeSave).c_str());
|
||||
FileName.SetName(_Settings->LoadString(Game_GameName).c_str());
|
||||
FileName.SetDriveDirectory( g_Settings->LoadString(Directory_NativeSave).c_str());
|
||||
FileName.SetName(g_Settings->LoadString(Game_GameName).c_str());
|
||||
FileName.SetExtension("eep");
|
||||
|
||||
if (!FileName.DirectoryExists())
|
||||
|
|
|
@ -106,8 +106,8 @@ DWORD CFlashram::ReadFromFlashStatus (DWORD PAddr)
|
|||
bool CFlashram::LoadFlashram (void) {
|
||||
CPath FileName;
|
||||
|
||||
FileName.SetDriveDirectory( _Settings->LoadString(Directory_NativeSave).c_str());
|
||||
FileName.SetName(_Settings->LoadString(Game_GameName).c_str());
|
||||
FileName.SetDriveDirectory( g_Settings->LoadString(Directory_NativeSave).c_str());
|
||||
FileName.SetName(g_Settings->LoadString(Game_GameName).c_str());
|
||||
FileName.SetExtension("fla");
|
||||
|
||||
if (!FileName.DirectoryExists())
|
||||
|
|
|
@ -40,11 +40,11 @@ void CMipsMemoryVM::Reset( bool /*EraseMemory*/ )
|
|||
m_TLB_WriteMap[address >> 12] = ((DWORD)m_RDRAM + (address & 0x1FFFFFFF)) - address;
|
||||
}
|
||||
|
||||
if (_Settings->LoadDword(Rdb_TLB_VAddrStart) != 0)
|
||||
if (g_Settings->LoadDword(Rdb_TLB_VAddrStart) != 0)
|
||||
{
|
||||
DWORD Start = _Settings->LoadDword(Rdb_TLB_VAddrStart); //0x7F000000;
|
||||
DWORD Len = _Settings->LoadDword(Rdb_TLB_VAddrLen); //0x01000000;
|
||||
DWORD PAddr = _Settings->LoadDword(Rdb_TLB_PAddrStart); //0x10034b30;
|
||||
DWORD Start = g_Settings->LoadDword(Rdb_TLB_VAddrStart); //0x7F000000;
|
||||
DWORD Len = g_Settings->LoadDword(Rdb_TLB_VAddrLen); //0x01000000;
|
||||
DWORD PAddr = g_Settings->LoadDword(Rdb_TLB_PAddrStart); //0x10034b30;
|
||||
DWORD End = Start + Len;
|
||||
for (DWORD address = Start; address < End; address += 0x1000) {
|
||||
m_TLB_ReadMap[address >> 12] = ((DWORD)m_RDRAM + (address - Start + PAddr)) - address;
|
||||
|
@ -69,7 +69,7 @@ BOOL CMipsMemoryVM::Initialize ( void )
|
|||
return false;
|
||||
}
|
||||
|
||||
m_AllocatedRdramSize = _Settings->LoadDword(Game_RDRamSize);
|
||||
m_AllocatedRdramSize = g_Settings->LoadDword(Game_RDRamSize);
|
||||
if(VirtualAlloc(m_RDRAM, m_AllocatedRdramSize, MEM_COMMIT, PAGE_READWRITE)==NULL)
|
||||
{
|
||||
WriteTraceF(TraceError,"CMipsMemoryVM::Initialize:: Failed to Allocate RDRAM (Size: 0x%X)",m_AllocatedRdramSize);
|
||||
|
@ -87,7 +87,7 @@ BOOL CMipsMemoryVM::Initialize ( void )
|
|||
m_DMEM = (unsigned char *)(m_RDRAM+0x04000000);
|
||||
m_IMEM = (unsigned char *)(m_RDRAM+0x04001000);
|
||||
|
||||
if (_Settings->LoadBool(Game_LoadRomToMemory))
|
||||
if (g_Settings->LoadBool(Game_LoadRomToMemory))
|
||||
{
|
||||
m_RomMapped = true;
|
||||
m_Rom = m_RDRAM + 0x10000000;
|
||||
|
@ -125,14 +125,14 @@ BOOL CMipsMemoryVM::Initialize ( void )
|
|||
return false;
|
||||
}
|
||||
Reset(false);
|
||||
_Settings->RegisterChangeCB(Game_RDRamSize,this,(CSettings::SettingChangedFunc)RdramChanged);
|
||||
g_Settings->RegisterChangeCB(Game_RDRamSize,this,(CSettings::SettingChangedFunc)RdramChanged);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void CMipsMemoryVM::FreeMemory ( void )
|
||||
{
|
||||
_Settings->UnregisterChangeCB(Game_RDRamSize,this,(CSettings::SettingChangedFunc)RdramChanged);
|
||||
g_Settings->UnregisterChangeCB(Game_RDRamSize,this,(CSettings::SettingChangedFunc)RdramChanged);
|
||||
|
||||
if (m_RDRAM)
|
||||
{
|
||||
|
@ -293,7 +293,7 @@ void CMipsMemoryVM::Compile_LB ( x86Reg Reg, DWORD VAddr, BOOL SignExtend) {
|
|||
if (!TranslateVaddr(VAddr,PAddr)) {
|
||||
MoveConstToX86reg(0,Reg);
|
||||
CPU_Message("Compile_LB\nFailed to translate address %X",VAddr);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_LB\nFailed to translate address %X",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_LB\nFailed to translate address %X",VAddr); }
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -316,7 +316,7 @@ void CMipsMemoryVM::Compile_LB ( x86Reg Reg, DWORD VAddr, BOOL SignExtend) {
|
|||
break;
|
||||
default:
|
||||
MoveConstToX86reg(0,Reg);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_LB\nFailed to compile address: %X",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_LB\nFailed to compile address: %X",VAddr); }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -327,7 +327,7 @@ void CMipsMemoryVM::Compile_LH ( x86Reg Reg, DWORD VAddr, BOOL SignExtend) {
|
|||
if (!TranslateVaddr(VAddr, PAddr)) {
|
||||
MoveConstToX86reg(0,Reg);
|
||||
CPU_Message("Compile_LH\nFailed to translate address %X",VAddr);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_LH\nFailed to translate address %X",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_LH\nFailed to translate address %X",VAddr); }
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -350,7 +350,7 @@ void CMipsMemoryVM::Compile_LH ( x86Reg Reg, DWORD VAddr, BOOL SignExtend) {
|
|||
break;
|
||||
default:
|
||||
MoveConstToX86reg(0,Reg);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_LHU\nFailed to compile address: %X",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_LHU\nFailed to compile address: %X",VAddr); }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -405,7 +405,7 @@ void CMipsMemoryVM::Compile_LW (x86Reg Reg, DWORD VAddr ) {
|
|||
case 0x04080000: MoveVariableToX86reg(&_Reg->SP_PC_REG,"SP_PC_REG",Reg); break;
|
||||
default:
|
||||
MoveConstToX86reg(0,Reg);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError(__FUNCTION__ "\nFailed to translate address: %X",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError(__FUNCTION__ "\nFailed to translate address: %X",VAddr); }
|
||||
}
|
||||
break;
|
||||
case 0x04100000:
|
||||
|
@ -428,7 +428,7 @@ void CMipsMemoryVM::Compile_LW (x86Reg Reg, DWORD VAddr ) {
|
|||
case 0x0430000C: MoveVariableToX86reg(&_Reg->MI_INTR_MASK_REG,"MI_INTR_MASK_REG",Reg); break;
|
||||
default:
|
||||
MoveConstToX86reg(0,Reg);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError(__FUNCTION__ "\nFailed to translate address: %X",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError(__FUNCTION__ "\nFailed to translate address: %X",VAddr); }
|
||||
}
|
||||
break;
|
||||
case 0x04400000:
|
||||
|
@ -445,7 +445,7 @@ void CMipsMemoryVM::Compile_LW (x86Reg Reg, DWORD VAddr ) {
|
|||
break;
|
||||
default:
|
||||
MoveConstToX86reg(0,Reg);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError(__FUNCTION__ "\nFailed to translate address: %X",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError(__FUNCTION__ "\nFailed to translate address: %X",VAddr); }
|
||||
}
|
||||
break;
|
||||
case 0x04500000: /* AI registers */
|
||||
|
@ -489,7 +489,7 @@ void CMipsMemoryVM::Compile_LW (x86Reg Reg, DWORD VAddr ) {
|
|||
break;
|
||||
default:
|
||||
MoveConstToX86reg(0,Reg);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError(__FUNCTION__ "\nFailed to translate address: %X",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError(__FUNCTION__ "\nFailed to translate address: %X",VAddr); }
|
||||
}
|
||||
break;
|
||||
case 0x04600000:
|
||||
|
@ -505,7 +505,7 @@ void CMipsMemoryVM::Compile_LW (x86Reg Reg, DWORD VAddr ) {
|
|||
case 0x04600030: MoveVariableToX86reg(&_Reg->PI_BSD_DOM2_RLS_REG,"PI_BSD_DOM2_RLS_REG",Reg); break;
|
||||
default:
|
||||
MoveConstToX86reg(0,Reg);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError(__FUNCTION__ "\nFailed to translate address: %X",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError(__FUNCTION__ "\nFailed to translate address: %X",VAddr); }
|
||||
}
|
||||
break;
|
||||
case 0x04700000:
|
||||
|
@ -514,7 +514,7 @@ void CMipsMemoryVM::Compile_LW (x86Reg Reg, DWORD VAddr ) {
|
|||
case 0x04700010: MoveVariableToX86reg(&_Reg->RI_REFRESH_REG,"RI_REFRESH_REG",Reg); break;
|
||||
default:
|
||||
MoveConstToX86reg(0,Reg);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError(__FUNCTION__ "\nFailed to translate address: %X",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError(__FUNCTION__ "\nFailed to translate address: %X",VAddr); }
|
||||
}
|
||||
break;
|
||||
case 0x04800000:
|
||||
|
@ -522,7 +522,7 @@ void CMipsMemoryVM::Compile_LW (x86Reg Reg, DWORD VAddr ) {
|
|||
case 0x04800018: MoveVariableToX86reg(&_Reg->SI_STATUS_REG,"SI_STATUS_REG",Reg); break;
|
||||
default:
|
||||
MoveConstToX86reg(0,Reg);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError(__FUNCTION__ "\nFailed to translate address: %X",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError(__FUNCTION__ "\nFailed to translate address: %X",VAddr); }
|
||||
}
|
||||
break;
|
||||
case 0x1FC00000:
|
||||
|
@ -531,7 +531,7 @@ void CMipsMemoryVM::Compile_LW (x86Reg Reg, DWORD VAddr ) {
|
|||
break;
|
||||
default:
|
||||
MoveConstToX86reg(((PAddr & 0xFFFF) << 16) | (PAddr & 0xFFFF),Reg);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) {
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) {
|
||||
CPU_Message(__FUNCTION__ "\nFailed to translate address: %X",VAddr);
|
||||
g_Notify->DisplayError(__FUNCTION__ "\nFailed to translate address: %X",VAddr);
|
||||
}
|
||||
|
@ -545,7 +545,7 @@ void CMipsMemoryVM::Compile_SB_Const ( BYTE Value, DWORD VAddr ) {
|
|||
|
||||
if (!TranslateVaddr(VAddr, PAddr)) {
|
||||
CPU_Message("Compile_SB\nFailed to translate address %X",VAddr);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SB\nFailed to translate address %X",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SB\nFailed to translate address %X",VAddr); }
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -562,7 +562,7 @@ void CMipsMemoryVM::Compile_SB_Const ( BYTE Value, DWORD VAddr ) {
|
|||
MoveConstByteToVariable(Value,PAddr + m_RDRAM,VarName);
|
||||
break;
|
||||
default:
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SB_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SB_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -572,7 +572,7 @@ void CMipsMemoryVM::Compile_SB_Register ( x86Reg Reg, DWORD VAddr ) {
|
|||
|
||||
if (!TranslateVaddr(VAddr, PAddr)) {
|
||||
CPU_Message("Compile_SB\nFailed to translate address %X",VAddr);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SB\nFailed to translate address %X",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SB\nFailed to translate address %X",VAddr); }
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -589,7 +589,7 @@ void CMipsMemoryVM::Compile_SB_Register ( x86Reg Reg, DWORD VAddr ) {
|
|||
MoveX86regByteToVariable(Reg,PAddr + m_RDRAM,VarName);
|
||||
break;
|
||||
default:
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SB_Register\ntrying to store in %X?",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SB_Register\ntrying to store in %X?",VAddr); }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -599,7 +599,7 @@ void CMipsMemoryVM::Compile_SH_Const ( WORD Value, DWORD VAddr ) {
|
|||
|
||||
if (!TranslateVaddr(VAddr, PAddr)) {
|
||||
CPU_Message("Compile_SH\nFailed to translate address %X",VAddr);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SH\nFailed to translate address %X",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SH\nFailed to translate address %X",VAddr); }
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -616,7 +616,7 @@ void CMipsMemoryVM::Compile_SH_Const ( WORD Value, DWORD VAddr ) {
|
|||
MoveConstHalfToVariable(Value,PAddr + m_RDRAM,VarName);
|
||||
break;
|
||||
default:
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SH_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SH_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -626,7 +626,7 @@ void CMipsMemoryVM::Compile_SH_Register ( x86Reg Reg, DWORD VAddr ) {
|
|||
|
||||
if (!TranslateVaddr(VAddr, PAddr)) {
|
||||
CPU_Message("Compile_SH\nFailed to translate address %X",VAddr);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SH\nFailed to translate address %X",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SH\nFailed to translate address %X",VAddr); }
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -643,7 +643,7 @@ void CMipsMemoryVM::Compile_SH_Register ( x86Reg Reg, DWORD VAddr ) {
|
|||
MoveX86regHalfToVariable(Reg,PAddr + m_RDRAM,VarName);
|
||||
break;
|
||||
default:
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SH_Register\ntrying to store in %X?",PAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SH_Register\ntrying to store in %X?",PAddr); }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -654,7 +654,7 @@ void CMipsMemoryVM::Compile_SW_Const ( DWORD Value, DWORD VAddr ) {
|
|||
|
||||
if (!TranslateVaddr(VAddr, PAddr)) {
|
||||
CPU_Message("Compile_SW\nFailed to translate address %X",VAddr);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW\nFailed to translate address %X",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW\nFailed to translate address %X",VAddr); }
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -689,7 +689,7 @@ void CMipsMemoryVM::Compile_SW_Const ( DWORD Value, DWORD VAddr ) {
|
|||
case 0x03F8000C: break;
|
||||
case 0x03F80014: break;
|
||||
default:
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
}
|
||||
break;
|
||||
case 0x04000000:
|
||||
|
@ -771,7 +771,7 @@ void CMipsMemoryVM::Compile_SW_Const ( DWORD Value, DWORD VAddr ) {
|
|||
case 0x0404001C: MoveConstToVariable(0,&_Reg->SP_SEMAPHORE_REG,"SP_SEMAPHORE_REG"); break;
|
||||
case 0x04080000: MoveConstToVariable(Value & 0xFFC,&_Reg->SP_PC_REG,"SP_PC_REG"); break;
|
||||
default:
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
}
|
||||
break;
|
||||
case 0x04300000:
|
||||
|
@ -827,7 +827,7 @@ void CMipsMemoryVM::Compile_SW_Const ( DWORD Value, DWORD VAddr ) {
|
|||
}
|
||||
break;
|
||||
default:
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
}
|
||||
break;
|
||||
case 0x04400000:
|
||||
|
@ -879,7 +879,7 @@ void CMipsMemoryVM::Compile_SW_Const ( DWORD Value, DWORD VAddr ) {
|
|||
case 0x04400030: MoveConstToVariable(Value,&_Reg->VI_X_SCALE_REG,"VI_X_SCALE_REG"); break;
|
||||
case 0x04400034: MoveConstToVariable(Value,&_Reg->VI_Y_SCALE_REG,"VI_Y_SCALE_REG"); break;
|
||||
default:
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
}
|
||||
break;
|
||||
case 0x04500000: /* AI registers */
|
||||
|
@ -919,7 +919,7 @@ void CMipsMemoryVM::Compile_SW_Const ( DWORD Value, DWORD VAddr ) {
|
|||
default:
|
||||
sprintf(VarName,"m_RDRAM + %X",PAddr);
|
||||
MoveConstToVariable(Value,PAddr + m_RDRAM,VarName);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
}
|
||||
break;
|
||||
case 0x04600000:
|
||||
|
@ -954,7 +954,7 @@ void CMipsMemoryVM::Compile_SW_Const ( DWORD Value, DWORD VAddr ) {
|
|||
case 0x0460001C: MoveConstToVariable((Value & 0xFF),&_Reg->PI_BSD_DOM1_PGS_REG,"PI_BSD_DOM1_PGS_REG"); break;
|
||||
case 0x04600020: MoveConstToVariable((Value & 0xFF),&_Reg->PI_BSD_DOM1_RLS_REG,"PI_BSD_DOM1_RLS_REG"); break;
|
||||
default:
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
}
|
||||
break;
|
||||
case 0x04700000:
|
||||
|
@ -964,7 +964,7 @@ void CMipsMemoryVM::Compile_SW_Const ( DWORD Value, DWORD VAddr ) {
|
|||
case 0x04700008: MoveConstToVariable(Value,&_Reg->RI_CURRENT_LOAD_REG,"RI_CURRENT_LOAD_REG"); break;
|
||||
case 0x0470000C: MoveConstToVariable(Value,&_Reg->RI_SELECT_REG,"RI_SELECT_REG"); break;
|
||||
default:
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
}
|
||||
break;
|
||||
case 0x04800000:
|
||||
|
@ -999,11 +999,11 @@ void CMipsMemoryVM::Compile_SW_Const ( DWORD Value, DWORD VAddr ) {
|
|||
AfterCallDirect(m_RegWorkingSet);
|
||||
break;
|
||||
default:
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Const\ntrying to store %X in %X?",Value,VAddr); }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1015,7 +1015,7 @@ void CMipsMemoryVM::Compile_SW_Register (x86Reg Reg, DWORD VAddr )
|
|||
|
||||
if (!TranslateVaddr(VAddr, PAddr)) {
|
||||
CPU_Message("Compile_SW_Register\nFailed to translate address %X",VAddr);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Register\nFailed to translate address %X",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Register\nFailed to translate address %X",VAddr); }
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1069,7 +1069,7 @@ void CMipsMemoryVM::Compile_SW_Register (x86Reg Reg, DWORD VAddr )
|
|||
MoveX86regToVariable(Reg,PAddr + m_RDRAM,VarName);
|
||||
} else {
|
||||
CPU_Message(" Should be moving %s in to %X ?!?",x86_Name(Reg),VAddr);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Register\ntrying to store at %X?",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Register\ntrying to store at %X?",VAddr); }
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1103,7 +1103,7 @@ void CMipsMemoryVM::Compile_SW_Register (x86Reg Reg, DWORD VAddr )
|
|||
break;
|
||||
default:
|
||||
CPU_Message(" Should be moving %s in to %X ?!?",x86_Name(Reg),VAddr);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Register\ntrying to store at %X?",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Register\ntrying to store at %X?",VAddr); }
|
||||
}
|
||||
break;
|
||||
case 0x04400000:
|
||||
|
@ -1159,7 +1159,7 @@ void CMipsMemoryVM::Compile_SW_Register (x86Reg Reg, DWORD VAddr )
|
|||
case 0x04400034: MoveX86regToVariable(Reg,&_Reg->VI_Y_SCALE_REG,"VI_Y_SCALE_REG"); break;
|
||||
default:
|
||||
CPU_Message(" Should be moving %s in to %X ?!?",x86_Name(Reg),VAddr);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Register\ntrying to store at %X?",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Register\ntrying to store at %X?",VAddr); }
|
||||
}
|
||||
break;
|
||||
case 0x04500000: /* AI registers */
|
||||
|
@ -1203,7 +1203,7 @@ void CMipsMemoryVM::Compile_SW_Register (x86Reg Reg, DWORD VAddr )
|
|||
default:
|
||||
sprintf(VarName,"m_RDRAM + %X",PAddr);
|
||||
MoveX86regToVariable(Reg,PAddr + m_RDRAM,VarName);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Register\ntrying to store at %X?",VAddr); } }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Register\ntrying to store at %X?",VAddr); } }
|
||||
break;
|
||||
case 0x04600000:
|
||||
switch (PAddr) {
|
||||
|
@ -1224,7 +1224,7 @@ void CMipsMemoryVM::Compile_SW_Register (x86Reg Reg, DWORD VAddr )
|
|||
AfterCallDirect(m_RegWorkingSet);
|
||||
break;
|
||||
case 0x04600010:
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Register\ntrying to store at %X?",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Register\ntrying to store at %X?",VAddr); }
|
||||
AndConstToVariable((DWORD)~MI_INTR_PI,&_Reg->MI_INTR_REG,"MI_INTR_REG");
|
||||
BeforeCallDirect(m_RegWorkingSet);
|
||||
MoveConstToX86reg((DWORD)_Reg,x86_ECX);
|
||||
|
@ -1251,14 +1251,14 @@ void CMipsMemoryVM::Compile_SW_Register (x86Reg Reg, DWORD VAddr )
|
|||
break;
|
||||
default:
|
||||
CPU_Message(" Should be moving %s in to %X ?!?",x86_Name(Reg),VAddr);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Register\ntrying to store at %X?",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Register\ntrying to store at %X?",VAddr); }
|
||||
}
|
||||
break;
|
||||
case 0x04700000:
|
||||
switch (PAddr) {
|
||||
case 0x04700010: MoveX86regToVariable(Reg,&_Reg->RI_REFRESH_REG,"RI_REFRESH_REG"); break;
|
||||
default:
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Register\ntrying to store at %X?",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Register\ntrying to store at %X?",VAddr); }
|
||||
}
|
||||
break;
|
||||
case 0x04800000:
|
||||
|
@ -1287,7 +1287,7 @@ void CMipsMemoryVM::Compile_SW_Register (x86Reg Reg, DWORD VAddr )
|
|||
AfterCallDirect(m_RegWorkingSet);
|
||||
break;
|
||||
default:
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Register\ntrying to store at %X?",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Register\ntrying to store at %X?",VAddr); }
|
||||
}
|
||||
break;
|
||||
case 0x1FC00000:
|
||||
|
@ -1296,7 +1296,7 @@ void CMipsMemoryVM::Compile_SW_Register (x86Reg Reg, DWORD VAddr )
|
|||
break;
|
||||
default:
|
||||
CPU_Message(" Should be moving %s in to %X ?!?",x86_Name(Reg),VAddr);
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Register\ntrying to store in %X?",VAddr); }
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) { g_Notify->DisplayError("Compile_SW_Register\ntrying to store in %X?",VAddr); }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1470,7 +1470,7 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
|
|||
switch(*(TypePos + 1)) {
|
||||
case 0xB6:
|
||||
if (!LB_NonMemory(MemAddress,(DWORD *)Reg,FALSE)) {
|
||||
if (_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
g_Notify->DisplayError("Failed to load byte\n\nMIPS Address: %X\nX86 Address",
|
||||
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
|
||||
*(unsigned char *)lpEP->ContextRecord->Eip);
|
||||
|
@ -1480,7 +1480,7 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
|
|||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
case 0xB7:
|
||||
if (!LH_NonMemory(MemAddress,(DWORD *)Reg,FALSE)) {
|
||||
if (_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
g_Notify->DisplayError("Failed to load half word\n\nMIPS Address: %X\nX86 Address",
|
||||
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
|
||||
*(unsigned char *)lpEP->ContextRecord->Eip);
|
||||
|
@ -1490,7 +1490,7 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
|
|||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
case 0xBE:
|
||||
if (!LB_NonMemory(MemAddress,Reg,TRUE)) {
|
||||
if (_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
g_Notify->DisplayError("Failed to load byte\n\nMIPS Address: %X\nX86 Address",
|
||||
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
|
||||
*(unsigned char *)lpEP->ContextRecord->Eip);
|
||||
|
@ -1500,7 +1500,7 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
|
|||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
case 0xBF:
|
||||
if (!LH_NonMemory(MemAddress,Reg,TRUE)) {
|
||||
if (_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
g_Notify->DisplayError("Failed to load half word\n\nMIPS Address: %X\nX86 Address",
|
||||
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
|
||||
*(unsigned char *)lpEP->ContextRecord->Eip);
|
||||
|
@ -1517,7 +1517,7 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
|
|||
switch(*(TypePos + 1)) {
|
||||
case 0x8B:
|
||||
if (!LH_NonMemory(MemAddress,Reg,FALSE)) {
|
||||
if (_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
g_Notify->DisplayError("Failed to half word\n\nMIPS Address: %X\nX86 Address",
|
||||
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
|
||||
*(unsigned char *)lpEP->ContextRecord->Eip);
|
||||
|
@ -1527,7 +1527,7 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
|
|||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
case 0x89:
|
||||
if (!SH_NonMemory(MemAddress,*(WORD *)Reg)) {
|
||||
if (_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
g_Notify->DisplayError("Failed to store half word\n\nMIPS Address: %X\nX86 Address",MemAddress,
|
||||
*(unsigned char *)lpEP->ContextRecord->Eip);
|
||||
}
|
||||
|
@ -1541,7 +1541,7 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
|
|||
return EXCEPTION_EXECUTE_HANDLER;
|
||||
}
|
||||
if (!SH_NonMemory(MemAddress,*(WORD *)ReadPos)) {
|
||||
if (_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
g_Notify->DisplayError("Failed to store half word\n\nMIPS Address: %X\nX86 Address",MemAddress,
|
||||
*(unsigned char *)lpEP->ContextRecord->Eip);
|
||||
}
|
||||
|
@ -1555,7 +1555,7 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
|
|||
break;
|
||||
case 0x88:
|
||||
if (!SB_NonMemory(MemAddress,*(BYTE *)Reg)) {
|
||||
if (_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
g_Notify->DisplayError("Failed to store byte\n\nMIPS Address: %X\nX86 Address",
|
||||
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
|
||||
*(unsigned char *)lpEP->ContextRecord->Eip);
|
||||
|
@ -1565,7 +1565,7 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
|
|||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
case 0x8A:
|
||||
if (!LB_NonMemory(MemAddress,Reg,FALSE)) {
|
||||
if (_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
g_Notify->DisplayError("Failed to load byte\n\nMIPS Address: %X\nX86 Address",
|
||||
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
|
||||
*(unsigned char *)lpEP->ContextRecord->Eip);
|
||||
|
@ -1575,7 +1575,7 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
|
|||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
case 0x8B:
|
||||
if (!LW_NonMemory(MemAddress,Reg)) {
|
||||
if (_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
g_Notify->DisplayError("Failed to load word\n\nMIPS Address: %X\nX86 Address",
|
||||
(char *)exRec.ExceptionInformation[1] - (char *)m_RDRAM,
|
||||
*(unsigned char *)lpEP->ContextRecord->Eip);
|
||||
|
@ -1585,7 +1585,7 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
|
|||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
case 0x89:
|
||||
if (!SW_NonMemory(MemAddress,*(DWORD *)Reg)) {
|
||||
if (_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
g_Notify->DisplayError("Failed to store word\n\nMIPS Address: %X\nX86 Address",MemAddress,
|
||||
*(unsigned char *)lpEP->ContextRecord->Eip);
|
||||
}
|
||||
|
@ -1599,7 +1599,7 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
|
|||
return EXCEPTION_EXECUTE_HANDLER;
|
||||
}
|
||||
if (!SB_NonMemory(MemAddress,*(BYTE *)ReadPos)) {
|
||||
if (_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
g_Notify->DisplayError("Failed to store byte\n\nMIPS Address: %X\nX86 Address",MemAddress,
|
||||
*(unsigned char *)lpEP->ContextRecord->Eip);
|
||||
}
|
||||
|
@ -1613,7 +1613,7 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
|
|||
return EXCEPTION_EXECUTE_HANDLER;
|
||||
}
|
||||
if (!SW_NonMemory(MemAddress,*(DWORD *)ReadPos)) {
|
||||
if (_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
if (g_Settings->LoadDword(Debugger_ShowUnhandledMemory)) {
|
||||
g_Notify->DisplayError("Failed to store word\n\nMIPS Address: %X\nX86 Address",MemAddress,
|
||||
*(unsigned char *)lpEP->ContextRecord->Eip);
|
||||
}
|
||||
|
@ -3843,7 +3843,7 @@ void CMipsMemoryVM::TLB_Unmaped( DWORD Vaddr, DWORD Len )
|
|||
|
||||
void CMipsMemoryVM::RdramChanged ( CMipsMemoryVM * _this )
|
||||
{
|
||||
if (_this->m_AllocatedRdramSize == _Settings->LoadDword(Game_RDRamSize))
|
||||
if (_this->m_AllocatedRdramSize == g_Settings->LoadDword(Game_RDRamSize))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -40,8 +40,8 @@ void LoadMempak (void) {
|
|||
memcpy(&Mempaks[count][0],Initilize,sizeof(Initilize));
|
||||
}
|
||||
|
||||
FileName.SetDriveDirectory( _Settings->LoadString(Directory_NativeSave).c_str());
|
||||
FileName.SetName(_Settings->LoadString(Game_GameName).c_str());
|
||||
FileName.SetDriveDirectory( g_Settings->LoadString(Directory_NativeSave).c_str());
|
||||
FileName.SetName(g_Settings->LoadString(Game_GameName).c_str());
|
||||
FileName.SetExtension("mpk");
|
||||
|
||||
if (!FileName.DirectoryExists())
|
||||
|
|
|
@ -26,8 +26,8 @@ int const COpcode::WR_SHIFT[4] = { 24, 16 , 8, 0 };
|
|||
COpcode::COpcode ( DWORD VirtualAddress ):
|
||||
COpcodeAnalysis(m_opcode),
|
||||
m_OpLen(OpCode_Size),
|
||||
m_OpcodeCount(_Settings->LoadDword(Game_CounterFactor)),
|
||||
m_FixedOpcodeCount(_Settings->LoadDword(Game_CounterFactor) != 0)
|
||||
m_OpcodeCount(g_Settings->LoadDword(Game_CounterFactor)),
|
||||
m_FixedOpcodeCount(g_Settings->LoadDword(Game_CounterFactor) != 0)
|
||||
{
|
||||
//setup details about handling opcodes
|
||||
m_NextStep = StepNormal;
|
||||
|
|
|
@ -8,7 +8,7 @@ CPifRamSettings::CPifRamSettings()
|
|||
m_RefCount += 1;
|
||||
if (m_RefCount == 1)
|
||||
{
|
||||
_Settings->RegisterChangeCB(Debugger_ShowPifErrors,NULL,RefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Debugger_ShowPifErrors,NULL,RefreshSettings);
|
||||
RefreshSettings(NULL);
|
||||
}
|
||||
}
|
||||
|
@ -18,13 +18,13 @@ CPifRamSettings::~CPifRamSettings()
|
|||
m_RefCount -= 1;
|
||||
if (m_RefCount == 0)
|
||||
{
|
||||
_Settings->UnregisterChangeCB(Debugger_ShowPifErrors,NULL,RefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Debugger_ShowPifErrors,NULL,RefreshSettings);
|
||||
}
|
||||
}
|
||||
|
||||
void CPifRamSettings::RefreshSettings(void *)
|
||||
{
|
||||
m_bShowPifRamErrors = _Settings->LoadBool(Debugger_ShowPifErrors);
|
||||
m_bShowPifRamErrors = g_Settings->LoadBool(Debugger_ShowPifErrors);
|
||||
}
|
||||
|
||||
CPifRam::CPifRam( bool SavesReadOnly ) :
|
||||
|
|
|
@ -264,7 +264,7 @@ void CRegisters::SetAsCurrentSystem ( void )
|
|||
|
||||
void CRegisters::CheckInterrupts ( void )
|
||||
{
|
||||
if (!bFixedAudio() && (CPU_TYPE)_Settings->LoadDword(Game_CpuType) != CPU_SyncCores) {
|
||||
if (!bFixedAudio() && (CPU_TYPE)g_Settings->LoadDword(Game_CpuType) != CPU_SyncCores) {
|
||||
MI_INTR_REG &= ~MI_INTR_AI;
|
||||
MI_INTR_REG |= (m_AudioIntrReg & MI_INTR_AI);
|
||||
}
|
||||
|
|
|
@ -17,8 +17,8 @@ CSram::~CSram (void)
|
|||
BOOL CSram::LoadSram (void) {
|
||||
CPath FileName;
|
||||
|
||||
FileName.SetDriveDirectory( _Settings->LoadString(Directory_NativeSave).c_str());
|
||||
FileName.SetName(_Settings->LoadString(Game_GameName).c_str());
|
||||
FileName.SetDriveDirectory( g_Settings->LoadString(Directory_NativeSave).c_str());
|
||||
FileName.SetName(g_Settings->LoadString(Game_GameName).c_str());
|
||||
FileName.SetExtension("sra");
|
||||
|
||||
if (!FileName.DirectoryExists())
|
||||
|
|
|
@ -118,58 +118,58 @@ void CSystemEvents::ExecuteEvents ( void )
|
|||
_BaseSystem->m_Cheats.ApplyGSButton(_MMU);
|
||||
break;
|
||||
case SysEvent_PauseCPU_FromMenu:
|
||||
if (!_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
if (!g_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
{
|
||||
_Settings->SaveBool(GameRunning_CPU_Paused,true);
|
||||
_Settings->SaveDword(GameRunning_CPU_PausedType, PauseType_FromMenu);
|
||||
g_Settings->SaveBool(GameRunning_CPU_Paused,true);
|
||||
g_Settings->SaveDword(GameRunning_CPU_PausedType, PauseType_FromMenu);
|
||||
bPause = true;
|
||||
}
|
||||
break;
|
||||
case SysEvent_PauseCPU_AppLostFocus:
|
||||
if (!_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
if (!g_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
{
|
||||
_Settings->SaveBool(GameRunning_CPU_Paused,true);
|
||||
_Settings->SaveDword(GameRunning_CPU_PausedType, PauseType_AppLostFocus);
|
||||
g_Settings->SaveBool(GameRunning_CPU_Paused,true);
|
||||
g_Settings->SaveDword(GameRunning_CPU_PausedType, PauseType_AppLostFocus);
|
||||
bPause = true;
|
||||
}
|
||||
break;
|
||||
case SysEvent_PauseCPU_AppLostActive:
|
||||
if (!_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
if (!g_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
{
|
||||
_Settings->SaveBool(GameRunning_CPU_Paused,true);
|
||||
_Settings->SaveDword(GameRunning_CPU_PausedType, PauseType_AppLostActive);
|
||||
g_Settings->SaveBool(GameRunning_CPU_Paused,true);
|
||||
g_Settings->SaveDword(GameRunning_CPU_PausedType, PauseType_AppLostActive);
|
||||
bPause = true;
|
||||
}
|
||||
break;
|
||||
case SysEvent_PauseCPU_SaveGame:
|
||||
if (!_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
if (!g_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
{
|
||||
_Settings->SaveBool(GameRunning_CPU_Paused,true);
|
||||
_Settings->SaveDword(GameRunning_CPU_PausedType, PauseType_SaveGame);
|
||||
g_Settings->SaveBool(GameRunning_CPU_Paused,true);
|
||||
g_Settings->SaveDword(GameRunning_CPU_PausedType, PauseType_SaveGame);
|
||||
bPause = true;
|
||||
}
|
||||
break;
|
||||
case SysEvent_PauseCPU_LoadGame:
|
||||
if (!_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
if (!g_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
{
|
||||
_Settings->SaveBool(GameRunning_CPU_Paused,true);
|
||||
_Settings->SaveDword(GameRunning_CPU_PausedType, PauseType_LoadGame);
|
||||
g_Settings->SaveBool(GameRunning_CPU_Paused,true);
|
||||
g_Settings->SaveDword(GameRunning_CPU_PausedType, PauseType_LoadGame);
|
||||
bPause = true;
|
||||
}
|
||||
break;
|
||||
case SysEvent_PauseCPU_DumpMemory:
|
||||
if (!_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
if (!g_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
{
|
||||
_Settings->SaveBool(GameRunning_CPU_Paused,true);
|
||||
_Settings->SaveDword(GameRunning_CPU_PausedType, PauseType_DumpMemory);
|
||||
g_Settings->SaveBool(GameRunning_CPU_Paused,true);
|
||||
g_Settings->SaveDword(GameRunning_CPU_PausedType, PauseType_DumpMemory);
|
||||
bPause = true;
|
||||
}
|
||||
break;
|
||||
case SysEvent_PauseCPU_SearchMemory:
|
||||
if (!_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
if (!g_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
{
|
||||
_Settings->SaveBool(GameRunning_CPU_Paused,true);
|
||||
_Settings->SaveDword(GameRunning_CPU_PausedType, PauseType_SearchMemory);
|
||||
g_Settings->SaveBool(GameRunning_CPU_Paused,true);
|
||||
g_Settings->SaveDword(GameRunning_CPU_PausedType, PauseType_SearchMemory);
|
||||
bPause = true;
|
||||
}
|
||||
break;
|
||||
|
@ -188,28 +188,28 @@ void CSystemEvents::ExecuteEvents ( void )
|
|||
void CSystemEvents::ChangePluginFunc ( void )
|
||||
{
|
||||
g_Notify->DisplayMessage(0,MSG_PLUGIN_INIT);
|
||||
if (_Settings->LoadBool(Plugin_GFX_Changed))
|
||||
if (g_Settings->LoadBool(Plugin_GFX_Changed))
|
||||
{
|
||||
_Plugins->Reset(PLUGIN_TYPE_GFX);
|
||||
}
|
||||
if (_Settings->LoadBool(Plugin_AUDIO_Changed))
|
||||
if (g_Settings->LoadBool(Plugin_AUDIO_Changed))
|
||||
{
|
||||
_Plugins->Reset(PLUGIN_TYPE_AUDIO);
|
||||
}
|
||||
if (_Settings->LoadBool(Plugin_CONT_Changed))
|
||||
if (g_Settings->LoadBool(Plugin_CONT_Changed))
|
||||
{
|
||||
_Plugins->Reset(PLUGIN_TYPE_CONTROLLER);
|
||||
}
|
||||
if (_Settings->LoadBool(Plugin_RSP_Changed) ||
|
||||
_Settings->LoadBool(Plugin_AUDIO_Changed) ||
|
||||
_Settings->LoadBool(Plugin_GFX_Changed))
|
||||
if (g_Settings->LoadBool(Plugin_RSP_Changed) ||
|
||||
g_Settings->LoadBool(Plugin_AUDIO_Changed) ||
|
||||
g_Settings->LoadBool(Plugin_GFX_Changed))
|
||||
{
|
||||
_Plugins->Reset(PLUGIN_TYPE_RSP);
|
||||
}
|
||||
_Settings->SaveBool(Plugin_RSP_Changed, false);
|
||||
_Settings->SaveBool(Plugin_AUDIO_Changed,false);
|
||||
_Settings->SaveBool(Plugin_GFX_Changed, false);
|
||||
_Settings->SaveBool(Plugin_CONT_Changed, false);
|
||||
g_Settings->SaveBool(Plugin_RSP_Changed, false);
|
||||
g_Settings->SaveBool(Plugin_AUDIO_Changed,false);
|
||||
g_Settings->SaveBool(Plugin_GFX_Changed, false);
|
||||
g_Settings->SaveBool(Plugin_CONT_Changed, false);
|
||||
g_Notify->RefreshMenu();
|
||||
if (!_Plugins->Initiate())
|
||||
{
|
||||
|
|
|
@ -26,12 +26,12 @@ CN64System::CN64System ( CPlugins * Plugins, bool SavesReadOnly ) :
|
|||
m_JumpToLocation(0),
|
||||
m_TLBLoadAddress(0),
|
||||
m_TLBStoreAddress(0),
|
||||
m_SaveUsing((SAVE_CHIP_TYPE)_Settings->LoadDword(Game_SaveChip)),
|
||||
m_SaveUsing((SAVE_CHIP_TYPE)g_Settings->LoadDword(Game_SaveChip)),
|
||||
m_SystemType(SYSTEM_NTSC)
|
||||
{
|
||||
m_hPauseEvent = CreateEvent(NULL,true,false,NULL);
|
||||
m_Limitor.SetHertz(_Settings->LoadDword(Game_ScreenHertz));
|
||||
m_Cheats.LoadCheats(!_Settings->LoadDword(Setting_RememberCheats));
|
||||
m_Limitor.SetHertz(g_Settings->LoadDword(Game_ScreenHertz));
|
||||
m_Cheats.LoadCheats(!g_Settings->LoadDword(Setting_RememberCheats));
|
||||
|
||||
switch (_Rom->GetCountry())
|
||||
{
|
||||
|
@ -86,7 +86,7 @@ void CN64System::ExternalEvent ( SystemEvent action )
|
|||
case SysEvent_PauseCPU_LoadGame:
|
||||
case SysEvent_PauseCPU_DumpMemory:
|
||||
case SysEvent_PauseCPU_SearchMemory:
|
||||
if (!_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
if (!g_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
{
|
||||
QueueEvent(action);
|
||||
}
|
||||
|
@ -96,37 +96,37 @@ void CN64System::ExternalEvent ( SystemEvent action )
|
|||
SetEvent(m_hPauseEvent);
|
||||
break;
|
||||
case SysEvent_ResumeCPU_AppGainedFocus:
|
||||
if (_Settings->LoadDword(GameRunning_CPU_PausedType) == PauseType_AppLostFocus )
|
||||
if (g_Settings->LoadDword(GameRunning_CPU_PausedType) == PauseType_AppLostFocus )
|
||||
{
|
||||
SetEvent(m_hPauseEvent);
|
||||
}
|
||||
break;
|
||||
case SysEvent_ResumeCPU_AppGainedActive:
|
||||
if (_Settings->LoadDword(GameRunning_CPU_PausedType) == PauseType_AppLostActive )
|
||||
if (g_Settings->LoadDword(GameRunning_CPU_PausedType) == PauseType_AppLostActive )
|
||||
{
|
||||
SetEvent(m_hPauseEvent);
|
||||
}
|
||||
break;
|
||||
case SysEvent_ResumeCPU_SaveGame:
|
||||
if (_Settings->LoadDword(GameRunning_CPU_PausedType) == PauseType_SaveGame )
|
||||
if (g_Settings->LoadDword(GameRunning_CPU_PausedType) == PauseType_SaveGame )
|
||||
{
|
||||
SetEvent(m_hPauseEvent);
|
||||
}
|
||||
break;
|
||||
case SysEvent_ResumeCPU_LoadGame:
|
||||
if (_Settings->LoadDword(GameRunning_CPU_PausedType) == PauseType_LoadGame )
|
||||
if (g_Settings->LoadDword(GameRunning_CPU_PausedType) == PauseType_LoadGame )
|
||||
{
|
||||
SetEvent(m_hPauseEvent);
|
||||
}
|
||||
break;
|
||||
case SysEvent_ResumeCPU_DumpMemory:
|
||||
if (_Settings->LoadDword(GameRunning_CPU_PausedType) == PauseType_DumpMemory )
|
||||
if (g_Settings->LoadDword(GameRunning_CPU_PausedType) == PauseType_DumpMemory )
|
||||
{
|
||||
SetEvent(m_hPauseEvent);
|
||||
}
|
||||
break;
|
||||
case SysEvent_ResumeCPU_SearchMemory:
|
||||
if (_Settings->LoadDword(GameRunning_CPU_PausedType) == PauseType_SearchMemory )
|
||||
if (g_Settings->LoadDword(GameRunning_CPU_PausedType) == PauseType_SearchMemory )
|
||||
{
|
||||
SetEvent(m_hPauseEvent);
|
||||
}
|
||||
|
@ -139,11 +139,11 @@ void CN64System::ExternalEvent ( SystemEvent action )
|
|||
|
||||
bool CN64System::RunFileImage ( const char * FileLoc )
|
||||
{
|
||||
if (_Settings->LoadBool(GameRunning_LoadingInProgress))
|
||||
if (g_Settings->LoadBool(GameRunning_LoadingInProgress))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_Settings->SaveBool(GameRunning_LoadingInProgress,true);
|
||||
g_Settings->SaveBool(GameRunning_LoadingInProgress,true);
|
||||
|
||||
HANDLE *hThread = new HANDLE;
|
||||
*hThread = NULL;
|
||||
|
@ -157,7 +157,7 @@ bool CN64System::RunFileImage ( const char * FileLoc )
|
|||
*hThread = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)stLoadFileImage,Info,0, &(Info->ThreadID));
|
||||
if (*hThread == NULL)
|
||||
{
|
||||
_Settings->SaveBool(GameRunning_LoadingInProgress,false);
|
||||
g_Settings->SaveBool(GameRunning_LoadingInProgress,false);
|
||||
delete Info;
|
||||
delete hThread;
|
||||
return false;
|
||||
|
@ -185,7 +185,7 @@ bool CN64System::EmulationStarting ( HANDLE hThread, DWORD ThreadId )
|
|||
_BaseSystem->m_CPU_Handle = hThread;
|
||||
_BaseSystem->m_CPU_ThreadID = ThreadId;
|
||||
WriteTrace(TraceDebug,"CN64System::stLoadFileImage: Setting up N64 system done");
|
||||
_Settings->SaveBool(GameRunning_LoadingInProgress,false);
|
||||
g_Settings->SaveBool(GameRunning_LoadingInProgress,false);
|
||||
g_Notify->RefreshMenu();
|
||||
try
|
||||
{
|
||||
|
@ -205,7 +205,7 @@ bool CN64System::EmulationStarting ( HANDLE hThread, DWORD ThreadId )
|
|||
} else {
|
||||
WriteTrace(TraceError,"CN64System::stLoadFileImage: SetActiveSystem failed");
|
||||
g_Notify->DisplayError("Failed to Initialize N64 System");
|
||||
_Settings->SaveBool(GameRunning_LoadingInProgress,false);
|
||||
g_Settings->SaveBool(GameRunning_LoadingInProgress,false);
|
||||
g_Notify->RefreshMenu();
|
||||
bRes = false;
|
||||
}
|
||||
|
@ -233,7 +233,7 @@ void CN64System::stLoadFileImage ( FileImageInfo * Info )
|
|||
WriteTrace(TraceDebug,"CN64System::stLoadFileImage: Mark Rom as loading");
|
||||
|
||||
//Mark the rom as loading
|
||||
_Settings->SaveBool(GameRunning_LoadingInProgress,true);
|
||||
g_Settings->SaveBool(GameRunning_LoadingInProgress,true);
|
||||
g_Notify->RefreshMenu();
|
||||
|
||||
//Try to load the passed N64 rom
|
||||
|
@ -250,19 +250,19 @@ void CN64System::stLoadFileImage ( FileImageInfo * Info )
|
|||
{
|
||||
WriteTrace(TraceDebug,"CN64System::stLoadFileImage: Add Recent Rom");
|
||||
g_Notify->AddRecentRom(ImageInfo.FileName.c_str());
|
||||
g_Notify->SetWindowCaption(_Settings->LoadString(Game_GoodName).c_str());
|
||||
if (_Settings->LoadDword(Setting_AutoStart) != 0)
|
||||
g_Notify->SetWindowCaption(g_Settings->LoadString(Game_GoodName).c_str());
|
||||
if (g_Settings->LoadDword(Setting_AutoStart) != 0)
|
||||
{
|
||||
EmulationStarting(*((HANDLE *)ImageInfo.ThreadHandle),ImageInfo.ThreadID);
|
||||
}
|
||||
_Settings->SaveBool(GameRunning_LoadingInProgress,false);
|
||||
g_Settings->SaveBool(GameRunning_LoadingInProgress,false);
|
||||
g_Notify->RefreshMenu();
|
||||
} else {
|
||||
WriteTraceF(TraceError,"CN64System::stLoadFileImage: LoadN64Image failed (\"%s\")",ImageInfo.FileName.c_str());
|
||||
g_Notify->DisplayError(_Rom->GetError());
|
||||
delete _Rom;
|
||||
_Rom = NULL;
|
||||
_Settings->SaveBool(GameRunning_LoadingInProgress,false);
|
||||
g_Settings->SaveBool(GameRunning_LoadingInProgress,false);
|
||||
g_Notify->RefreshMenu();
|
||||
return;
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ void CN64System::StartEmulation2 ( bool NewThread )
|
|||
|
||||
if (!SetActiveSystem())
|
||||
{
|
||||
_Settings->SaveBool(GameRunning_LoadingInProgress,false);
|
||||
g_Settings->SaveBool(GameRunning_LoadingInProgress,false);
|
||||
g_Notify->DisplayError(MSG_PLUGIN_NOT_INIT);
|
||||
|
||||
//Set handle to NULL so this thread is not terminated
|
||||
|
@ -305,8 +305,8 @@ void CN64System::StartEmulation2 ( bool NewThread )
|
|||
}
|
||||
|
||||
|
||||
g_Notify->MakeWindowOnTop(_Settings->LoadBool(UserInterface_AlwaysOnTop));
|
||||
if (!_Settings->LoadBool(Beta_IsValidExe))
|
||||
g_Notify->MakeWindowOnTop(g_Settings->LoadBool(UserInterface_AlwaysOnTop));
|
||||
if (!g_Settings->LoadBool(Beta_IsValidExe))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -314,11 +314,11 @@ void CN64System::StartEmulation2 ( bool NewThread )
|
|||
//mark the emulation as starting and fix up menus
|
||||
g_Notify->DisplayMessage(5,MSG_EMULATION_STARTED);
|
||||
|
||||
if (_Settings->LoadBool(Setting_AutoFullscreen))
|
||||
if (g_Settings->LoadBool(Setting_AutoFullscreen))
|
||||
{
|
||||
WriteTrace(TraceDebug,"CN64System::StartEmulation 15");
|
||||
CIniFile RomIniFile(_Settings->LoadString(SupportFile_RomDatabase).c_str());
|
||||
stdstr Status = _Settings->LoadString(Rdb_Status);
|
||||
CIniFile RomIniFile(g_Settings->LoadString(SupportFile_RomDatabase).c_str());
|
||||
stdstr Status = g_Settings->LoadString(Rdb_Status);
|
||||
|
||||
char String[100];
|
||||
RomIniFile.GetString("Rom Status",stdstr_f("%s.AutoFullScreen", Status.c_str()).c_str(),"true",String,sizeof(String));
|
||||
|
@ -361,7 +361,7 @@ void CN64System::CloseCpu ( void )
|
|||
}
|
||||
|
||||
m_EndEmulation = true;
|
||||
if (_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
if (g_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
{
|
||||
SetEvent(m_hPauseEvent);
|
||||
}
|
||||
|
@ -422,12 +422,12 @@ void CN64System::Pause(void)
|
|||
return;
|
||||
}
|
||||
ResetEvent(m_hPauseEvent);
|
||||
_Settings->SaveBool(GameRunning_CPU_Paused,true);
|
||||
g_Settings->SaveBool(GameRunning_CPU_Paused,true);
|
||||
g_Notify->RefreshMenu();
|
||||
g_Notify->DisplayMessage(5,MSG_CPU_PAUSED);
|
||||
WaitForSingleObject(m_hPauseEvent, INFINITE);
|
||||
ResetEvent(m_hPauseEvent);
|
||||
_Settings->SaveBool(GameRunning_CPU_Paused,(DWORD)false);
|
||||
g_Settings->SaveBool(GameRunning_CPU_Paused,(DWORD)false);
|
||||
g_Notify->RefreshMenu();
|
||||
g_Notify->DisplayMessage(5,MSG_CPU_RESUMED);
|
||||
}
|
||||
|
@ -439,7 +439,7 @@ stdstr CN64System::ChooseFileToOpen ( WND_HANDLE hParent ) {
|
|||
memset(&FileName, 0, sizeof(FileName));
|
||||
memset(&openfilename, 0, sizeof(openfilename));
|
||||
|
||||
strcpy(Directory,_Settings->LoadString(Directory_Game).c_str());
|
||||
strcpy(Directory,g_Settings->LoadString(Directory_Game).c_str());
|
||||
|
||||
openfilename.lStructSize = sizeof( openfilename );
|
||||
openfilename.hwndOwner = (HWND)hParent;
|
||||
|
@ -763,22 +763,22 @@ void CN64System::ExecuteCPU ( void )
|
|||
if (_Plugins) { _Plugins->GameReset(); }
|
||||
|
||||
//reset code
|
||||
_Settings->SaveBool(GameRunning_CPU_Running,true);
|
||||
_Settings->SaveBool(GameRunning_CPU_Paused,false);
|
||||
g_Settings->SaveBool(GameRunning_CPU_Running,true);
|
||||
g_Settings->SaveBool(GameRunning_CPU_Paused,false);
|
||||
g_Notify->DisplayMessage(5,MSG_EMULATION_STARTED);
|
||||
|
||||
m_EndEmulation = false;
|
||||
g_Notify->RefreshMenu();
|
||||
|
||||
#ifndef EXTERNAL_RELEASE
|
||||
LogOptions.GenerateLog = _Settings->LoadDword(Debugger_GenerateDebugLog);
|
||||
LogOptions.GenerateLog = g_Settings->LoadDword(Debugger_GenerateDebugLog);
|
||||
LoadLogOptions(&LogOptions, FALSE);
|
||||
StartLog();
|
||||
#endif
|
||||
|
||||
CInterpreterCPU::BuildCPU();
|
||||
|
||||
switch ((CPU_TYPE)_Settings->LoadDword(Game_CpuType)) {
|
||||
switch ((CPU_TYPE)g_Settings->LoadDword(Game_CpuType)) {
|
||||
case CPU_Recompiler: ExecuteRecompiler(); break;
|
||||
case CPU_SyncCores: ExecuteSyncCPU(); break;
|
||||
default: ExecuteInterpret(); break;
|
||||
|
@ -803,9 +803,9 @@ void CN64System::ExecuteRecompiler ()
|
|||
void CN64System::ExecuteSyncCPU ()
|
||||
{
|
||||
g_Notify->DisplayMessage(5,"Copy Plugins");
|
||||
_Plugins->CopyPlugins(_Settings->LoadString(Directory_PluginSync));
|
||||
_Plugins->CopyPlugins(g_Settings->LoadString(Directory_PluginSync));
|
||||
CMainGui SyncWindow(false);
|
||||
CPlugins SyncPlugins ( _Settings->LoadString(Directory_PluginSync) );
|
||||
CPlugins SyncPlugins ( g_Settings->LoadString(Directory_PluginSync) );
|
||||
SyncPlugins.SetRenderWindows(&SyncWindow,&SyncWindow);
|
||||
|
||||
m_SyncCPU = new CN64System(&SyncPlugins, true);
|
||||
|
@ -823,7 +823,7 @@ void CN64System::ExecuteSyncCPU ()
|
|||
}
|
||||
|
||||
void CN64System::CpuStopped ( void ) {
|
||||
_Settings->SaveBool(GameRunning_CPU_Running,(DWORD)false);
|
||||
g_Settings->SaveBool(GameRunning_CPU_Running,(DWORD)false);
|
||||
g_Notify->WindowMode();
|
||||
if (!m_InReset)
|
||||
{
|
||||
|
@ -841,7 +841,7 @@ void CN64System::CpuStopped ( void ) {
|
|||
g_Notify->RefreshMenu();
|
||||
g_Notify->MakeWindowOnTop(false);
|
||||
g_Notify->DisplayMessage(5,MSG_EMULATION_ENDED);
|
||||
if (_Settings->LoadDword(RomBrowser_Enabled)) {
|
||||
if (g_Settings->LoadDword(RomBrowser_Enabled)) {
|
||||
g_Notify->ShowRomBrowser();
|
||||
}
|
||||
}
|
||||
|
@ -1165,37 +1165,37 @@ bool CN64System::SaveState(void)
|
|||
if ((m_Reg.STATUS_REGISTER & STATUS_EXL) != 0) { return false; }
|
||||
|
||||
//Get the file Name
|
||||
stdstr FileName, ExtraInfoFileName, CurrentSaveName = _Settings->LoadString(GameRunning_InstantSaveFile);
|
||||
stdstr FileName, ExtraInfoFileName, CurrentSaveName = g_Settings->LoadString(GameRunning_InstantSaveFile);
|
||||
if (CurrentSaveName.empty())
|
||||
{
|
||||
int Slot = _Settings->LoadDword(Game_CurrentSaveState);
|
||||
int Slot = g_Settings->LoadDword(Game_CurrentSaveState);
|
||||
if (Slot != 0) {
|
||||
CurrentSaveName.Format("%s.pj%d",_Settings->LoadString(Game_GoodName).c_str(), Slot);
|
||||
CurrentSaveName.Format("%s.pj%d",g_Settings->LoadString(Game_GoodName).c_str(), Slot);
|
||||
} else {
|
||||
CurrentSaveName.Format("%s.pj",_Settings->LoadString(Game_GoodName).c_str());
|
||||
CurrentSaveName.Format("%s.pj",g_Settings->LoadString(Game_GoodName).c_str());
|
||||
}
|
||||
FileName.Format("%s%s",_Settings->LoadString(Directory_InstantSave).c_str(),CurrentSaveName.c_str());
|
||||
FileName.Format("%s%s",g_Settings->LoadString(Directory_InstantSave).c_str(),CurrentSaveName.c_str());
|
||||
stdstr_f ZipFileName("%s.zip",FileName.c_str());
|
||||
//Make sure the target dir exists
|
||||
CreateDirectory(_Settings->LoadString(Directory_InstantSave).c_str(),NULL);
|
||||
CreateDirectory(g_Settings->LoadString(Directory_InstantSave).c_str(),NULL);
|
||||
//delete any old save
|
||||
DeleteFile(FileName.c_str());
|
||||
DeleteFile(ZipFileName.c_str());
|
||||
ExtraInfoFileName.Format("%s.dat",CurrentSaveName.c_str());
|
||||
|
||||
//If ziping save add .zip on the end
|
||||
if (_Settings->LoadDword(Setting_AutoZipInstantSave)) {
|
||||
if (g_Settings->LoadDword(Setting_AutoZipInstantSave)) {
|
||||
FileName = ZipFileName;
|
||||
}
|
||||
_Settings->SaveDword(Game_LastSaveSlot,_Settings->LoadDword(Game_CurrentSaveState));
|
||||
g_Settings->SaveDword(Game_LastSaveSlot,g_Settings->LoadDword(Game_CurrentSaveState));
|
||||
} else {
|
||||
FileName.Format("%s%s",CurrentSaveName.c_str(), _Settings->LoadDword(Setting_AutoZipInstantSave) ? ".pj.zip" : ".pj");
|
||||
FileName.Format("%s%s",CurrentSaveName.c_str(), g_Settings->LoadDword(Setting_AutoZipInstantSave) ? ".pj.zip" : ".pj");
|
||||
ExtraInfoFileName.Format("%s.dat",FileName.c_str());
|
||||
}
|
||||
if (FileName.empty()) { return true; }
|
||||
|
||||
//Open the file
|
||||
if (_Settings->LoadDword(Game_FuncLookupMode) == FuncFind_ChangeMemory)
|
||||
if (g_Settings->LoadDword(Game_FuncLookupMode) == FuncFind_ChangeMemory)
|
||||
{
|
||||
if (m_Recomp)
|
||||
{
|
||||
|
@ -1204,10 +1204,10 @@ bool CN64System::SaveState(void)
|
|||
}
|
||||
|
||||
DWORD dwWritten, SaveID_0 = 0x23D8A6C8, SaveID_1 = 0x56D2CD23;
|
||||
DWORD RdramSize = _Settings->LoadDword(Game_RDRamSize);
|
||||
DWORD RdramSize = g_Settings->LoadDword(Game_RDRamSize);
|
||||
DWORD MiInterReg = _Reg->MI_INTR_REG;
|
||||
DWORD NextViTimer = m_SystemTimer.GetTimer(CSystemTimer::ViTimer);
|
||||
if (_Settings->LoadDword(Setting_AutoZipInstantSave)) {
|
||||
if (g_Settings->LoadDword(Setting_AutoZipInstantSave)) {
|
||||
zipFile file;
|
||||
|
||||
file = zipOpen(FileName.c_str(),0);
|
||||
|
@ -1285,7 +1285,7 @@ bool CN64System::SaveState(void)
|
|||
CloseHandle(hSaveFile);
|
||||
}
|
||||
m_Reg.MI_INTR_REG = MiInterReg;
|
||||
_Settings->SaveString(GameRunning_InstantSaveFile,"");
|
||||
g_Settings->SaveString(GameRunning_InstantSaveFile,"");
|
||||
stdstr SaveMessage = _Lang->GetString(MSG_SAVED_STATE);
|
||||
|
||||
CPath SavedFileName(FileName);
|
||||
|
@ -1298,26 +1298,26 @@ bool CN64System::SaveState(void)
|
|||
|
||||
bool CN64System::LoadState(void)
|
||||
{
|
||||
stdstr InstantFileName = _Settings->LoadString(GameRunning_InstantSaveFile);
|
||||
stdstr InstantFileName = g_Settings->LoadString(GameRunning_InstantSaveFile);
|
||||
if (!InstantFileName.empty())
|
||||
{
|
||||
bool Result = LoadState(InstantFileName.c_str());
|
||||
_Settings->SaveString(GameRunning_InstantSaveFile,"");
|
||||
g_Settings->SaveString(GameRunning_InstantSaveFile,"");
|
||||
return Result;
|
||||
}
|
||||
|
||||
CPath FileName;
|
||||
FileName.SetDriveDirectory(_Settings->LoadString(Directory_InstantSave).c_str());
|
||||
if (_Settings->LoadDword(Game_CurrentSaveState) != 0) {
|
||||
FileName.SetNameExtension(stdstr_f("%s.pj%d",_Settings->LoadString(Game_GoodName).c_str(),_Settings->LoadDword(Game_CurrentSaveState)).c_str());
|
||||
FileName.SetDriveDirectory(g_Settings->LoadString(Directory_InstantSave).c_str());
|
||||
if (g_Settings->LoadDword(Game_CurrentSaveState) != 0) {
|
||||
FileName.SetNameExtension(stdstr_f("%s.pj%d",g_Settings->LoadString(Game_GoodName).c_str(),g_Settings->LoadDword(Game_CurrentSaveState)).c_str());
|
||||
} else {
|
||||
FileName.SetNameExtension(stdstr_f("%s.pj",_Settings->LoadString(Game_GoodName).c_str()).c_str());
|
||||
FileName.SetNameExtension(stdstr_f("%s.pj",g_Settings->LoadString(Game_GoodName).c_str()).c_str());
|
||||
}
|
||||
|
||||
CPath ZipFileName;
|
||||
ZipFileName = (stdstr&)FileName + ".zip";
|
||||
|
||||
if ((_Settings->LoadDword(Setting_AutoZipInstantSave) && ZipFileName.Exists()) || FileName.Exists())
|
||||
if ((g_Settings->LoadDword(Setting_AutoZipInstantSave) && ZipFileName.Exists()) || FileName.Exists())
|
||||
{
|
||||
if (LoadState(FileName))
|
||||
{
|
||||
|
@ -1326,10 +1326,10 @@ bool CN64System::LoadState(void)
|
|||
}
|
||||
|
||||
//Use old file Name
|
||||
if (_Settings->LoadDword(Game_CurrentSaveState) != 0) {
|
||||
FileName.SetNameExtension(stdstr_f("%s.pj%d",_Settings->LoadString(Game_GameName).c_str(),_Settings->LoadDword(Game_CurrentSaveState)).c_str());
|
||||
if (g_Settings->LoadDword(Game_CurrentSaveState) != 0) {
|
||||
FileName.SetNameExtension(stdstr_f("%s.pj%d",g_Settings->LoadString(Game_GameName).c_str(),g_Settings->LoadDword(Game_CurrentSaveState)).c_str());
|
||||
} else {
|
||||
FileName.SetNameExtension(stdstr_f("%s.pj",_Settings->LoadString(Game_GameName).c_str()).c_str());
|
||||
FileName.SetNameExtension(stdstr_f("%s.pj",g_Settings->LoadString(Game_GameName).c_str()).c_str());
|
||||
}
|
||||
return LoadState(FileName);
|
||||
}
|
||||
|
@ -1344,7 +1344,7 @@ bool CN64System::LoadState(LPCSTR FileName) {
|
|||
_splitpath(FileName, drive, dir, fname, ext);
|
||||
|
||||
stdstr FileNameStr(FileName);
|
||||
if (_Settings->LoadDword(Setting_AutoZipInstantSave) || _stricmp(ext,".zip") == 0)
|
||||
if (g_Settings->LoadDword(Setting_AutoZipInstantSave) || _stricmp(ext,".zip") == 0)
|
||||
{
|
||||
//If ziping save add .zip on the end
|
||||
if (_stricmp(ext,".zip") != 0)
|
||||
|
@ -1392,9 +1392,9 @@ bool CN64System::LoadState(LPCSTR FileName) {
|
|||
}
|
||||
Reset(false,true);
|
||||
|
||||
_MMU->UnProtectMemory(0x80000000,0x80000000 + _Settings->LoadDword(Game_RDRamSize) - 4);
|
||||
_MMU->UnProtectMemory(0x80000000,0x80000000 + g_Settings->LoadDword(Game_RDRamSize) - 4);
|
||||
_MMU->UnProtectMemory(0xA4000000,0xA4001FFC);
|
||||
_Settings->SaveDword(Game_RDRamSize,SaveRDRAMSize);
|
||||
g_Settings->SaveDword(Game_RDRamSize,SaveRDRAMSize);
|
||||
unzReadCurrentFile(file,&NextVITimer,sizeof(NextVITimer));
|
||||
unzReadCurrentFile(file,&m_Reg.m_PROGRAM_COUNTER,sizeof(m_Reg.m_PROGRAM_COUNTER));
|
||||
unzReadCurrentFile(file,m_Reg.m_GPR,sizeof(__int64)*32);
|
||||
|
@ -1451,9 +1451,9 @@ bool CN64System::LoadState(LPCSTR FileName) {
|
|||
if (result == IDNO) { return FALSE; }
|
||||
}
|
||||
Reset(false,true);
|
||||
m_MMU_VM.UnProtectMemory(0x80000000,0x80000000 + _Settings->LoadDword(Game_RDRamSize) - 4);
|
||||
m_MMU_VM.UnProtectMemory(0x80000000,0x80000000 + g_Settings->LoadDword(Game_RDRamSize) - 4);
|
||||
m_MMU_VM.UnProtectMemory(0xA4000000,0xA4001FFC);
|
||||
_Settings->SaveDword(Game_RDRamSize,SaveRDRAMSize);
|
||||
g_Settings->SaveDword(Game_RDRamSize,SaveRDRAMSize);
|
||||
|
||||
ReadFile( hSaveFile,&NextVITimer,sizeof(NextVITimer),&dwRead,NULL);
|
||||
ReadFile( hSaveFile,&m_Reg.m_PROGRAM_COUNTER,sizeof(m_Reg.m_PROGRAM_COUNTER),&dwRead,NULL);
|
||||
|
@ -1510,7 +1510,7 @@ bool CN64System::LoadState(LPCSTR FileName) {
|
|||
#endif
|
||||
if (bFastSP() && m_Recomp) { m_Recomp->ResetMemoryStackPos(); }
|
||||
|
||||
if (_Settings->LoadDword(Game_CpuType) == CPU_SyncCores) {
|
||||
if (g_Settings->LoadDword(Game_CpuType) == CPU_SyncCores) {
|
||||
if (m_SyncCPU)
|
||||
{
|
||||
for (int i = 0; i < (sizeof(m_LastSuccessSyncPC)/sizeof(m_LastSuccessSyncPC[0])); i++) {
|
||||
|
|
|
@ -454,14 +454,14 @@ bool CN64Rom::LoadN64Image ( const char * FileLoc, bool LoadBootCodeOnly ) {
|
|||
//this rom
|
||||
void CN64Rom::SaveRomSettingID ( void )
|
||||
{
|
||||
_Settings->SaveString(Game_GameName,m_RomName.c_str());
|
||||
_Settings->SaveString(Game_IniKey,m_RomIdent.c_str());
|
||||
g_Settings->SaveString(Game_GameName,m_RomName.c_str());
|
||||
g_Settings->SaveString(Game_IniKey,m_RomIdent.c_str());
|
||||
}
|
||||
|
||||
void CN64Rom::ClearRomSettingID ( void )
|
||||
{
|
||||
_Settings->SaveString(Game_GameName,"");
|
||||
_Settings->SaveString(Game_IniKey,"");
|
||||
g_Settings->SaveString(Game_GameName,"");
|
||||
g_Settings->SaveString(Game_IniKey,"");
|
||||
}
|
||||
|
||||
void CN64Rom::SetError ( LanguageStringID ErrorMsg ) {
|
||||
|
|
|
@ -1677,7 +1677,7 @@ void CRecompilerOps::DADDIU (void) {
|
|||
void CRecompilerOps::CACHE (void){
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
|
||||
if (_Settings->LoadDword(Game_SMM_Cache) == 0)
|
||||
if (g_Settings->LoadDword(Game_SMM_Cache) == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
extern CNotification * g_Notify;
|
||||
extern CSettings * _Settings;
|
||||
extern CSettings * g_Settings;
|
||||
|
||||
extern CN64System * _System;
|
||||
extern CN64System * _BaseSystem;
|
||||
|
|
|
@ -90,8 +90,8 @@ void CAudioPlugin::Init ( const char * FileName )
|
|||
info.SettingStartRange = FirstAudioSettings;
|
||||
info.MaximumSettings = MaxPluginSetting;
|
||||
info.NoDefault = Default_None;
|
||||
info.DefaultLocation = _Settings->LoadDword(Setting_UseFromRegistry) ? SettingType_Registry : SettingType_CfgFile;
|
||||
info.handle = _Settings;
|
||||
info.DefaultLocation = g_Settings->LoadDword(Setting_UseFromRegistry) ? SettingType_Registry : SettingType_CfgFile;
|
||||
info.handle = g_Settings;
|
||||
info.RegisterSetting = (void (*)(void *,int,int,SettingDataType,SettingType,const char *,const char *, DWORD))CSettings::RegisterSetting;
|
||||
info.GetSetting = (unsigned int (*)( void * handle, int ID ))CSettings::GetSetting;
|
||||
info.GetSettingSz = (const char * (*)( void *, int, char *, int ))CSettings::GetSettingSz;
|
||||
|
@ -100,7 +100,7 @@ void CAudioPlugin::Init ( const char * FileName )
|
|||
info.UseUnregisteredSetting = NULL;
|
||||
|
||||
SetSettingInfo(&info);
|
||||
//_Settings->UnknownSetting_AUDIO = info.UseUnregisteredSetting;
|
||||
//g_Settings->UnknownSetting_AUDIO = info.UseUnregisteredSetting;
|
||||
}
|
||||
|
||||
if (m_PluginInfo.Version >= 0x0102)
|
||||
|
@ -274,7 +274,7 @@ void CAudioPlugin::DacrateChanged (SystemType Type)
|
|||
WriteTraceF(TraceAudio,__FUNCTION__ ": SystemType: %s", Type == SYSTEM_NTSC ? "SYSTEM_NTSC" : "SYSTEM_PAL");
|
||||
|
||||
//DWORD Frequency = _Reg->AI_DACRATE_REG * 30;
|
||||
//DWORD CountsPerSecond = (_Reg->VI_V_SYNC_REG != 0 ? (_Reg->VI_V_SYNC_REG + 1) * _Settings->LoadDword(Game_ViRefreshRate) : 500000) * 60;
|
||||
//DWORD CountsPerSecond = (_Reg->VI_V_SYNC_REG != 0 ? (_Reg->VI_V_SYNC_REG + 1) * g_Settings->LoadDword(Game_ViRefreshRate) : 500000) * 60;
|
||||
m_DacrateChanged(Type);
|
||||
}
|
||||
|
||||
|
|
|
@ -90,8 +90,8 @@ void CControl_Plugin::Init ( const char * FileName )
|
|||
info.SettingStartRange = FirstCtrlSettings;
|
||||
info.MaximumSettings = MaxPluginSetting;
|
||||
info.NoDefault = Default_None;
|
||||
info.DefaultLocation = _Settings->LoadDword(Setting_UseFromRegistry) ? SettingType_Registry : SettingType_CfgFile;
|
||||
info.handle = _Settings;
|
||||
info.DefaultLocation = g_Settings->LoadDword(Setting_UseFromRegistry) ? SettingType_Registry : SettingType_CfgFile;
|
||||
info.handle = g_Settings;
|
||||
info.RegisterSetting = (void (*)(void *,int,int,SettingDataType,SettingType,const char *,const char *, DWORD))CSettings::RegisterSetting;
|
||||
info.GetSetting = (unsigned int (*)( void * handle, int ID ))CSettings::GetSetting;
|
||||
info.GetSettingSz = (const char * (*)( void *, int, char *, int ))CSettings::GetSettingSz;
|
||||
|
@ -100,7 +100,7 @@ void CControl_Plugin::Init ( const char * FileName )
|
|||
info.UseUnregisteredSetting = NULL;
|
||||
|
||||
SetSettingInfo(&info);
|
||||
// _Settings->UnknownSetting_CTRL = info.UseUnregisteredSetting;
|
||||
// g_Settings->UnknownSetting_CTRL = info.UseUnregisteredSetting;
|
||||
}
|
||||
|
||||
if (m_PluginInfo.Version >= 0x0102)
|
||||
|
|
|
@ -126,8 +126,8 @@ void CGfxPlugin::Init ( const char * FileName )
|
|||
info.SettingStartRange = FirstGfxSettings;
|
||||
info.MaximumSettings = MaxPluginSetting;
|
||||
info.NoDefault = Default_None;
|
||||
info.DefaultLocation = _Settings->LoadDword(Setting_UseFromRegistry) ? SettingType_Registry : SettingType_CfgFile;
|
||||
info.handle = _Settings;
|
||||
info.DefaultLocation = g_Settings->LoadDword(Setting_UseFromRegistry) ? SettingType_Registry : SettingType_CfgFile;
|
||||
info.handle = g_Settings;
|
||||
info.RegisterSetting = (void (*)(void *,int,int,SettingDataType,SettingType,const char *,const char *, DWORD))CSettings::RegisterSetting;
|
||||
info.GetSetting = (unsigned int (*)( void * handle, int ID ))CSettings::GetSetting;
|
||||
info.GetSettingSz = (const char * (*)( void *, int, char *, int ))CSettings::GetSettingSz;
|
||||
|
@ -136,7 +136,7 @@ void CGfxPlugin::Init ( const char * FileName )
|
|||
info.UseUnregisteredSetting = NULL;
|
||||
|
||||
SetSettingInfo(&info);
|
||||
// _Settings->UnknownSetting_GFX = info.UseUnregisteredSetting;
|
||||
// g_Settings->UnknownSetting_GFX = info.UseUnregisteredSetting;
|
||||
}
|
||||
|
||||
if (m_PluginInfo.Version >= 0x0104)
|
||||
|
|
|
@ -6,43 +6,43 @@ CPlugins::CPlugins (const stdstr & PluginDir):
|
|||
m_RenderWindow(NULL), m_DummyWindow(NULL)
|
||||
{
|
||||
CreatePlugins();
|
||||
_Settings->RegisterChangeCB(Plugin_RSP_Current,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
_Settings->RegisterChangeCB(Plugin_GFX_Current,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
_Settings->RegisterChangeCB(Plugin_AUDIO_Current,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
_Settings->RegisterChangeCB(Plugin_CONT_Current,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
_Settings->RegisterChangeCB(Plugin_UseHleGfx,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
_Settings->RegisterChangeCB(Plugin_UseHleAudio,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
_Settings->RegisterChangeCB(Game_EditPlugin_Gfx,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
_Settings->RegisterChangeCB(Game_EditPlugin_Audio,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
_Settings->RegisterChangeCB(Game_EditPlugin_Contr,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
_Settings->RegisterChangeCB(Game_EditPlugin_RSP,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
g_Settings->RegisterChangeCB(Plugin_RSP_Current,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
g_Settings->RegisterChangeCB(Plugin_GFX_Current,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
g_Settings->RegisterChangeCB(Plugin_AUDIO_Current,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
g_Settings->RegisterChangeCB(Plugin_CONT_Current,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
g_Settings->RegisterChangeCB(Plugin_UseHleGfx,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
g_Settings->RegisterChangeCB(Plugin_UseHleAudio,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
g_Settings->RegisterChangeCB(Game_EditPlugin_Gfx,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
g_Settings->RegisterChangeCB(Game_EditPlugin_Audio,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
g_Settings->RegisterChangeCB(Game_EditPlugin_Contr,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
g_Settings->RegisterChangeCB(Game_EditPlugin_RSP,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
|
||||
}
|
||||
|
||||
CPlugins::~CPlugins (void) {
|
||||
_Settings->UnregisterChangeCB(Plugin_RSP_Current,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
_Settings->UnregisterChangeCB(Plugin_GFX_Current,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
_Settings->UnregisterChangeCB(Plugin_AUDIO_Current,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
_Settings->UnregisterChangeCB(Plugin_CONT_Current,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
_Settings->UnregisterChangeCB(Plugin_UseHleGfx,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
_Settings->UnregisterChangeCB(Plugin_UseHleAudio,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
_Settings->UnregisterChangeCB(Game_EditPlugin_Gfx,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
_Settings->UnregisterChangeCB(Game_EditPlugin_Audio,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
_Settings->UnregisterChangeCB(Game_EditPlugin_Contr,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
_Settings->UnregisterChangeCB(Game_EditPlugin_RSP,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
g_Settings->UnregisterChangeCB(Plugin_RSP_Current,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
g_Settings->UnregisterChangeCB(Plugin_GFX_Current,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
g_Settings->UnregisterChangeCB(Plugin_AUDIO_Current,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
g_Settings->UnregisterChangeCB(Plugin_CONT_Current,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
g_Settings->UnregisterChangeCB(Plugin_UseHleGfx,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
g_Settings->UnregisterChangeCB(Plugin_UseHleAudio,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
g_Settings->UnregisterChangeCB(Game_EditPlugin_Gfx,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
g_Settings->UnregisterChangeCB(Game_EditPlugin_Audio,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
g_Settings->UnregisterChangeCB(Game_EditPlugin_Contr,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
g_Settings->UnregisterChangeCB(Game_EditPlugin_RSP,this,(CSettings::SettingChangedFunc)PluginChanged);
|
||||
ShutDownPlugins();
|
||||
}
|
||||
|
||||
void CPlugins::PluginChanged ( CPlugins * _this )
|
||||
{
|
||||
bool bGfxChange = _stricmp(_this->m_GfxFile.c_str(),_Settings->LoadString(Game_Plugin_Gfx).c_str()) != 0;
|
||||
bool bAudioChange = _stricmp(_this->m_AudioFile.c_str(),_Settings->LoadString(Game_Plugin_Audio).c_str()) != 0;
|
||||
bool bRspChange = _stricmp(_this->m_RSPFile.c_str(),_Settings->LoadString(Game_Plugin_RSP).c_str()) != 0;
|
||||
bool bContChange = _stricmp(_this->m_ControlFile.c_str(),_Settings->LoadString(Game_Plugin_Controller).c_str()) != 0;
|
||||
bool bGfxChange = _stricmp(_this->m_GfxFile.c_str(),g_Settings->LoadString(Game_Plugin_Gfx).c_str()) != 0;
|
||||
bool bAudioChange = _stricmp(_this->m_AudioFile.c_str(),g_Settings->LoadString(Game_Plugin_Audio).c_str()) != 0;
|
||||
bool bRspChange = _stricmp(_this->m_RSPFile.c_str(),g_Settings->LoadString(Game_Plugin_RSP).c_str()) != 0;
|
||||
bool bContChange = _stricmp(_this->m_ControlFile.c_str(),g_Settings->LoadString(Game_Plugin_Controller).c_str()) != 0;
|
||||
|
||||
if ( bGfxChange || bAudioChange || bRspChange || bContChange )
|
||||
{
|
||||
if (_Settings->LoadBool(GameRunning_CPU_Running) != 0)
|
||||
if (g_Settings->LoadBool(GameRunning_CPU_Running) != 0)
|
||||
{
|
||||
if (_BaseSystem) { _BaseSystem->ExternalEvent(SysEvent_ChangePlugins); }
|
||||
} else {
|
||||
|
@ -89,7 +89,7 @@ void CPlugins::ShutDownPlugins( void ) {
|
|||
delete m_Gfx;
|
||||
WriteTrace(TraceGfxPlugin,"deconstructor: Done");
|
||||
m_Gfx = NULL;
|
||||
// _Settings->UnknownSetting_GFX = NULL;
|
||||
// g_Settings->UnknownSetting_GFX = NULL;
|
||||
}
|
||||
if (m_Audio) {
|
||||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 5");
|
||||
|
@ -99,7 +99,7 @@ void CPlugins::ShutDownPlugins( void ) {
|
|||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 7");
|
||||
m_Audio = NULL;
|
||||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 8");
|
||||
// _Settings->UnknownSetting_AUDIO = NULL;
|
||||
// g_Settings->UnknownSetting_AUDIO = NULL;
|
||||
}
|
||||
if (m_RSP) {
|
||||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 9");
|
||||
|
@ -109,7 +109,7 @@ void CPlugins::ShutDownPlugins( void ) {
|
|||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 11");
|
||||
m_RSP = NULL;
|
||||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 12");
|
||||
// _Settings->UnknownSetting_RSP = NULL;
|
||||
// g_Settings->UnknownSetting_RSP = NULL;
|
||||
}
|
||||
if (m_Control) {
|
||||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 12");
|
||||
|
@ -119,7 +119,7 @@ void CPlugins::ShutDownPlugins( void ) {
|
|||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 14");
|
||||
m_Control = NULL;
|
||||
WriteTrace(TraceDebug,"CPlugins::ShutDownPlugins 15");
|
||||
// _Settings->UnknownSetting_CTRL = NULL;
|
||||
// g_Settings->UnknownSetting_CTRL = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -197,7 +197,7 @@ void CPlugins::Reset ( PLUGIN_TYPE Type )
|
|||
m_RSP = NULL;
|
||||
}
|
||||
{
|
||||
m_RSPFile = _Settings->LoadString(Plugin_RSP_Current);
|
||||
m_RSPFile = g_Settings->LoadString(Plugin_RSP_Current);
|
||||
CPath RspPluginFile(m_PluginDir.c_str(),m_RSPFile.c_str());
|
||||
WriteTraceF(TraceRSP,"Loading (%s): Starting",(LPCTSTR)RspPluginFile);
|
||||
m_RSP = new CRSP_Plugin(RspPluginFile);
|
||||
|
@ -205,7 +205,7 @@ void CPlugins::Reset ( PLUGIN_TYPE Type )
|
|||
|
||||
}
|
||||
WriteTraceF(TraceRSP,"Current Ver: %s",m_RSP->PluginName().c_str());
|
||||
_Settings->SaveString(Plugin_RSP_CurVer,m_RSP->PluginName().c_str());
|
||||
g_Settings->SaveString(Plugin_RSP_CurVer,m_RSP->PluginName().c_str());
|
||||
|
||||
//Enable debugger
|
||||
if (m_RSP->EnableDebugging)
|
||||
|
@ -227,14 +227,14 @@ void CPlugins::Reset ( PLUGIN_TYPE Type )
|
|||
m_Gfx = NULL;
|
||||
}
|
||||
{
|
||||
m_GfxFile = _Settings->LoadString(Game_Plugin_Gfx);
|
||||
m_GfxFile = g_Settings->LoadString(Game_Plugin_Gfx);
|
||||
CPath GfxPluginFile(m_PluginDir.c_str(),m_GfxFile.c_str());
|
||||
WriteTraceF(TraceGfxPlugin,"Loading (%s): Starting",(LPCTSTR)GfxPluginFile);
|
||||
m_Gfx = new CGfxPlugin(GfxPluginFile);
|
||||
WriteTrace(TraceGfxPlugin,"Loading Done");
|
||||
}
|
||||
WriteTraceF(TraceGfxPlugin,"Current Ver: %s",m_Gfx->PluginName().c_str());
|
||||
_Settings->SaveString(Plugin_GFX_CurVer,m_Gfx->PluginName().c_str());
|
||||
g_Settings->SaveString(Plugin_GFX_CurVer,m_Gfx->PluginName().c_str());
|
||||
break;
|
||||
case PLUGIN_TYPE_AUDIO:
|
||||
if (m_Audio) {
|
||||
|
@ -247,12 +247,12 @@ void CPlugins::Reset ( PLUGIN_TYPE Type )
|
|||
m_Audio = NULL;
|
||||
}
|
||||
{
|
||||
m_AudioFile = _Settings->LoadString(Game_Plugin_Audio);
|
||||
m_AudioFile = g_Settings->LoadString(Game_Plugin_Audio);
|
||||
CPath PluginFile(m_PluginDir.c_str(),m_AudioFile.c_str());
|
||||
WriteTraceF(TraceDebug,"Loading (%s): Starting",(LPCTSTR)PluginFile);
|
||||
m_Audio = new CAudioPlugin(PluginFile);
|
||||
WriteTrace(TraceDebug,"Loading Done");
|
||||
_Settings->SaveString(Plugin_AUDIO_CurVer,m_Audio->PluginName().c_str());
|
||||
g_Settings->SaveString(Plugin_AUDIO_CurVer,m_Audio->PluginName().c_str());
|
||||
}
|
||||
break;
|
||||
case PLUGIN_TYPE_CONTROLLER:
|
||||
|
@ -266,12 +266,12 @@ void CPlugins::Reset ( PLUGIN_TYPE Type )
|
|||
m_Control = NULL;
|
||||
}
|
||||
{
|
||||
m_ControlFile = _Settings->LoadString(Game_Plugin_Controller);
|
||||
m_ControlFile = g_Settings->LoadString(Game_Plugin_Controller);
|
||||
CPath PluginFile(m_PluginDir.c_str(),m_ControlFile.c_str());
|
||||
WriteTraceF(TraceDebug,"Loading (%s): Starting",(LPCTSTR)PluginFile);
|
||||
m_Control = new CControl_Plugin(PluginFile);
|
||||
WriteTrace(TraceDebug,"Loading Done");
|
||||
_Settings->SaveString(Plugin_CONT_CurVer,m_Control->PluginName().c_str());
|
||||
g_Settings->SaveString(Plugin_CONT_CurVer,m_Control->PluginName().c_str());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -343,8 +343,8 @@ void CPlugins::CreatePluginDir ( const stdstr & DstDir ) const {
|
|||
bool CPlugins::CopyPlugins ( const stdstr & DstDir ) const
|
||||
{
|
||||
//Copy GFX Plugin
|
||||
CPath srcGfxPlugin(m_PluginDir.c_str(),_Settings->LoadString(Plugin_GFX_Current).c_str());
|
||||
CPath dstGfxPlugin(DstDir.c_str(),_Settings->LoadString(Plugin_GFX_Current).c_str());
|
||||
CPath srcGfxPlugin(m_PluginDir.c_str(),g_Settings->LoadString(Plugin_GFX_Current).c_str());
|
||||
CPath dstGfxPlugin(DstDir.c_str(),g_Settings->LoadString(Plugin_GFX_Current).c_str());
|
||||
|
||||
if (CopyFile(srcGfxPlugin,dstGfxPlugin,false) == 0)
|
||||
{
|
||||
|
@ -356,8 +356,8 @@ bool CPlugins::CopyPlugins ( const stdstr & DstDir ) const
|
|||
}
|
||||
|
||||
//Copy m_Audio Plugin
|
||||
CPath srcAudioPlugin(m_PluginDir.c_str(),_Settings->LoadString(Plugin_AUDIO_Current).c_str());
|
||||
CPath dstAudioPlugin(DstDir.c_str(), _Settings->LoadString(Plugin_AUDIO_Current).c_str());
|
||||
CPath srcAudioPlugin(m_PluginDir.c_str(),g_Settings->LoadString(Plugin_AUDIO_Current).c_str());
|
||||
CPath dstAudioPlugin(DstDir.c_str(), g_Settings->LoadString(Plugin_AUDIO_Current).c_str());
|
||||
if (CopyFile(srcAudioPlugin,dstAudioPlugin,false) == 0) {
|
||||
if (GetLastError() == ERROR_PATH_NOT_FOUND) { dstAudioPlugin.CreateDirectory(); }
|
||||
if (!CopyFile(srcAudioPlugin,dstAudioPlugin,false))
|
||||
|
@ -367,8 +367,8 @@ bool CPlugins::CopyPlugins ( const stdstr & DstDir ) const
|
|||
}
|
||||
|
||||
//Copy m_RSP Plugin
|
||||
CPath srcRSPPlugin(m_PluginDir.c_str(), _Settings->LoadString(Plugin_RSP_Current).c_str());
|
||||
CPath dstRSPPlugin(DstDir.c_str(),_Settings->LoadString(Plugin_RSP_Current).c_str());
|
||||
CPath srcRSPPlugin(m_PluginDir.c_str(), g_Settings->LoadString(Plugin_RSP_Current).c_str());
|
||||
CPath dstRSPPlugin(DstDir.c_str(),g_Settings->LoadString(Plugin_RSP_Current).c_str());
|
||||
if (CopyFile(srcRSPPlugin,dstRSPPlugin,false) == 0) {
|
||||
if (GetLastError() == ERROR_PATH_NOT_FOUND) { dstRSPPlugin.CreateDirectory(); }
|
||||
if (!CopyFile(srcRSPPlugin,dstRSPPlugin,false))
|
||||
|
@ -378,8 +378,8 @@ bool CPlugins::CopyPlugins ( const stdstr & DstDir ) const
|
|||
}
|
||||
|
||||
//Copy Controller Plugin
|
||||
CPath srcContPlugin(m_PluginDir.c_str(), _Settings->LoadString(Plugin_CONT_Current).c_str());
|
||||
CPath dstContPlugin(DstDir.c_str(),_Settings->LoadString(Plugin_CONT_Current).c_str());
|
||||
CPath srcContPlugin(m_PluginDir.c_str(), g_Settings->LoadString(Plugin_CONT_Current).c_str());
|
||||
CPath dstContPlugin(DstDir.c_str(),g_Settings->LoadString(Plugin_CONT_Current).c_str());
|
||||
if (!srcContPlugin.CopyTo(dstContPlugin))
|
||||
{
|
||||
if (GetLastError() == ERROR_PATH_NOT_FOUND) { dstContPlugin.CreateDirectory(); }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
CPluginList::CPluginList(bool bAutoFill /* = true */) :
|
||||
m_PluginDir(_Settings->LoadString(Directory_Plugin),"")
|
||||
m_PluginDir(g_Settings->LoadString(Directory_Plugin),"")
|
||||
{
|
||||
if (bAutoFill)
|
||||
{
|
||||
|
@ -136,7 +136,7 @@ bool CPluginList::ValidPluginVersion ( PLUGIN_INFO & PluginInfo ) {
|
|||
|
||||
#ifdef toremove
|
||||
CPluginList::CPluginList (CSettings * Settings) {
|
||||
_Settings = Settings;
|
||||
g_Settings = Settings;
|
||||
}
|
||||
|
||||
#include <windows.h>
|
||||
|
@ -235,7 +235,7 @@ PluginList CPluginList::GetPluginList (void) {
|
|||
//Create search path for plugins
|
||||
Notify().BreakPoint(__FILE__,__LINE__);
|
||||
/* char SearchDir[300] = "";
|
||||
_Settings->LoadString(PluginDirectory,SearchDir,sizeof(SearchDir));
|
||||
g_Settings->LoadString(PluginDirectory,SearchDir,sizeof(SearchDir));
|
||||
|
||||
//recursively scan search dir, and add files in that dir
|
||||
AddPluginFromDir(SearchDir,SearchDir,&Plugins);
|
||||
|
|
|
@ -68,8 +68,8 @@ CRSP_Plugin::CRSP_Plugin ( const char * FileName) {
|
|||
info.SettingStartRange = FirstRSPSettings;
|
||||
info.MaximumSettings = MaxPluginSetting;
|
||||
info.NoDefault = Default_None;
|
||||
info.DefaultLocation = _Settings->LoadDword(Setting_UseFromRegistry) ? SettingType_Registry : SettingType_CfgFile;
|
||||
info.handle = _Settings;
|
||||
info.DefaultLocation = g_Settings->LoadDword(Setting_UseFromRegistry) ? SettingType_Registry : SettingType_CfgFile;
|
||||
info.handle = g_Settings;
|
||||
info.RegisterSetting = (void (*)(void *,int,int,SettingDataType,SettingType,const char *,const char *, DWORD))CSettings::RegisterSetting;
|
||||
info.GetSetting = (unsigned int (*)( void * handle, int ID ))CSettings::GetSetting;
|
||||
info.GetSettingSz = (const char * (*)( void *, int, char *, int ))CSettings::GetSettingSz;
|
||||
|
@ -78,7 +78,7 @@ CRSP_Plugin::CRSP_Plugin ( const char * FileName) {
|
|||
info.UseUnregisteredSetting = NULL;
|
||||
|
||||
SetSettingInfo(&info);
|
||||
//_Settings->UnknownSetting_RSP = info.UseUnregisteredSetting;
|
||||
//g_Settings->UnknownSetting_RSP = info.UseUnregisteredSetting;
|
||||
}
|
||||
|
||||
if (m_PluginInfo.Version >= 0x0102)
|
||||
|
|
|
@ -12,10 +12,10 @@ CDebugSettings::CDebugSettings()
|
|||
m_RefCount += 1;
|
||||
if (m_RefCount == 1)
|
||||
{
|
||||
_Settings->RegisterChangeCB(Debugger_Enabled,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Debugger_GenerateLogFiles,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Debugger_ShowTLBMisses,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Debugger_ShowDivByZero,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Debugger_Enabled,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Debugger_GenerateLogFiles,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Debugger_ShowTLBMisses,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Debugger_ShowDivByZero,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
|
||||
RefreshSettings();
|
||||
}
|
||||
|
@ -26,17 +26,17 @@ CDebugSettings::~CDebugSettings()
|
|||
m_RefCount -= 1;
|
||||
if (m_RefCount == 0)
|
||||
{
|
||||
_Settings->UnregisterChangeCB(Debugger_Enabled,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Debugger_GenerateLogFiles,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Debugger_ShowTLBMisses,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Debugger_ShowDivByZero,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Debugger_Enabled,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Debugger_GenerateLogFiles,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Debugger_ShowTLBMisses,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Debugger_ShowDivByZero,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
}
|
||||
}
|
||||
|
||||
void CDebugSettings::RefreshSettings()
|
||||
{
|
||||
m_bHaveDebugger = _Settings->LoadBool(Debugger_Enabled);
|
||||
m_bLogX86Code = m_bHaveDebugger && _Settings->LoadBool(Debugger_GenerateLogFiles);
|
||||
m_bShowTLBMisses = m_bHaveDebugger && _Settings->LoadBool(Debugger_ShowTLBMisses);
|
||||
m_bShowDivByZero = m_bHaveDebugger && _Settings->LoadBool(Debugger_ShowDivByZero);
|
||||
m_bHaveDebugger = g_Settings->LoadBool(Debugger_Enabled);
|
||||
m_bLogX86Code = m_bHaveDebugger && g_Settings->LoadBool(Debugger_GenerateLogFiles);
|
||||
m_bShowTLBMisses = m_bHaveDebugger && g_Settings->LoadBool(Debugger_ShowTLBMisses);
|
||||
m_bShowDivByZero = m_bHaveDebugger && g_Settings->LoadBool(Debugger_ShowDivByZero);
|
||||
}
|
||||
|
|
|
@ -19,21 +19,21 @@ bool CGameSettings::m_RspAudioSignal;
|
|||
CGameSettings::CGameSettings()
|
||||
{
|
||||
m_RefCount += 1;
|
||||
if (_Settings && !m_Registered)
|
||||
if (g_Settings && !m_Registered)
|
||||
{
|
||||
m_Registered = true;
|
||||
_Settings->RegisterChangeCB(Game_UseTlb,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_ViRefreshRate,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_AiCountPerBytes,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_CounterFactor,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_RDRamSize,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_DelaySI,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_DelayDP,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_FixedAudio,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_SyncViaAudio,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_32Bit,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_FastSP,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_RspAudioSignal,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_UseTlb,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_ViRefreshRate,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_AiCountPerBytes,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_CounterFactor,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_RDRamSize,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_DelaySI,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_DelayDP,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_FixedAudio,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_SyncViaAudio,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_32Bit,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_FastSP,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_RspAudioSignal,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
|
||||
RefreshSettings();
|
||||
}
|
||||
|
@ -42,20 +42,20 @@ CGameSettings::CGameSettings()
|
|||
CGameSettings::~CGameSettings()
|
||||
{
|
||||
m_RefCount -= 1;
|
||||
if (_Settings && m_Registered && m_RefCount == 0)
|
||||
if (g_Settings && m_Registered && m_RefCount == 0)
|
||||
{
|
||||
_Settings->UnregisterChangeCB(Game_UseTlb,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_ViRefreshRate,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_AiCountPerBytes,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_CounterFactor,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_RDRamSize,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_DelaySI,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_DelayDP,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_FixedAudio,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_SyncViaAudio,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_32Bit,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_FastSP,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_RspAudioSignal,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_UseTlb,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_ViRefreshRate,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_AiCountPerBytes,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_CounterFactor,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_RDRamSize,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_DelaySI,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_DelayDP,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_FixedAudio,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_SyncViaAudio,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_32Bit,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_FastSP,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_RspAudioSignal,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
|
||||
m_Registered = false;
|
||||
}
|
||||
|
@ -63,16 +63,16 @@ CGameSettings::~CGameSettings()
|
|||
|
||||
void CGameSettings::RefreshSettings()
|
||||
{
|
||||
m_bUseTlb = _Settings->LoadBool(Game_UseTlb);
|
||||
m_ViRefreshRate = _Settings->LoadDword(Game_ViRefreshRate);
|
||||
m_AiCountPerBytes = _Settings->LoadDword(Game_AiCountPerBytes);
|
||||
m_CountPerOp = _Settings->LoadDword(Game_CounterFactor);
|
||||
m_RdramSize = _Settings->LoadDword(Game_RDRamSize);
|
||||
m_DelaySI = _Settings->LoadBool(Game_DelaySI);
|
||||
m_DelayDP = _Settings->LoadBool(Game_DelayDP);
|
||||
m_bFixedAudio = _Settings->LoadBool(Game_FixedAudio);
|
||||
m_bSyncToAudio = m_bFixedAudio ? _Settings->LoadBool(Game_SyncViaAudio) : false;
|
||||
m_b32Bit = _Settings->LoadBool(Game_32Bit);
|
||||
m_bFastSP = _Settings->LoadBool(Game_FastSP);
|
||||
m_RspAudioSignal = _Settings->LoadBool(Game_RspAudioSignal);
|
||||
m_bUseTlb = g_Settings->LoadBool(Game_UseTlb);
|
||||
m_ViRefreshRate = g_Settings->LoadDword(Game_ViRefreshRate);
|
||||
m_AiCountPerBytes = g_Settings->LoadDword(Game_AiCountPerBytes);
|
||||
m_CountPerOp = g_Settings->LoadDword(Game_CounterFactor);
|
||||
m_RdramSize = g_Settings->LoadDword(Game_RDRamSize);
|
||||
m_DelaySI = g_Settings->LoadBool(Game_DelaySI);
|
||||
m_DelayDP = g_Settings->LoadBool(Game_DelayDP);
|
||||
m_bFixedAudio = g_Settings->LoadBool(Game_FixedAudio);
|
||||
m_bSyncToAudio = m_bFixedAudio ? g_Settings->LoadBool(Game_SyncViaAudio) : false;
|
||||
m_b32Bit = g_Settings->LoadBool(Game_32Bit);
|
||||
m_bFastSP = g_Settings->LoadBool(Game_FastSP);
|
||||
m_RspAudioSignal = g_Settings->LoadBool(Game_RspAudioSignal);
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@ CGuiSettings::CGuiSettings()
|
|||
m_RefCount += 1;
|
||||
if (m_RefCount == 1)
|
||||
{
|
||||
_Settings->RegisterChangeCB(GameRunning_CPU_Running,NULL,RefreshSettings);
|
||||
_Settings->RegisterChangeCB(Setting_AutoSleep,NULL,RefreshSettings);
|
||||
g_Settings->RegisterChangeCB(GameRunning_CPU_Running,NULL,RefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Setting_AutoSleep,NULL,RefreshSettings);
|
||||
RefreshSettings(NULL);
|
||||
}
|
||||
}
|
||||
|
@ -20,14 +20,14 @@ CGuiSettings::~CGuiSettings()
|
|||
m_RefCount -= 1;
|
||||
if (m_RefCount == 0)
|
||||
{
|
||||
_Settings->UnregisterChangeCB(GameRunning_CPU_Running,NULL,RefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Setting_AutoSleep,NULL,RefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(GameRunning_CPU_Running,NULL,RefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Setting_AutoSleep,NULL,RefreshSettings);
|
||||
}
|
||||
}
|
||||
|
||||
void CGuiSettings::RefreshSettings(void *)
|
||||
{
|
||||
m_bCPURunning = _Settings->LoadBool(GameRunning_CPU_Running);
|
||||
m_bAutoSleep = _Settings->LoadBool(Setting_AutoSleep);
|
||||
m_bCPURunning = g_Settings->LoadBool(GameRunning_CPU_Running);
|
||||
m_bAutoSleep = g_Settings->LoadBool(Setting_AutoSleep);
|
||||
}
|
||||
|
||||
|
|
|
@ -14,14 +14,14 @@ CN64SystemSettings::CN64SystemSettings()
|
|||
m_RefCount += 1;
|
||||
if (m_RefCount == 1)
|
||||
{
|
||||
_Settings->RegisterChangeCB(UserInterface_BasicMode,NULL,RefreshSettings);
|
||||
_Settings->RegisterChangeCB(UserInterface_ShowCPUPer,NULL,RefreshSettings);
|
||||
_Settings->RegisterChangeCB(UserInterface_DisplayFrameRate,NULL,RefreshSettings);
|
||||
g_Settings->RegisterChangeCB(UserInterface_BasicMode,NULL,RefreshSettings);
|
||||
g_Settings->RegisterChangeCB(UserInterface_ShowCPUPer,NULL,RefreshSettings);
|
||||
g_Settings->RegisterChangeCB(UserInterface_DisplayFrameRate,NULL,RefreshSettings);
|
||||
|
||||
_Settings->RegisterChangeCB(Debugger_ProfileCode,NULL,RefreshSettings);
|
||||
_Settings->RegisterChangeCB(Debugger_ShowDListAListCount,NULL,RefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Debugger_ProfileCode,NULL,RefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Debugger_ShowDListAListCount,NULL,RefreshSettings);
|
||||
|
||||
_Settings->RegisterChangeCB(GameRunning_LimitFPS,NULL,RefreshSettings);
|
||||
g_Settings->RegisterChangeCB(GameRunning_LimitFPS,NULL,RefreshSettings);
|
||||
|
||||
RefreshSettings(NULL);
|
||||
}
|
||||
|
@ -32,24 +32,24 @@ CN64SystemSettings::~CN64SystemSettings()
|
|||
m_RefCount -= 1;
|
||||
if (m_RefCount == 0)
|
||||
{
|
||||
_Settings->UnregisterChangeCB(UserInterface_BasicMode,NULL,RefreshSettings);
|
||||
_Settings->UnregisterChangeCB(UserInterface_DisplayFrameRate,NULL,RefreshSettings);
|
||||
_Settings->UnregisterChangeCB(UserInterface_ShowCPUPer,NULL,RefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(UserInterface_BasicMode,NULL,RefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(UserInterface_DisplayFrameRate,NULL,RefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(UserInterface_ShowCPUPer,NULL,RefreshSettings);
|
||||
|
||||
_Settings->UnregisterChangeCB(Debugger_ProfileCode,NULL,RefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Debugger_ShowDListAListCount,NULL,RefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Debugger_ProfileCode,NULL,RefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Debugger_ShowDListAListCount,NULL,RefreshSettings);
|
||||
|
||||
_Settings->UnregisterChangeCB(GameRunning_LimitFPS,NULL,RefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(GameRunning_LimitFPS,NULL,RefreshSettings);
|
||||
}
|
||||
}
|
||||
|
||||
void CN64SystemSettings::RefreshSettings(void *)
|
||||
{
|
||||
m_bBasicMode = _Settings->LoadBool(UserInterface_BasicMode);
|
||||
m_bDisplayFrameRate = _Settings->LoadBool(UserInterface_DisplayFrameRate);
|
||||
m_bBasicMode = g_Settings->LoadBool(UserInterface_BasicMode);
|
||||
m_bDisplayFrameRate = g_Settings->LoadBool(UserInterface_DisplayFrameRate);
|
||||
|
||||
m_bShowCPUPer = _Settings->LoadBool(UserInterface_ShowCPUPer);
|
||||
m_bProfiling = _Settings->LoadBool(Debugger_ProfileCode);
|
||||
m_bShowDListAListCount = _Settings->LoadBool(Debugger_ShowDListAListCount);
|
||||
m_bLimitFPS = _Settings->LoadBool(GameRunning_LimitFPS);
|
||||
m_bShowCPUPer = g_Settings->LoadBool(UserInterface_ShowCPUPer);
|
||||
m_bProfiling = g_Settings->LoadBool(Debugger_ProfileCode);
|
||||
m_bShowDListAListCount = g_Settings->LoadBool(Debugger_ShowDListAListCount);
|
||||
m_bLimitFPS = g_Settings->LoadBool(GameRunning_LimitFPS);
|
||||
}
|
||||
|
|
|
@ -4,19 +4,19 @@ bool CNotificationSettings::m_bInFullScreen = false;
|
|||
|
||||
CNotificationSettings::CNotificationSettings()
|
||||
{
|
||||
_Settings->RegisterChangeCB(UserInterface_InFullScreen,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(UserInterface_InFullScreen,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
RefreshSettings();
|
||||
}
|
||||
|
||||
CNotificationSettings::~CNotificationSettings()
|
||||
{
|
||||
if (_Settings)
|
||||
if (g_Settings)
|
||||
{
|
||||
_Settings->UnregisterChangeCB(UserInterface_InFullScreen,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(UserInterface_InFullScreen,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
}
|
||||
}
|
||||
|
||||
void CNotificationSettings::RefreshSettings()
|
||||
{
|
||||
m_bInFullScreen = _Settings->LoadBool(UserInterface_InFullScreen);
|
||||
m_bInFullScreen = g_Settings->LoadBool(UserInterface_InFullScreen);
|
||||
}
|
||||
|
|
|
@ -21,19 +21,19 @@ CRecompilerSettings::CRecompilerSettings()
|
|||
m_RefCount += 1;
|
||||
if (m_RefCount == 1)
|
||||
{
|
||||
_Settings->RegisterChangeCB(Game_SMM_StoreInstruc,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_SMM_Protect,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_SMM_ValidFunc,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_SMM_PIDMA,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_SMM_TLB,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_RegCache,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_BlockLinking,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_FuncLookupMode,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Debugger_ShowRecompMemSize,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Debugger_ProfileCode,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_LoadRomToMemory,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_32Bit,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->RegisterChangeCB(Game_FastSP,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_SMM_StoreInstruc,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_SMM_Protect,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_SMM_ValidFunc,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_SMM_PIDMA,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_SMM_TLB,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_RegCache,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_BlockLinking,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_FuncLookupMode,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Debugger_ShowRecompMemSize,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Debugger_ProfileCode,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_LoadRomToMemory,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_32Bit,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Game_FastSP,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
|
||||
RefreshSettings();
|
||||
}
|
||||
|
@ -44,36 +44,36 @@ CRecompilerSettings::~CRecompilerSettings()
|
|||
m_RefCount -= 1;
|
||||
if (m_RefCount == 0)
|
||||
{
|
||||
_Settings->UnregisterChangeCB(Game_SMM_StoreInstruc,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_SMM_Protect,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_SMM_ValidFunc,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_SMM_PIDMA,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_SMM_TLB,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_RegCache,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_BlockLinking,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_FuncLookupMode,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Debugger_ShowRecompMemSize,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Debugger_ProfileCode,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_LoadRomToMemory,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_32Bit,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
_Settings->UnregisterChangeCB(Game_FastSP,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_SMM_StoreInstruc,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_SMM_Protect,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_SMM_ValidFunc,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_SMM_PIDMA,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_SMM_TLB,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_RegCache,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_BlockLinking,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_FuncLookupMode,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Debugger_ShowRecompMemSize,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Debugger_ProfileCode,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_LoadRomToMemory,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_32Bit,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_FastSP,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
|
||||
}
|
||||
}
|
||||
|
||||
void CRecompilerSettings::RefreshSettings()
|
||||
{
|
||||
m_bSMM_StoreInstruc = false /*_Settings->LoadBool(Game_SMM_StoreInstruc)*/;
|
||||
m_bSMM_Protect = _Settings->LoadBool(Game_SMM_Protect);
|
||||
m_bSMM_ValidFunc = _Settings->LoadBool(Game_SMM_ValidFunc);
|
||||
m_bSMM_PIDMA = _Settings->LoadBool(Game_SMM_PIDMA);
|
||||
m_bSMM_TLB = _Settings->LoadBool(Game_SMM_TLB);
|
||||
m_bShowRecompMemSize = _Settings->LoadBool(Debugger_ShowRecompMemSize);
|
||||
m_bProfiling = _Settings->LoadBool(Debugger_ProfileCode);
|
||||
m_bRomInMemory = _Settings->LoadBool(Game_LoadRomToMemory);
|
||||
m_bFastSP = _Settings->LoadBool(Game_FastSP);
|
||||
m_b32Bit = _Settings->LoadBool(Game_32Bit);
|
||||
m_bSMM_StoreInstruc = false /*g_Settings->LoadBool(Game_SMM_StoreInstruc)*/;
|
||||
m_bSMM_Protect = g_Settings->LoadBool(Game_SMM_Protect);
|
||||
m_bSMM_ValidFunc = g_Settings->LoadBool(Game_SMM_ValidFunc);
|
||||
m_bSMM_PIDMA = g_Settings->LoadBool(Game_SMM_PIDMA);
|
||||
m_bSMM_TLB = g_Settings->LoadBool(Game_SMM_TLB);
|
||||
m_bShowRecompMemSize = g_Settings->LoadBool(Debugger_ShowRecompMemSize);
|
||||
m_bProfiling = g_Settings->LoadBool(Debugger_ProfileCode);
|
||||
m_bRomInMemory = g_Settings->LoadBool(Game_LoadRomToMemory);
|
||||
m_bFastSP = g_Settings->LoadBool(Game_FastSP);
|
||||
m_b32Bit = g_Settings->LoadBool(Game_32Bit);
|
||||
|
||||
m_RegCaching = _Settings->LoadBool(Game_RegCache);
|
||||
m_bLinkBlocks = _Settings->LoadBool(Game_BlockLinking);
|
||||
m_LookUpMode = _Settings->LoadDword(Game_FuncLookupMode);
|
||||
m_RegCaching = g_Settings->LoadBool(Game_RegCache);
|
||||
m_bLinkBlocks = g_Settings->LoadBool(Game_BlockLinking);
|
||||
m_LookUpMode = g_Settings->LoadDword(Game_FuncLookupMode);
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ void CSettingTypeApplication::Initilize( const char * /*AppName*/ )
|
|||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
OrigSettingsFile = SettingsFile;
|
||||
if (!_Settings->LoadString(SupportFile_Settings,SettingsFile) && i > 0)
|
||||
if (!g_Settings->LoadString(SupportFile_Settings,SettingsFile) && i > 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ void CSettingTypeApplication::Initilize( const char * /*AppName*/ )
|
|||
}
|
||||
|
||||
m_SettingsIniFile->SetAutoFlush(false);
|
||||
m_UseRegistry = _Settings->LoadBool(Setting_UseFromRegistry);
|
||||
m_UseRegistry = g_Settings->LoadBool(Setting_UseFromRegistry);
|
||||
}
|
||||
|
||||
void CSettingTypeApplication::Flush()
|
||||
|
@ -121,7 +121,7 @@ bool CSettingTypeApplication::Load ( int /*Index*/, bool & Value ) const
|
|||
{
|
||||
Value = m_DefaultValue != 0;
|
||||
} else {
|
||||
_Settings->LoadBool(m_DefaultSetting,Value);
|
||||
g_Settings->LoadBool(m_DefaultSetting,Value);
|
||||
}
|
||||
}
|
||||
return bRes;
|
||||
|
@ -142,7 +142,7 @@ bool CSettingTypeApplication::Load ( int /*Index*/, ULONG & Value ) const
|
|||
{
|
||||
Value = m_DefaultValue;
|
||||
} else {
|
||||
_Settings->LoadDword(m_DefaultSetting,Value);
|
||||
g_Settings->LoadDword(m_DefaultSetting,Value);
|
||||
}
|
||||
}
|
||||
return bRes;
|
||||
|
@ -178,7 +178,7 @@ void CSettingTypeApplication::LoadDefault ( int /*Index*/, bool & Value ) cons
|
|||
{
|
||||
Value = m_DefaultValue != 0;
|
||||
} else {
|
||||
_Settings->LoadBool(m_DefaultSetting,Value);
|
||||
g_Settings->LoadBool(m_DefaultSetting,Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ void CSettingTypeApplication::LoadDefault ( int /*Index*/, ULONG & Value ) cons
|
|||
{
|
||||
Value = m_DefaultValue;
|
||||
} else {
|
||||
_Settings->LoadDword(m_DefaultSetting,Value);
|
||||
g_Settings->LoadDword(m_DefaultSetting,Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ void CSettingTypeApplication::LoadDefault ( int /*Index*/, stdstr & Value ) cons
|
|||
{
|
||||
Value = m_DefaultStr;
|
||||
} else {
|
||||
_Settings->LoadString(m_DefaultSetting,Value);
|
||||
g_Settings->LoadString(m_DefaultSetting,Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,10 +15,10 @@ CSettingTypeCheats::~CSettingTypeCheats ( void )
|
|||
|
||||
void CSettingTypeCheats::Initilize ( void )
|
||||
{
|
||||
m_CheatIniFile = new CIniFile(_Settings->LoadString(SupportFile_Cheats).c_str());
|
||||
m_CheatIniFile = new CIniFile(g_Settings->LoadString(SupportFile_Cheats).c_str());
|
||||
m_CheatIniFile->SetAutoFlush(false);
|
||||
_Settings->RegisterChangeCB(Game_IniKey,NULL,GameChanged);
|
||||
m_SectionIdent = new stdstr(_Settings->LoadString(Game_IniKey));
|
||||
g_Settings->RegisterChangeCB(Game_IniKey,NULL,GameChanged);
|
||||
m_SectionIdent = new stdstr(g_Settings->LoadString(Game_IniKey));
|
||||
GameChanged(NULL);
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ void CSettingTypeCheats::FlushChanges( void )
|
|||
|
||||
void CSettingTypeCheats::GameChanged ( void * /*Data */ )
|
||||
{
|
||||
*m_SectionIdent = _Settings->LoadString(Game_IniKey);
|
||||
*m_SectionIdent = g_Settings->LoadString(Game_IniKey);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -28,12 +28,12 @@ CSettingTypeGame::~CSettingTypeGame()
|
|||
void CSettingTypeGame::Initilize ( void )
|
||||
{
|
||||
UpdateSettings(NULL);
|
||||
_Settings->RegisterChangeCB(Game_IniKey,NULL,UpdateSettings);
|
||||
g_Settings->RegisterChangeCB(Game_IniKey,NULL,UpdateSettings);
|
||||
}
|
||||
|
||||
void CSettingTypeGame::CleanUp ( void )
|
||||
{
|
||||
_Settings->UnregisterChangeCB(Game_IniKey,NULL,UpdateSettings);
|
||||
g_Settings->UnregisterChangeCB(Game_IniKey,NULL,UpdateSettings);
|
||||
if (m_SectionIdent)
|
||||
{
|
||||
delete m_SectionIdent;
|
||||
|
@ -48,9 +48,9 @@ LPCSTR CSettingTypeGame::SectionName ( void ) const
|
|||
|
||||
void CSettingTypeGame::UpdateSettings ( void * /*Data */ )
|
||||
{
|
||||
m_RdbEditor = _Settings->LoadBool(Setting_RdbEditor);
|
||||
m_EraseDefaults = _Settings->LoadBool(Setting_EraseGameDefaults);
|
||||
stdstr SectionIdent = _Settings->LoadString(Game_IniKey);
|
||||
m_RdbEditor = g_Settings->LoadBool(Setting_RdbEditor);
|
||||
m_EraseDefaults = g_Settings->LoadBool(Setting_EraseGameDefaults);
|
||||
stdstr SectionIdent = g_Settings->LoadString(Game_IniKey);
|
||||
|
||||
if (m_SectionIdent == NULL)
|
||||
{
|
||||
|
@ -59,21 +59,21 @@ void CSettingTypeGame::UpdateSettings ( void * /*Data */ )
|
|||
if (SectionIdent != *m_SectionIdent)
|
||||
{
|
||||
*m_SectionIdent = SectionIdent;
|
||||
_Settings->SettingTypeChanged(SettingType_GameSetting);
|
||||
_Settings->SettingTypeChanged(SettingType_RomDatabase);
|
||||
g_Settings->SettingTypeChanged(SettingType_GameSetting);
|
||||
g_Settings->SettingTypeChanged(SettingType_RomDatabase);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool CSettingTypeGame::Load ( int Index, bool & Value ) const
|
||||
{
|
||||
if (m_RdbEditor && _Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase)
|
||||
if (m_RdbEditor && g_Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase)
|
||||
{
|
||||
if (_Settings->IndexBasedSetting(m_DefaultSetting))
|
||||
if (g_Settings->IndexBasedSetting(m_DefaultSetting))
|
||||
{
|
||||
return _Settings->LoadBoolIndex(m_DefaultSetting,Index,Value);
|
||||
return g_Settings->LoadBoolIndex(m_DefaultSetting,Index,Value);
|
||||
} else {
|
||||
return _Settings->LoadBool(m_DefaultSetting,Value);
|
||||
return g_Settings->LoadBool(m_DefaultSetting,Value);
|
||||
}
|
||||
}
|
||||
return CSettingTypeApplication::Load(Index,Value);
|
||||
|
@ -81,13 +81,13 @@ bool CSettingTypeGame::Load ( int Index, bool & Value ) const
|
|||
|
||||
bool CSettingTypeGame::Load ( int Index, ULONG & Value ) const
|
||||
{
|
||||
if (m_RdbEditor && _Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase)
|
||||
if (m_RdbEditor && g_Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase)
|
||||
{
|
||||
if (_Settings->IndexBasedSetting(m_DefaultSetting))
|
||||
if (g_Settings->IndexBasedSetting(m_DefaultSetting))
|
||||
{
|
||||
return _Settings->LoadDwordIndex(m_DefaultSetting,Index,Value);
|
||||
return g_Settings->LoadDwordIndex(m_DefaultSetting,Index,Value);
|
||||
} else {
|
||||
return _Settings->LoadDword(m_DefaultSetting,Value);
|
||||
return g_Settings->LoadDword(m_DefaultSetting,Value);
|
||||
}
|
||||
}
|
||||
return CSettingTypeApplication::Load(Index,Value);
|
||||
|
@ -95,13 +95,13 @@ bool CSettingTypeGame::Load ( int Index, ULONG & Value ) const
|
|||
|
||||
bool CSettingTypeGame::Load ( int Index, stdstr & Value ) const
|
||||
{
|
||||
if (m_RdbEditor && _Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase)
|
||||
if (m_RdbEditor && g_Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase)
|
||||
{
|
||||
if (_Settings->IndexBasedSetting(m_DefaultSetting))
|
||||
if (g_Settings->IndexBasedSetting(m_DefaultSetting))
|
||||
{
|
||||
return _Settings->LoadStringIndex(m_DefaultSetting,Index,Value);
|
||||
return g_Settings->LoadStringIndex(m_DefaultSetting,Index,Value);
|
||||
} else {
|
||||
return _Settings->LoadString(m_DefaultSetting,Value);
|
||||
return g_Settings->LoadString(m_DefaultSetting,Value);
|
||||
}
|
||||
}
|
||||
return CSettingTypeApplication::Load(Index,Value);
|
||||
|
@ -110,13 +110,13 @@ bool CSettingTypeGame::Load ( int Index, stdstr & Value ) const
|
|||
//return the default values
|
||||
void CSettingTypeGame::LoadDefault ( int Index, bool & Value ) const
|
||||
{
|
||||
if (m_RdbEditor && _Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase)
|
||||
if (m_RdbEditor && g_Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase)
|
||||
{
|
||||
if (_Settings->IndexBasedSetting(m_DefaultSetting))
|
||||
if (g_Settings->IndexBasedSetting(m_DefaultSetting))
|
||||
{
|
||||
_Settings->LoadDefaultBoolIndex(m_DefaultSetting,Index,Value);
|
||||
g_Settings->LoadDefaultBoolIndex(m_DefaultSetting,Index,Value);
|
||||
} else {
|
||||
_Settings->LoadDefaultBool(m_DefaultSetting,Value);
|
||||
g_Settings->LoadDefaultBool(m_DefaultSetting,Value);
|
||||
}
|
||||
} else {
|
||||
CSettingTypeApplication::LoadDefault(Index,Value);
|
||||
|
@ -125,13 +125,13 @@ void CSettingTypeGame::LoadDefault ( int Index, bool & Value ) const
|
|||
|
||||
void CSettingTypeGame::LoadDefault ( int Index, ULONG & Value ) const
|
||||
{
|
||||
if (m_RdbEditor && _Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase)
|
||||
if (m_RdbEditor && g_Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase)
|
||||
{
|
||||
if (_Settings->IndexBasedSetting(m_DefaultSetting))
|
||||
if (g_Settings->IndexBasedSetting(m_DefaultSetting))
|
||||
{
|
||||
_Settings->LoadDefaultDwordIndex(m_DefaultSetting,Index,Value);
|
||||
g_Settings->LoadDefaultDwordIndex(m_DefaultSetting,Index,Value);
|
||||
} else {
|
||||
_Settings->LoadDefaultDword(m_DefaultSetting,Value);
|
||||
g_Settings->LoadDefaultDword(m_DefaultSetting,Value);
|
||||
}
|
||||
} else {
|
||||
CSettingTypeApplication::LoadDefault(Index,Value);
|
||||
|
@ -140,13 +140,13 @@ void CSettingTypeGame::LoadDefault ( int Index, ULONG & Value ) const
|
|||
|
||||
void CSettingTypeGame::LoadDefault ( int Index, stdstr & Value ) const
|
||||
{
|
||||
if (m_RdbEditor && _Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase)
|
||||
if (m_RdbEditor && g_Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase)
|
||||
{
|
||||
if (_Settings->IndexBasedSetting(m_DefaultSetting))
|
||||
if (g_Settings->IndexBasedSetting(m_DefaultSetting))
|
||||
{
|
||||
_Settings->LoadDefaultStringIndex(m_DefaultSetting,Index,Value);
|
||||
g_Settings->LoadDefaultStringIndex(m_DefaultSetting,Index,Value);
|
||||
} else {
|
||||
_Settings->LoadDefaultString(m_DefaultSetting,Value);
|
||||
g_Settings->LoadDefaultString(m_DefaultSetting,Value);
|
||||
}
|
||||
} else {
|
||||
CSettingTypeApplication::LoadDefault(Index,Value);
|
||||
|
@ -166,13 +166,13 @@ void CSettingTypeGame::Save ( int Index, bool Value )
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (m_RdbEditor && _Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase)
|
||||
if (m_RdbEditor && g_Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase)
|
||||
{
|
||||
if (_Settings->IndexBasedSetting(m_DefaultSetting))
|
||||
if (g_Settings->IndexBasedSetting(m_DefaultSetting))
|
||||
{
|
||||
_Settings->SaveBoolIndex(m_DefaultSetting,Index,Value);
|
||||
g_Settings->SaveBoolIndex(m_DefaultSetting,Index,Value);
|
||||
} else {
|
||||
_Settings->SaveBool(m_DefaultSetting,Value);
|
||||
g_Settings->SaveBool(m_DefaultSetting,Value);
|
||||
}
|
||||
} else {
|
||||
CSettingTypeApplication::Save(Index,Value);
|
||||
|
@ -191,13 +191,13 @@ void CSettingTypeGame::Save ( int Index, ULONG Value )
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (m_RdbEditor && _Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase)
|
||||
if (m_RdbEditor && g_Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase)
|
||||
{
|
||||
if (_Settings->IndexBasedSetting(m_DefaultSetting))
|
||||
if (g_Settings->IndexBasedSetting(m_DefaultSetting))
|
||||
{
|
||||
_Settings->SaveDwordIndex(m_DefaultSetting,Index,Value);
|
||||
g_Settings->SaveDwordIndex(m_DefaultSetting,Index,Value);
|
||||
} else {
|
||||
_Settings->SaveDword(m_DefaultSetting,Value);
|
||||
g_Settings->SaveDword(m_DefaultSetting,Value);
|
||||
}
|
||||
} else {
|
||||
CSettingTypeApplication::Save(Index,Value);
|
||||
|
@ -221,13 +221,13 @@ void CSettingTypeGame::Save ( int Index, const char * Value )
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (m_RdbEditor && _Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase)
|
||||
if (m_RdbEditor && g_Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase)
|
||||
{
|
||||
if (_Settings->IndexBasedSetting(m_DefaultSetting))
|
||||
if (g_Settings->IndexBasedSetting(m_DefaultSetting))
|
||||
{
|
||||
_Settings->SaveStringIndex(m_DefaultSetting,Index,Value);
|
||||
g_Settings->SaveStringIndex(m_DefaultSetting,Index,Value);
|
||||
} else {
|
||||
_Settings->SaveString(m_DefaultSetting,Value);
|
||||
g_Settings->SaveString(m_DefaultSetting,Value);
|
||||
}
|
||||
} else {
|
||||
CSettingTypeApplication::Save(Index,Value);
|
||||
|
@ -236,13 +236,13 @@ void CSettingTypeGame::Save ( int Index, const char * Value )
|
|||
|
||||
void CSettingTypeGame::Delete ( int Index )
|
||||
{
|
||||
if (m_RdbEditor && _Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase)
|
||||
if (m_RdbEditor && g_Settings->GetSettingType(m_DefaultSetting) == SettingType_RomDatabase)
|
||||
{
|
||||
if (_Settings->IndexBasedSetting(m_DefaultSetting))
|
||||
if (g_Settings->IndexBasedSetting(m_DefaultSetting))
|
||||
{
|
||||
_Settings->DeleteSettingIndex(m_DefaultSetting,Index);
|
||||
g_Settings->DeleteSettingIndex(m_DefaultSetting,Index);
|
||||
} else {
|
||||
_Settings->DeleteSetting(m_DefaultSetting);
|
||||
g_Settings->DeleteSetting(m_DefaultSetting);
|
||||
}
|
||||
} else {
|
||||
CSettingTypeApplication::Delete(Index);
|
||||
|
|
|
@ -66,7 +66,7 @@ void CSettingTypeRDBCpuType::LoadDefault ( int /*Index*/, ULONG & Value ) const
|
|||
{
|
||||
Value = m_DefaultValue;
|
||||
} else {
|
||||
_Settings->LoadDword(m_DefaultSetting,Value);
|
||||
g_Settings->LoadDword(m_DefaultSetting,Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ void CSettingTypeRDBOnOff::LoadDefault ( int /*Index*/, bool & Value ) const
|
|||
{
|
||||
Value = m_DefaultValue != 0;
|
||||
} else {
|
||||
_Settings->LoadBool(m_DefaultSetting,Value);
|
||||
g_Settings->LoadBool(m_DefaultSetting,Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ void CSettingTypeRDBSaveChip::LoadDefault ( int /*Index*/, ULONG & Value ) cons
|
|||
{
|
||||
Value = m_DefaultValue;
|
||||
} else {
|
||||
_Settings->LoadDword(m_DefaultSetting,Value);
|
||||
g_Settings->LoadDword(m_DefaultSetting,Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ void CSettingTypeRDBYesNo::LoadDefault ( int /*Index*/, bool & Value ) const
|
|||
{
|
||||
Value = m_DefaultValue != 0;
|
||||
} else {
|
||||
_Settings->LoadBool(m_DefaultSetting,Value);
|
||||
g_Settings->LoadBool(m_DefaultSetting,Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,16 +46,16 @@ CSettingTypeRomDatabase::~CSettingTypeRomDatabase()
|
|||
|
||||
void CSettingTypeRomDatabase::Initilize( void )
|
||||
{
|
||||
m_SettingsIniFile = new CIniFile(_Settings->LoadString(SupportFile_RomDatabase).c_str());
|
||||
m_SettingsIniFile = new CIniFile(g_Settings->LoadString(SupportFile_RomDatabase).c_str());
|
||||
|
||||
_Settings->RegisterChangeCB(Game_IniKey,NULL,GameChanged);
|
||||
g_Settings->RegisterChangeCB(Game_IniKey,NULL,GameChanged);
|
||||
|
||||
m_SectionIdent = new stdstr(_Settings->LoadString(Game_IniKey));
|
||||
m_SectionIdent = new stdstr(g_Settings->LoadString(Game_IniKey));
|
||||
}
|
||||
|
||||
void CSettingTypeRomDatabase::CleanUp( void )
|
||||
{
|
||||
_Settings->UnregisterChangeCB(Game_IniKey,NULL,GameChanged);
|
||||
g_Settings->UnregisterChangeCB(Game_IniKey,NULL,GameChanged);
|
||||
if (m_SettingsIniFile)
|
||||
{
|
||||
delete m_SettingsIniFile;
|
||||
|
@ -72,7 +72,7 @@ void CSettingTypeRomDatabase::GameChanged ( void * /*Data */ )
|
|||
{
|
||||
if (m_SectionIdent)
|
||||
{
|
||||
*m_SectionIdent = _Settings->LoadString(Game_IniKey);
|
||||
*m_SectionIdent = g_Settings->LoadString(Game_IniKey);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ void CSettingTypeRomDatabase::LoadDefault ( int /*Index*/, bool & Value ) const
|
|||
{
|
||||
Value = m_DefaultValue != 0;
|
||||
} else {
|
||||
_Settings->LoadBool(m_DefaultSetting,Value);
|
||||
g_Settings->LoadBool(m_DefaultSetting,Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ void CSettingTypeRomDatabase::LoadDefault ( int /*Index*/, ULONG & Value ) cons
|
|||
{
|
||||
Value = m_DefaultValue;
|
||||
} else {
|
||||
_Settings->LoadDword(m_DefaultSetting,Value);
|
||||
g_Settings->LoadDword(m_DefaultSetting,Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ void CSettingTypeRomDatabase::LoadDefault ( int /*Index*/, stdstr & Value ) cons
|
|||
{
|
||||
Value = m_DefaultStr;
|
||||
} else {
|
||||
_Settings->LoadString(m_DefaultSetting,Value);
|
||||
g_Settings->LoadString(m_DefaultSetting,Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ void CSettingTypeRomDatabase::LoadDefault ( int /*Index*/, stdstr & Value ) cons
|
|||
//Update the settings
|
||||
void CSettingTypeRomDatabase::Save ( int /*Index*/, bool Value )
|
||||
{
|
||||
if (!_Settings->LoadBool(Setting_RdbEditor))
|
||||
if (!g_Settings->LoadBool(Setting_RdbEditor))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ void CSettingTypeRomDatabase::Save ( int /*Index*/, bool Value )
|
|||
|
||||
void CSettingTypeRomDatabase::Save ( int Index, ULONG Value )
|
||||
{
|
||||
if (!_Settings->LoadBool(Setting_RdbEditor))
|
||||
if (!g_Settings->LoadBool(Setting_RdbEditor))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ void CSettingTypeRomDatabase::Save ( int Index, ULONG Value )
|
|||
|
||||
void CSettingTypeRomDatabase::Save ( int /*Index*/, const stdstr & Value )
|
||||
{
|
||||
if (!_Settings->LoadBool(Setting_RdbEditor))
|
||||
if (!g_Settings->LoadBool(Setting_RdbEditor))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ void CSettingTypeRomDatabase::Save ( int /*Index*/, const stdstr & Value )
|
|||
|
||||
void CSettingTypeRomDatabase::Save ( int /*Index*/, const char * Value )
|
||||
{
|
||||
if (!_Settings->LoadBool(Setting_RdbEditor))
|
||||
if (!g_Settings->LoadBool(Setting_RdbEditor))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ void CSettingTypeRomDatabase::Save ( int /*Index*/, const char * Value )
|
|||
|
||||
void CSettingTypeRomDatabase::Delete ( int /*Index*/ )
|
||||
{
|
||||
if (!_Settings->LoadBool(Setting_RdbEditor))
|
||||
if (!g_Settings->LoadBool(Setting_RdbEditor))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -28,8 +28,8 @@ bool CSettingTypeSelectedDirectory::Load ( int /*Index*/, ULONG & /*Value*/ ) co
|
|||
|
||||
bool CSettingTypeSelectedDirectory::Load ( int /*Index*/, stdstr & Value ) const
|
||||
{
|
||||
SettingID DirSettingId = _Settings->LoadBool(m_UseSelected) ? m_SelectedDir : m_InitialDir;
|
||||
return _Settings->LoadString(DirSettingId, Value);
|
||||
SettingID DirSettingId = g_Settings->LoadBool(m_UseSelected) ? m_SelectedDir : m_InitialDir;
|
||||
return g_Settings->LoadString(DirSettingId, Value);
|
||||
}
|
||||
|
||||
//return the default values
|
||||
|
@ -66,8 +66,8 @@ void CSettingTypeSelectedDirectory::Save ( int /*Index*/, const stdstr & /*Value
|
|||
|
||||
void CSettingTypeSelectedDirectory::Save ( int /*Index*/, const char * Value )
|
||||
{
|
||||
_Settings->SaveBool(m_UseSelected,true);
|
||||
_Settings->SaveString(m_SelectedDir,Value);
|
||||
g_Settings->SaveBool(m_UseSelected,true);
|
||||
g_Settings->SaveString(m_SelectedDir,Value);
|
||||
}
|
||||
|
||||
void CSettingTypeSelectedDirectory::Delete( int /*Index*/ )
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "SettingType/SettingsType-TempNumber.h"
|
||||
#include "SettingType/SettingsType-TempBool.h"
|
||||
|
||||
CSettings * _Settings = NULL;
|
||||
CSettings * g_Settings = NULL;
|
||||
|
||||
CSettings::CSettings()
|
||||
{
|
||||
|
@ -455,7 +455,7 @@ bool CSettings::Initilize( const char * AppName )
|
|||
CSettingTypeGame::Initilize();
|
||||
CSettingTypeCheats::Initilize();
|
||||
|
||||
_Settings->SaveString(Setting_ApplicationName,AppName);
|
||||
g_Settings->SaveString(Setting_ApplicationName,AppName);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -110,4 +110,4 @@ private:
|
|||
SETTING_CALLBACK m_Callback;
|
||||
};
|
||||
|
||||
extern CSettings * _Settings;
|
||||
extern CSettings * g_Settings;
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
CFramePerSecond::CFramePerSecond (CNotification * Notification):
|
||||
g_Notify(Notification)
|
||||
{
|
||||
m_iFrameRateType = _Settings->LoadDword(UserInterface_FrameDisplayType);
|
||||
m_ScreenHertz = _Settings->LoadDword(GameRunning_ScreenHertz);
|
||||
_Settings->RegisterChangeCB(UserInterface_FrameDisplayType,this,(CSettings::SettingChangedFunc)FrameRateTypeChanged);
|
||||
_Settings->RegisterChangeCB(GameRunning_ScreenHertz,this,(CSettings::SettingChangedFunc)ScreenHertzChanged);
|
||||
m_iFrameRateType = g_Settings->LoadDword(UserInterface_FrameDisplayType);
|
||||
m_ScreenHertz = g_Settings->LoadDword(GameRunning_ScreenHertz);
|
||||
g_Settings->RegisterChangeCB(UserInterface_FrameDisplayType,this,(CSettings::SettingChangedFunc)FrameRateTypeChanged);
|
||||
g_Settings->RegisterChangeCB(GameRunning_ScreenHertz,this,(CSettings::SettingChangedFunc)ScreenHertzChanged);
|
||||
|
||||
if (m_ScreenHertz == 0)
|
||||
{
|
||||
|
@ -21,8 +21,8 @@ CFramePerSecond::CFramePerSecond (CNotification * Notification):
|
|||
|
||||
CFramePerSecond::~CFramePerSecond()
|
||||
{
|
||||
_Settings->UnregisterChangeCB(UserInterface_FrameDisplayType,this,(CSettings::SettingChangedFunc)FrameRateTypeChanged);
|
||||
_Settings->UnregisterChangeCB(GameRunning_ScreenHertz,this,(CSettings::SettingChangedFunc)ScreenHertzChanged);
|
||||
g_Settings->UnregisterChangeCB(UserInterface_FrameDisplayType,this,(CSettings::SettingChangedFunc)FrameRateTypeChanged);
|
||||
g_Settings->UnregisterChangeCB(GameRunning_ScreenHertz,this,(CSettings::SettingChangedFunc)ScreenHertzChanged);
|
||||
}
|
||||
|
||||
void CFramePerSecond::Reset (bool ClearDisplay) {
|
||||
|
@ -104,13 +104,13 @@ void CFramePerSecond::DisplayViCounter(DWORD FrameRate) {
|
|||
|
||||
void CFramePerSecond::FrameRateTypeChanged (CFramePerSecond * _this)
|
||||
{
|
||||
_this->m_iFrameRateType = _Settings->LoadDword(UserInterface_FrameDisplayType);
|
||||
_this->m_iFrameRateType = g_Settings->LoadDword(UserInterface_FrameDisplayType);
|
||||
_this->Reset(true);
|
||||
}
|
||||
|
||||
void CFramePerSecond::ScreenHertzChanged (CFramePerSecond * _this)
|
||||
{
|
||||
_this->m_ScreenHertz = _Settings->LoadDword(GameRunning_ScreenHertz);
|
||||
_this->m_ScreenHertz = g_Settings->LoadDword(GameRunning_ScreenHertz);
|
||||
_this->Reset(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,10 +32,10 @@ CMainGui::CMainGui (bool bMainWindow, const char * WindowTitle ) :
|
|||
m_bMainWindow(bMainWindow)
|
||||
{
|
||||
m_hacked = false;
|
||||
if (_Settings)
|
||||
if (g_Settings)
|
||||
{
|
||||
if (MD5(_Settings->LoadString(Beta_UserName)).hex_digest() != _Settings->LoadString(Beta_UserNameMD5) ||
|
||||
MD5(_Settings->LoadString(Beta_EmailAddress)).hex_digest() != _Settings->LoadString(Beta_EmailAddressMD5))
|
||||
if (MD5(g_Settings->LoadString(Beta_UserName)).hex_digest() != g_Settings->LoadString(Beta_UserNameMD5) ||
|
||||
MD5(g_Settings->LoadString(Beta_EmailAddress)).hex_digest() != g_Settings->LoadString(Beta_EmailAddressMD5))
|
||||
{
|
||||
m_hacked = true;
|
||||
}
|
||||
|
@ -56,9 +56,9 @@ CMainGui::CMainGui (bool bMainWindow, const char * WindowTitle ) :
|
|||
|
||||
if (m_bMainWindow)
|
||||
{
|
||||
_Settings->RegisterChangeCB(RomBrowser_Enabled,this,(CSettings::SettingChangedFunc)RomBowserEnabledChanged);
|
||||
_Settings->RegisterChangeCB(RomBrowser_ColoumnsChanged,this,(CSettings::SettingChangedFunc)RomBowserColoumnsChanged);
|
||||
_Settings->RegisterChangeCB(RomBrowser_Recursive,this,(CSettings::SettingChangedFunc)RomBrowserRecursiveChanged);
|
||||
g_Settings->RegisterChangeCB(RomBrowser_Enabled,this,(CSettings::SettingChangedFunc)RomBowserEnabledChanged);
|
||||
g_Settings->RegisterChangeCB(RomBrowser_ColoumnsChanged,this,(CSettings::SettingChangedFunc)RomBowserColoumnsChanged);
|
||||
g_Settings->RegisterChangeCB(RomBrowser_Recursive,this,(CSettings::SettingChangedFunc)RomBrowserRecursiveChanged);
|
||||
}
|
||||
|
||||
//if this fails then it has already been created
|
||||
|
@ -72,9 +72,9 @@ CMainGui::~CMainGui (void)
|
|||
WriteTrace(TraceDebug,"CMainGui::~CMainGui - start");
|
||||
if (m_bMainWindow)
|
||||
{
|
||||
_Settings->UnregisterChangeCB(RomBrowser_Enabled,this,(CSettings::SettingChangedFunc)RomBowserEnabledChanged);
|
||||
_Settings->UnregisterChangeCB(RomBrowser_ColoumnsChanged,this,(CSettings::SettingChangedFunc)RomBowserColoumnsChanged);
|
||||
_Settings->UnregisterChangeCB(RomBrowser_Recursive,this,(CSettings::SettingChangedFunc)RomBrowserRecursiveChanged);
|
||||
g_Settings->UnregisterChangeCB(RomBrowser_Enabled,this,(CSettings::SettingChangedFunc)RomBowserEnabledChanged);
|
||||
g_Settings->UnregisterChangeCB(RomBrowser_ColoumnsChanged,this,(CSettings::SettingChangedFunc)RomBowserColoumnsChanged);
|
||||
g_Settings->UnregisterChangeCB(RomBrowser_Recursive,this,(CSettings::SettingChangedFunc)RomBrowserRecursiveChanged);
|
||||
}
|
||||
if (m_hMainWindow)
|
||||
{
|
||||
|
@ -85,7 +85,7 @@ CMainGui::~CMainGui (void)
|
|||
|
||||
void RomBowserEnabledChanged (CMainGui * Gui)
|
||||
{
|
||||
if (Gui && _Settings->LoadBool(RomBrowser_Enabled))
|
||||
if (Gui && g_Settings->LoadBool(RomBrowser_Enabled))
|
||||
{
|
||||
if (!Gui->RomBrowserVisible())
|
||||
{
|
||||
|
@ -168,7 +168,7 @@ DWORD CALLBACK AboutIniBoxProc (WND_HANDLE WndHandle, DWORD uMsg, DWORD wParam,
|
|||
}
|
||||
|
||||
//RDB
|
||||
stdstr IniFile = _Settings->LoadString(SupportFile_RomDatabase).c_str();
|
||||
stdstr IniFile = g_Settings->LoadString(SupportFile_RomDatabase).c_str();
|
||||
SetDlgItemText(hDlg,IDC_RDB,GS(INI_CURRENT_RDB));
|
||||
GetPrivateProfileString("Meta","Author","",String,sizeof(String),IniFile.c_str());
|
||||
if (strlen(String) == 0) {
|
||||
|
@ -194,7 +194,7 @@ DWORD CALLBACK AboutIniBoxProc (WND_HANDLE WndHandle, DWORD uMsg, DWORD wParam,
|
|||
|
||||
//Cheat
|
||||
SetDlgItemText(hDlg,IDC_CHT,GS(INI_CURRENT_CHT));
|
||||
IniFile = _Settings->LoadString(SupportFile_Cheats).c_str();
|
||||
IniFile = g_Settings->LoadString(SupportFile_Cheats).c_str();
|
||||
GetPrivateProfileString("Meta","Author","",String,sizeof(String),IniFile.c_str());
|
||||
if (strlen(String) == 0) {
|
||||
EnableWindow(GetDlgItem(hDlg,IDC_CHT),FALSE);
|
||||
|
@ -219,7 +219,7 @@ DWORD CALLBACK AboutIniBoxProc (WND_HANDLE WndHandle, DWORD uMsg, DWORD wParam,
|
|||
|
||||
//Extended Info
|
||||
SetDlgItemText(hDlg,IDC_RDX,GS(INI_CURRENT_RDX));
|
||||
IniFile = _Settings->LoadString(SupportFile_ExtInfo).c_str();;
|
||||
IniFile = g_Settings->LoadString(SupportFile_ExtInfo).c_str();;
|
||||
GetPrivateProfileString("Meta","Author","",String,sizeof(String),IniFile.c_str());
|
||||
if (strlen(String) == 0) {
|
||||
EnableWindow(GetDlgItem(hDlg,IDC_RDX),FALSE);
|
||||
|
@ -422,15 +422,15 @@ void CMainGui::SaveWindowLoc ( void )
|
|||
if (m_SaveMainWindowPos)
|
||||
{
|
||||
m_SaveMainWindowPos = false;
|
||||
_Settings->SaveDword(UserInterface_MainWindowTop,m_SaveMainWindowTop);
|
||||
_Settings->SaveDword(UserInterface_MainWindowLeft,m_SaveMainWindowLeft);
|
||||
g_Settings->SaveDword(UserInterface_MainWindowTop,m_SaveMainWindowTop);
|
||||
g_Settings->SaveDword(UserInterface_MainWindowLeft,m_SaveMainWindowLeft);
|
||||
}
|
||||
|
||||
if (m_SaveRomBrowserPos)
|
||||
{
|
||||
m_SaveRomBrowserPos = false;
|
||||
_Settings->SaveDword(RomBrowser_Top,m_SaveRomBrowserTop);
|
||||
_Settings->SaveDword(RomBrowser_Left,m_SaveRomBrowserLeft);
|
||||
g_Settings->SaveDword(RomBrowser_Top,m_SaveRomBrowserTop);
|
||||
g_Settings->SaveDword(RomBrowser_Left,m_SaveRomBrowserLeft);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -454,8 +454,8 @@ DWORD CALLBACK CMainGui::MainGui_Proc (WND_HANDLE hWnd, DWORD uMsg, DWORD wParam
|
|||
//Move the Main window to the location last executed from or center the window
|
||||
int X = (GetSystemMetrics( SM_CXSCREEN ) - _this->Width()) / 2;
|
||||
int Y = (GetSystemMetrics( SM_CYSCREEN ) - _this->Height()) / 2;
|
||||
_Settings->LoadDword(UserInterface_MainWindowTop,(DWORD &)Y);
|
||||
_Settings->LoadDword(UserInterface_MainWindowLeft,(DWORD &)X);
|
||||
g_Settings->LoadDword(UserInterface_MainWindowTop,(DWORD &)Y);
|
||||
g_Settings->LoadDword(UserInterface_MainWindowLeft,(DWORD &)X);
|
||||
_this->SetPos(X,Y);
|
||||
|
||||
_this->ChangeWinSize(640,480);
|
||||
|
@ -474,8 +474,8 @@ DWORD CALLBACK CMainGui::MainGui_Proc (WND_HANDLE hWnd, DWORD uMsg, DWORD wParam
|
|||
CMainGui * _this = (CMainGui *)GetProp((HWND)hWnd,"Class");
|
||||
if (_this &&
|
||||
_this->bCPURunning() &&
|
||||
!_Settings->LoadBool(GameRunning_CPU_Paused) &&
|
||||
_Settings->LoadDword(Setting_DisableScrSaver))
|
||||
!g_Settings->LoadBool(GameRunning_CPU_Paused) &&
|
||||
g_Settings->LoadDword(Setting_DisableScrSaver))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -536,7 +536,7 @@ DWORD CALLBACK CMainGui::MainGui_Proc (WND_HANDLE hWnd, DWORD uMsg, DWORD wParam
|
|||
{
|
||||
CMainGui * _this = (CMainGui *)GetProp((HWND)hWnd,"Class");
|
||||
static DWORD CallCount = 0;
|
||||
if (!_Settings->LoadBool(Beta_IsValidExe))
|
||||
if (!g_Settings->LoadBool(Beta_IsValidExe))
|
||||
{
|
||||
if (CallCount == 0)
|
||||
{
|
||||
|
@ -685,7 +685,7 @@ DWORD CALLBACK CMainGui::MainGui_Proc (WND_HANDLE hWnd, DWORD uMsg, DWORD wParam
|
|||
}
|
||||
if (_this->m_bMainWindow && bCPURunning())
|
||||
{
|
||||
if (!fActive && _Settings->LoadBool(UserInterface_InFullScreen))
|
||||
if (!fActive && g_Settings->LoadBool(UserInterface_InFullScreen))
|
||||
{
|
||||
g_Notify->WindowMode();
|
||||
if (bAutoSleep() && _BaseSystem)
|
||||
|
@ -745,10 +745,10 @@ DWORD CALLBACK CMainGui::MainGui_Proc (WND_HANDLE hWnd, DWORD uMsg, DWORD wParam
|
|||
CN64Rom Rom;
|
||||
Rom.LoadN64Image(_this->CurrentedSelectedRom(),true);
|
||||
Rom.SaveRomSettingID();
|
||||
/*if (_Settings->LoadString(ROM_MD5).length() == 0) {
|
||||
/*if (g_Settings->LoadString(ROM_MD5).length() == 0) {
|
||||
Rom.LoadN64Image(_this->CurrentedSelectedRom(),false);
|
||||
_Settings->SaveString(ROM_MD5,Rom.GetRomMD5().c_str());
|
||||
_Settings->SaveString(ROM_InternalName,Rom.GetRomName().c_str());
|
||||
g_Settings->SaveString(ROM_MD5,Rom.GetRomMD5().c_str());
|
||||
g_Settings->SaveString(ROM_InternalName,Rom.GetRomName().c_str());
|
||||
}*/
|
||||
|
||||
if (LOWORD(wParam) == ID_POPUPMENU_EDITSETTINGS)
|
||||
|
@ -800,7 +800,7 @@ DWORD CALLBACK CMainGui::MainGui_Proc (WND_HANDLE hWnd, DWORD uMsg, DWORD wParam
|
|||
if (_Rom) {
|
||||
_Rom->SaveRomSettingID();
|
||||
} else {
|
||||
_Settings->SaveString(Game_IniKey,"");
|
||||
g_Settings->SaveString(Game_IniKey,"");
|
||||
}
|
||||
}
|
||||
} else if (_this->m_Menu->ProcessMessage(hWnd,HIWORD(wParam), LOWORD(wParam))) {
|
||||
|
|
|
@ -32,7 +32,7 @@ CMainMenu::CMainMenu ( CMainGui * hMainWindow ):
|
|||
|
||||
for (SettingList::const_iterator iter = m_ChangeSettingList.begin(); iter != m_ChangeSettingList.end(); iter++)
|
||||
{
|
||||
_Settings->RegisterChangeCB(*iter,this,(CSettings::SettingChangedFunc)SettingsChanged);
|
||||
g_Settings->RegisterChangeCB(*iter,this,(CSettings::SettingChangedFunc)SettingsChanged);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ CMainMenu::~CMainMenu()
|
|||
{
|
||||
for (SettingList::const_iterator iter = m_ChangeSettingList.begin(); iter != m_ChangeSettingList.end(); iter++)
|
||||
{
|
||||
_Settings->UnregisterChangeCB(*iter,this,(CSettings::SettingChangedFunc)SettingsChanged);
|
||||
g_Settings->UnregisterChangeCB(*iter,this,(CSettings::SettingChangedFunc)SettingsChanged);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
case ID_SYSTEM_PAUSE:
|
||||
_Gui->SaveWindowLoc();
|
||||
WriteTrace(TraceDebug,"ID_SYSTEM_PAUSE");
|
||||
if (_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
if (g_Settings->LoadBool(GameRunning_CPU_Paused))
|
||||
{
|
||||
_BaseSystem->ExternalEvent(SysEvent_ResumeCPU_FromMenu);
|
||||
} else {
|
||||
|
@ -114,7 +114,7 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
break;
|
||||
case ID_SYSTEM_BITMAP:
|
||||
{
|
||||
stdstr Dir(_Settings->LoadString(Directory_SnapShot));
|
||||
stdstr Dir(g_Settings->LoadString(Directory_SnapShot));
|
||||
WriteTraceF(TraceGfxPlugin,"CaptureScreen(%s): Starting",Dir.c_str());
|
||||
_Plugins->Gfx()->CaptureScreen(Dir.c_str());
|
||||
WriteTrace(TraceGfxPlugin,"CaptureScreen: Done");
|
||||
|
@ -122,7 +122,7 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
break;
|
||||
case ID_SYSTEM_LIMITFPS:
|
||||
WriteTrace(TraceDebug,"ID_SYSTEM_LIMITFPS");
|
||||
_Settings->SaveBool(GameRunning_LimitFPS,!_Settings->LoadBool(GameRunning_LimitFPS));
|
||||
g_Settings->SaveBool(GameRunning_LimitFPS,!g_Settings->LoadBool(GameRunning_LimitFPS));
|
||||
WriteTrace(TraceDebug,"ID_SYSTEM_LIMITFPS 1");
|
||||
break;
|
||||
case ID_SYSTEM_SAVE:
|
||||
|
@ -138,7 +138,7 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
memset(&SaveFile, 0, sizeof(SaveFile));
|
||||
memset(&openfilename, 0, sizeof(openfilename));
|
||||
|
||||
_Settings->LoadString(Directory_LastSave, Directory,sizeof(Directory));
|
||||
g_Settings->LoadString(Directory_LastSave, Directory,sizeof(Directory));
|
||||
|
||||
openfilename.lStructSize = sizeof( openfilename );
|
||||
openfilename.hwndOwner = (HWND)hWnd;
|
||||
|
@ -162,11 +162,11 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
_makepath( SaveFile, drive, dir, fname, NULL );
|
||||
}
|
||||
}
|
||||
_Settings->SaveString(GameRunning_InstantSaveFile,SaveFile);
|
||||
g_Settings->SaveString(GameRunning_InstantSaveFile,SaveFile);
|
||||
|
||||
char SaveDir[MAX_PATH];
|
||||
_makepath( SaveDir, drive, dir, NULL, NULL );
|
||||
_Settings->SaveString(Directory_LastSave,SaveDir);
|
||||
g_Settings->SaveString(Directory_LastSave,SaveDir);
|
||||
_System->SaveState();
|
||||
}
|
||||
_BaseSystem->ExternalEvent(SysEvent_ResumeCPU_SaveGame);
|
||||
|
@ -181,7 +181,7 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
memset(&SaveFile, 0, sizeof(SaveFile));
|
||||
memset(&openfilename, 0, sizeof(openfilename));
|
||||
|
||||
_Settings->LoadString(Directory_LastSave, Directory,sizeof(Directory));
|
||||
g_Settings->LoadString(Directory_LastSave, Directory,sizeof(Directory));
|
||||
|
||||
openfilename.lStructSize = sizeof( openfilename );
|
||||
openfilename.hwndOwner = (HWND)hWnd;
|
||||
|
@ -193,11 +193,11 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
|
||||
_BaseSystem->ExternalEvent(SysEvent_PauseCPU_LoadGame);
|
||||
if (GetOpenFileName (&openfilename)) {
|
||||
_Settings->SaveString(GameRunning_InstantSaveFile,SaveFile);
|
||||
g_Settings->SaveString(GameRunning_InstantSaveFile,SaveFile);
|
||||
char SaveDir[MAX_PATH], drive[_MAX_DRIVE] ,dir[_MAX_DIR], fname[_MAX_FNAME],ext[_MAX_EXT];
|
||||
_splitpath( SaveFile, drive, dir, fname, ext );
|
||||
_makepath( SaveDir, drive, dir, NULL, NULL );
|
||||
_Settings->SaveString(Directory_LastSave,SaveDir);
|
||||
g_Settings->SaveString(Directory_LastSave,SaveDir);
|
||||
_System->LoadState();
|
||||
}
|
||||
_BaseSystem->ExternalEvent(SysEvent_ResumeCPU_LoadGame);
|
||||
|
@ -212,19 +212,19 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
_BaseSystem->ExternalEvent(SysEvent_GSButtonPressed);
|
||||
break;
|
||||
case ID_OPTIONS_DISPLAY_FR:
|
||||
_Settings->SaveBool(UserInterface_DisplayFrameRate,!_Settings->LoadBool(UserInterface_DisplayFrameRate));
|
||||
g_Settings->SaveBool(UserInterface_DisplayFrameRate,!g_Settings->LoadBool(UserInterface_DisplayFrameRate));
|
||||
break;
|
||||
case ID_OPTIONS_CHANGE_FR:
|
||||
switch (_Settings->LoadDword(UserInterface_FrameDisplayType))
|
||||
switch (g_Settings->LoadDword(UserInterface_FrameDisplayType))
|
||||
{
|
||||
case FR_VIs:
|
||||
_Settings->SaveDword(UserInterface_FrameDisplayType,FR_DLs);
|
||||
g_Settings->SaveDword(UserInterface_FrameDisplayType,FR_DLs);
|
||||
break;
|
||||
case FR_DLs:
|
||||
_Settings->SaveDword(UserInterface_FrameDisplayType,FR_PERCENT);
|
||||
g_Settings->SaveDword(UserInterface_FrameDisplayType,FR_PERCENT);
|
||||
break;
|
||||
default:
|
||||
_Settings->SaveDword(UserInterface_FrameDisplayType,FR_VIs);
|
||||
g_Settings->SaveDword(UserInterface_FrameDisplayType,FR_VIs);
|
||||
}
|
||||
break;
|
||||
case ID_OPTIONS_INCREASE_SPEED:
|
||||
|
@ -237,7 +237,7 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
_BaseSystem->ExternalEvent(SysEvent_ChangingFullScreen);
|
||||
break;
|
||||
case ID_OPTIONS_FULLSCREEN2:
|
||||
if (_Settings->LoadBool(UserInterface_InFullScreen))
|
||||
if (g_Settings->LoadBool(UserInterface_InFullScreen))
|
||||
{
|
||||
WriteTrace(TraceDebug,"ID_OPTIONS_FULLSCREEN a");
|
||||
_Gui->MakeWindowOnTop(false);
|
||||
|
@ -247,8 +247,8 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
WriteTrace(TraceGfxPlugin,"ChangeWindow: Done");
|
||||
ShowCursor(true);
|
||||
_Gui->ShowStatusBar(true);
|
||||
_Gui->MakeWindowOnTop(_Settings->LoadBool(UserInterface_AlwaysOnTop));
|
||||
_Settings->SaveBool(UserInterface_InFullScreen,(DWORD)false);
|
||||
_Gui->MakeWindowOnTop(g_Settings->LoadBool(UserInterface_AlwaysOnTop));
|
||||
g_Settings->SaveBool(UserInterface_InFullScreen,(DWORD)false);
|
||||
} else {
|
||||
WriteTrace(TraceDebug,"ID_OPTIONS_FULLSCREEN b");
|
||||
ShowCursor(false);
|
||||
|
@ -272,18 +272,18 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
WriteTrace(TraceDebug,"ID_OPTIONS_FULLSCREEN b 5");
|
||||
Notify().SetGfxPlugin(_Plugins->Gfx());
|
||||
WriteTrace(TraceDebug,"ID_OPTIONS_FULLSCREEN b 3");
|
||||
_Settings->SaveBool(UserInterface_InFullScreen,true);
|
||||
g_Settings->SaveBool(UserInterface_InFullScreen,true);
|
||||
WriteTrace(TraceDebug,"ID_OPTIONS_FULLSCREEN b 6");
|
||||
}
|
||||
WriteTrace(TraceDebug,"ID_OPTIONS_FULLSCREEN 1");
|
||||
break;
|
||||
case ID_OPTIONS_ALWAYSONTOP:
|
||||
if (_Settings->LoadDword(UserInterface_AlwaysOnTop)) {
|
||||
_Settings->SaveBool(UserInterface_AlwaysOnTop,false);
|
||||
if (g_Settings->LoadDword(UserInterface_AlwaysOnTop)) {
|
||||
g_Settings->SaveBool(UserInterface_AlwaysOnTop,false);
|
||||
_Gui->MakeWindowOnTop(false);
|
||||
} else {
|
||||
_Settings->SaveBool(UserInterface_AlwaysOnTop,true);
|
||||
_Gui->MakeWindowOnTop(_Settings->LoadBool(GameRunning_CPU_Running));
|
||||
g_Settings->SaveBool(UserInterface_AlwaysOnTop,true);
|
||||
_Gui->MakeWindowOnTop(g_Settings->LoadBool(GameRunning_CPU_Running));
|
||||
}
|
||||
break;
|
||||
case ID_OPTIONS_CONFIG_RSP: WriteTrace(TraceDebug,"ID_OPTIONS_CONFIG_RSP"); _Plugins->ConfigPlugin((DWORD)hWnd,PLUGIN_TYPE_RSP); break;
|
||||
|
@ -292,12 +292,12 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
case ID_OPTIONS_CONFIG_CONT: WriteTrace(TraceDebug,"ID_OPTIONS_CONFIG_CONT"); _Plugins->ConfigPlugin((DWORD)hWnd,PLUGIN_TYPE_CONTROLLER); break;
|
||||
case ID_OPTIONS_CPU_USAGE:
|
||||
WriteTrace(TraceDebug,"ID_OPTIONS_CPU_USAGE");
|
||||
if (_Settings->LoadBool(UserInterface_ShowCPUPer))
|
||||
if (g_Settings->LoadBool(UserInterface_ShowCPUPer))
|
||||
{
|
||||
_Settings->SaveBool(UserInterface_ShowCPUPer,false);
|
||||
g_Settings->SaveBool(UserInterface_ShowCPUPer,false);
|
||||
g_Notify->DisplayMessage(0,"");
|
||||
} else {
|
||||
_Settings->SaveBool(UserInterface_ShowCPUPer,true);
|
||||
g_Settings->SaveBool(UserInterface_ShowCPUPer,true);
|
||||
}
|
||||
break;
|
||||
case ID_OPTIONS_SETTINGS:
|
||||
|
@ -307,52 +307,52 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
}
|
||||
break;
|
||||
case ID_PROFILE_PROFILE:
|
||||
_Settings->SaveBool(Debugger_ProfileCode,!_Settings->LoadBool(Debugger_ProfileCode));
|
||||
g_Settings->SaveBool(Debugger_ProfileCode,!g_Settings->LoadBool(Debugger_ProfileCode));
|
||||
_BaseSystem->ExternalEvent(SysEvent_Profile_StartStop);
|
||||
break;
|
||||
case ID_PROFILE_RESETCOUNTER: _BaseSystem->ExternalEvent(SysEvent_Profile_ResetLogs); break;
|
||||
case ID_PROFILE_GENERATELOG: _BaseSystem->ExternalEvent(SysEvent_Profile_GenerateLogs); break;
|
||||
case ID_DEBUG_SHOW_TLB_MISSES:
|
||||
_Settings->SaveBool(Debugger_ShowTLBMisses,!_Settings->LoadBool(Debugger_ShowTLBMisses));
|
||||
g_Settings->SaveBool(Debugger_ShowTLBMisses,!g_Settings->LoadBool(Debugger_ShowTLBMisses));
|
||||
break;
|
||||
case ID_DEBUG_SHOW_UNHANDLED_MEM:
|
||||
_Settings->SaveBool(Debugger_ShowUnhandledMemory,!_Settings->LoadBool(Debugger_ShowUnhandledMemory));
|
||||
g_Settings->SaveBool(Debugger_ShowUnhandledMemory,!g_Settings->LoadBool(Debugger_ShowUnhandledMemory));
|
||||
break;
|
||||
case ID_DEBUG_SHOW_PIF_ERRORS:
|
||||
_Settings->SaveBool(Debugger_ShowPifErrors,!_Settings->LoadBool(Debugger_ShowPifErrors));
|
||||
g_Settings->SaveBool(Debugger_ShowPifErrors,!g_Settings->LoadBool(Debugger_ShowPifErrors));
|
||||
break;
|
||||
case ID_DEBUG_SHOW_DLIST_COUNT:
|
||||
g_Notify->DisplayMessage(0,"");
|
||||
_Settings->SaveBool(Debugger_ShowDListAListCount,!_Settings->LoadBool(Debugger_ShowDListAListCount));
|
||||
g_Settings->SaveBool(Debugger_ShowDListAListCount,!g_Settings->LoadBool(Debugger_ShowDListAListCount));
|
||||
break;
|
||||
case ID_DEBUG_SHOW_RECOMP_MEM_SIZE:
|
||||
g_Notify->DisplayMessage(0,"");
|
||||
_Settings->SaveBool(Debugger_ShowRecompMemSize,!_Settings->LoadBool(Debugger_ShowRecompMemSize));
|
||||
g_Settings->SaveBool(Debugger_ShowRecompMemSize,!g_Settings->LoadBool(Debugger_ShowRecompMemSize));
|
||||
break;
|
||||
case ID_DEBUG_SHOW_DIV_BY_ZERO:
|
||||
_Settings->SaveBool(Debugger_ShowDivByZero,!_Settings->LoadBool(Debugger_ShowDivByZero));
|
||||
g_Settings->SaveBool(Debugger_ShowDivByZero,!g_Settings->LoadBool(Debugger_ShowDivByZero));
|
||||
break;
|
||||
case ID_DEBUG_GENERATE_LOG_FILES:
|
||||
_Settings->SaveBool(Debugger_GenerateLogFiles,!_Settings->LoadBool(Debugger_GenerateLogFiles));
|
||||
g_Settings->SaveBool(Debugger_GenerateLogFiles,!g_Settings->LoadBool(Debugger_GenerateLogFiles));
|
||||
break;
|
||||
case ID_DEBUG_DISABLE_GAMEFIX:
|
||||
_Settings->SaveBool(Debugger_DisableGameFixes,!_Settings->LoadBool(Debugger_DisableGameFixes));
|
||||
g_Settings->SaveBool(Debugger_DisableGameFixes,!g_Settings->LoadBool(Debugger_DisableGameFixes));
|
||||
break;
|
||||
case ID_DEBUGGER_APPLOG_ERRORS:
|
||||
{
|
||||
DWORD LogLevel = _Settings->LoadDword(Debugger_AppLogLevel);
|
||||
DWORD LogLevel = g_Settings->LoadDword(Debugger_AppLogLevel);
|
||||
if ((LogLevel & TraceError) != 0)
|
||||
{
|
||||
LogLevel &= ~TraceError;
|
||||
} else {
|
||||
LogLevel |= TraceError;
|
||||
}
|
||||
_Settings->SaveDword(Debugger_AppLogLevel, LogLevel );
|
||||
g_Settings->SaveDword(Debugger_AppLogLevel, LogLevel );
|
||||
}
|
||||
break;
|
||||
case ID_DEBUGGER_APPLOG_SETTINGS:
|
||||
{
|
||||
DWORD LogLevel = _Settings->LoadDword(Debugger_AppLogLevel);
|
||||
DWORD LogLevel = g_Settings->LoadDword(Debugger_AppLogLevel);
|
||||
if ((LogLevel & TraceSettings) != 0)
|
||||
{
|
||||
LogLevel &= ~TraceSettings;
|
||||
|
@ -360,12 +360,12 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
|
||||
LogLevel |= TraceSettings;
|
||||
}
|
||||
_Settings->SaveDword(Debugger_AppLogLevel, LogLevel );
|
||||
g_Settings->SaveDword(Debugger_AppLogLevel, LogLevel );
|
||||
}
|
||||
break;
|
||||
case ID_DEBUGGER_APPLOG_RECOMPILER:
|
||||
{
|
||||
DWORD LogLevel = _Settings->LoadDword(Debugger_AppLogLevel);
|
||||
DWORD LogLevel = g_Settings->LoadDword(Debugger_AppLogLevel);
|
||||
if ((LogLevel & TraceRecompiler) != 0)
|
||||
{
|
||||
LogLevel &= ~TraceRecompiler;
|
||||
|
@ -373,12 +373,12 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
|
||||
LogLevel |= TraceRecompiler;
|
||||
}
|
||||
_Settings->SaveDword(Debugger_AppLogLevel, LogLevel );
|
||||
g_Settings->SaveDword(Debugger_AppLogLevel, LogLevel );
|
||||
}
|
||||
break;
|
||||
case ID_DEBUGGER_APPLOG_RSP:
|
||||
{
|
||||
DWORD LogLevel = _Settings->LoadDword(Debugger_AppLogLevel);
|
||||
DWORD LogLevel = g_Settings->LoadDword(Debugger_AppLogLevel);
|
||||
if ((LogLevel & TraceRSP) != 0)
|
||||
{
|
||||
LogLevel &= ~TraceRSP;
|
||||
|
@ -386,12 +386,12 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
|
||||
LogLevel |= TraceRSP;
|
||||
}
|
||||
_Settings->SaveDword(Debugger_AppLogLevel, LogLevel );
|
||||
g_Settings->SaveDword(Debugger_AppLogLevel, LogLevel );
|
||||
}
|
||||
break;
|
||||
case ID_DEBUGGER_APPLOG_TLB:
|
||||
{
|
||||
DWORD LogLevel = _Settings->LoadDword(Debugger_AppLogLevel);
|
||||
DWORD LogLevel = g_Settings->LoadDword(Debugger_AppLogLevel);
|
||||
if ((LogLevel & TraceTLB) != 0)
|
||||
{
|
||||
LogLevel &= ~TraceTLB;
|
||||
|
@ -399,12 +399,12 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
|
||||
LogLevel |= TraceTLB;
|
||||
}
|
||||
_Settings->SaveDword(Debugger_AppLogLevel, LogLevel );
|
||||
g_Settings->SaveDword(Debugger_AppLogLevel, LogLevel );
|
||||
}
|
||||
break;
|
||||
case ID_DEBUGGER_APPLOG_GFX_PLUGIN:
|
||||
{
|
||||
DWORD LogLevel = _Settings->LoadDword(Debugger_AppLogLevel);
|
||||
DWORD LogLevel = g_Settings->LoadDword(Debugger_AppLogLevel);
|
||||
if ((LogLevel & TraceGfxPlugin) != 0)
|
||||
{
|
||||
LogLevel &= ~TraceGfxPlugin;
|
||||
|
@ -412,12 +412,12 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
|
||||
LogLevel |= TraceGfxPlugin;
|
||||
}
|
||||
_Settings->SaveDword(Debugger_AppLogLevel, LogLevel );
|
||||
g_Settings->SaveDword(Debugger_AppLogLevel, LogLevel );
|
||||
}
|
||||
break;
|
||||
case ID_DEBUGGER_APPLOG_DEBUG:
|
||||
{
|
||||
DWORD LogLevel = _Settings->LoadDword(Debugger_AppLogLevel);
|
||||
DWORD LogLevel = g_Settings->LoadDword(Debugger_AppLogLevel);
|
||||
if ((LogLevel & TraceDebug) != 0)
|
||||
{
|
||||
LogLevel &= ~TraceDebug;
|
||||
|
@ -425,12 +425,12 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
|
||||
LogLevel |= TraceDebug;
|
||||
}
|
||||
_Settings->SaveDword(Debugger_AppLogLevel, LogLevel );
|
||||
g_Settings->SaveDword(Debugger_AppLogLevel, LogLevel );
|
||||
}
|
||||
break;
|
||||
case ID_DEBUGGER_APPLOG_AUDIO_EMU:
|
||||
{
|
||||
DWORD LogLevel = _Settings->LoadDword(Debugger_AppLogLevel);
|
||||
DWORD LogLevel = g_Settings->LoadDword(Debugger_AppLogLevel);
|
||||
if ((LogLevel & TraceAudio) != 0)
|
||||
{
|
||||
LogLevel &= ~TraceAudio;
|
||||
|
@ -438,15 +438,15 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
|
||||
LogLevel |= TraceAudio;
|
||||
}
|
||||
_Settings->SaveDword(Debugger_AppLogLevel, LogLevel );
|
||||
g_Settings->SaveDword(Debugger_AppLogLevel, LogLevel );
|
||||
}
|
||||
break;
|
||||
case ID_DEBUGGER_APPLOG_FLUSH:
|
||||
_Settings->SaveBool(Debugger_AppLogFlush,!_Settings->LoadBool(Debugger_AppLogFlush));
|
||||
g_Settings->SaveBool(Debugger_AppLogFlush,!g_Settings->LoadBool(Debugger_AppLogFlush));
|
||||
break;
|
||||
case ID_DEBUGGER_LOGOPTIONS: _Gui->EnterLogOptions(); break;
|
||||
case ID_DEBUGGER_GENERATELOG:
|
||||
_Settings->SaveBool(Debugger_GenerateDebugLog,!_Settings->LoadBool(Debugger_GenerateDebugLog));
|
||||
g_Settings->SaveBool(Debugger_GenerateDebugLog,!g_Settings->LoadBool(Debugger_GenerateDebugLog));
|
||||
break;
|
||||
case ID_DEBUGGER_DUMPMEMORY:
|
||||
_BaseSystem->Debug_ShowMemoryDump();
|
||||
|
@ -462,7 +462,7 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
case ID_DEBUGGER_INTERRUPT_DP: _BaseSystem->ExternalEvent(SysEvent_Interrupt_DP); break;
|
||||
case ID_CURRENT_SAVE_DEFAULT:
|
||||
Notify().DisplayMessage(3,"Save Slot (%s) selected",GetSaveSlotString(MenuID - ID_CURRENT_SAVE_DEFAULT).c_str());
|
||||
_Settings->SaveDword(Game_CurrentSaveState,(DWORD)(MenuID - ID_CURRENT_SAVE_DEFAULT));
|
||||
g_Settings->SaveDword(Game_CurrentSaveState,(DWORD)(MenuID - ID_CURRENT_SAVE_DEFAULT));
|
||||
break;
|
||||
case ID_CURRENT_SAVE_1:
|
||||
case ID_CURRENT_SAVE_2:
|
||||
|
@ -475,7 +475,7 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
case ID_CURRENT_SAVE_9:
|
||||
case ID_CURRENT_SAVE_10:
|
||||
Notify().DisplayMessage(3,"Save Slot (%s) selected",GetSaveSlotString((MenuID - ID_CURRENT_SAVE_1) + 1).c_str());
|
||||
_Settings->SaveDword(Game_CurrentSaveState,(DWORD)((MenuID - ID_CURRENT_SAVE_1) + 1));
|
||||
g_Settings->SaveDword(Game_CurrentSaveState,(DWORD)((MenuID - ID_CURRENT_SAVE_1) + 1));
|
||||
break;
|
||||
case ID_HELP_CONTENTS:
|
||||
{
|
||||
|
@ -514,7 +514,7 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
default:
|
||||
if (MenuID >= ID_RECENT_ROM_START && MenuID < ID_RECENT_ROM_END) {
|
||||
stdstr FileName;
|
||||
if (_Settings->LoadStringIndex(File_RecentGameFileIndex,MenuID - ID_RECENT_ROM_START,FileName) &&
|
||||
if (g_Settings->LoadStringIndex(File_RecentGameFileIndex,MenuID - ID_RECENT_ROM_START,FileName) &&
|
||||
FileName.length() > 0)
|
||||
{
|
||||
_BaseSystem->RunFileImage(FileName.c_str());
|
||||
|
@ -522,9 +522,9 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
|
|||
}
|
||||
if (MenuID >= ID_RECENT_DIR_START && MenuID < ID_RECENT_DIR_END) {
|
||||
int Offset = MenuID - ID_RECENT_DIR_START;
|
||||
stdstr Dir = _Settings->LoadStringIndex(Directory_RecentGameDirIndex,Offset);
|
||||
stdstr Dir = g_Settings->LoadStringIndex(Directory_RecentGameDirIndex,Offset);
|
||||
if (Dir.length() > 0) {
|
||||
_Settings->SaveString(Directory_Game,Dir.c_str());
|
||||
g_Settings->SaveString(Directory_Game,Dir.c_str());
|
||||
g_Notify->AddRecentDir(Dir.c_str());
|
||||
_Gui->RefreshMenu();
|
||||
if (_Gui->RomBrowserVisible()) {
|
||||
|
@ -616,13 +616,13 @@ stdstr CMainMenu::GetSaveSlotString (int Slot)
|
|||
case 10: SlotName = GS(MENU_SLOT_10); break;
|
||||
}
|
||||
|
||||
if (!_Settings->LoadBool(GameRunning_CPU_Running)) { return SlotName; }
|
||||
if (!g_Settings->LoadBool(GameRunning_CPU_Running)) { return SlotName; }
|
||||
|
||||
stdstr LastSaveTime;
|
||||
|
||||
//check first save name
|
||||
stdstr _GoodName = _Settings->LoadString(Game_GoodName);
|
||||
stdstr _InstantSaveDirectory = _Settings->LoadString(Directory_InstantSave);
|
||||
stdstr _GoodName = g_Settings->LoadString(Game_GoodName);
|
||||
stdstr _InstantSaveDirectory = g_Settings->LoadString(Directory_InstantSave);
|
||||
stdstr CurrentSaveName;
|
||||
if (Slot != 0) {
|
||||
CurrentSaveName.Format("%s.pj%d",_GoodName.c_str(), Slot);
|
||||
|
@ -631,7 +631,7 @@ stdstr CMainMenu::GetSaveSlotString (int Slot)
|
|||
}
|
||||
stdstr_f FileName("%s%s",_InstantSaveDirectory.c_str(),CurrentSaveName.c_str());
|
||||
|
||||
if (_Settings->LoadDword(Setting_AutoZipInstantSave))
|
||||
if (g_Settings->LoadDword(Setting_AutoZipInstantSave))
|
||||
{
|
||||
stdstr_f ZipFileName("%s.zip",FileName.c_str());
|
||||
LastSaveTime = GetFileLastMod(ZipFileName);
|
||||
|
@ -645,14 +645,14 @@ stdstr CMainMenu::GetSaveSlotString (int Slot)
|
|||
// Check old file name
|
||||
if (LastSaveTime.empty())
|
||||
{
|
||||
stdstr _RomName = _Settings->LoadString(Game_GameName);
|
||||
stdstr _RomName = g_Settings->LoadString(Game_GameName);
|
||||
if (Slot > 0) {
|
||||
FileName.Format("%s%s.pj%d", _InstantSaveDirectory.c_str(), _RomName.c_str(),Slot);
|
||||
} else {
|
||||
FileName.Format("%s%s.pj",_InstantSaveDirectory.c_str(),_RomName.c_str());
|
||||
}
|
||||
|
||||
if (_Settings->LoadBool(Setting_AutoZipInstantSave))
|
||||
if (g_Settings->LoadBool(Setting_AutoZipInstantSave))
|
||||
{
|
||||
stdstr_f ZipFileName("%s.zip",FileName.c_str());
|
||||
LastSaveTime = GetFileLastMod(ZipFileName);
|
||||
|
@ -672,16 +672,16 @@ void CMainMenu::FillOutMenu ( MENU_HANDLE hMenu ) {
|
|||
MENU_ITEM Item;
|
||||
|
||||
//Get all flags
|
||||
bool inBasicMode = _Settings->LoadBool(UserInterface_BasicMode);
|
||||
bool CPURunning = _Settings->LoadBool(GameRunning_CPU_Running);
|
||||
bool RomLoading = _Settings->LoadBool(GameRunning_LoadingInProgress);
|
||||
bool RomLoaded = _Settings->LoadString(Game_GameName).length() > 0;
|
||||
bool RomList = _Settings->LoadBool(RomBrowser_Enabled) && !CPURunning;
|
||||
bool inBasicMode = g_Settings->LoadBool(UserInterface_BasicMode);
|
||||
bool CPURunning = g_Settings->LoadBool(GameRunning_CPU_Running);
|
||||
bool RomLoading = g_Settings->LoadBool(GameRunning_LoadingInProgress);
|
||||
bool RomLoaded = g_Settings->LoadString(Game_GameName).length() > 0;
|
||||
bool RomList = g_Settings->LoadBool(RomBrowser_Enabled) && !CPURunning;
|
||||
|
||||
CMenuShortCutKey::ACCESS_MODE AccessLevel = CMenuShortCutKey::GAME_NOT_RUNNING;
|
||||
if (_Settings->LoadBool(GameRunning_CPU_Running))
|
||||
if (g_Settings->LoadBool(GameRunning_CPU_Running))
|
||||
{
|
||||
AccessLevel = _Settings->LoadBool(UserInterface_InFullScreen) ?
|
||||
AccessLevel = g_Settings->LoadBool(UserInterface_InFullScreen) ?
|
||||
CMenuShortCutKey::GAME_RUNNING_FULLSCREEN :
|
||||
CMenuShortCutKey::GAME_RUNNING_WINDOW;
|
||||
}
|
||||
|
@ -703,10 +703,10 @@ void CMainMenu::FillOutMenu ( MENU_HANDLE hMenu ) {
|
|||
|
||||
//Go through the settings to create a list of Recent Roms
|
||||
MenuItemList RecentRomMenu;
|
||||
DWORD count, RomsToRemember = _Settings->LoadDword(File_RecentGameFileCount);
|
||||
DWORD count, RomsToRemember = g_Settings->LoadDword(File_RecentGameFileCount);
|
||||
|
||||
for (count = 0; count < RomsToRemember; count++) {
|
||||
stdstr LastRom = _Settings->LoadStringIndex(File_RecentGameFileIndex,count);
|
||||
stdstr LastRom = g_Settings->LoadStringIndex(File_RecentGameFileIndex,count);
|
||||
if (LastRom.empty())
|
||||
{
|
||||
break;
|
||||
|
@ -719,11 +719,11 @@ void CMainMenu::FillOutMenu ( MENU_HANDLE hMenu ) {
|
|||
/* Recent Dir
|
||||
****************/
|
||||
MenuItemList RecentDirMenu;
|
||||
DWORD DirsToRemember = _Settings->LoadDword(Directory_RecentGameDirCount);
|
||||
DWORD DirsToRemember = g_Settings->LoadDword(Directory_RecentGameDirCount);
|
||||
|
||||
for (count = 0; count < DirsToRemember; count++)
|
||||
{
|
||||
stdstr LastDir = _Settings->LoadStringIndex(Directory_RecentGameDirIndex,count);
|
||||
stdstr LastDir = g_Settings->LoadStringIndex(Directory_RecentGameDirIndex,count);
|
||||
if (LastDir.empty())
|
||||
{
|
||||
break;
|
||||
|
@ -790,7 +790,7 @@ void CMainMenu::FillOutMenu ( MENU_HANDLE hMenu ) {
|
|||
/* Current Save
|
||||
****************/
|
||||
MenuItemList CurrentSaveMenu;
|
||||
DWORD _CurrentSaveState = _Settings->LoadDword(Game_CurrentSaveState);
|
||||
DWORD _CurrentSaveState = g_Settings->LoadDword(Game_CurrentSaveState);
|
||||
Item.Reset(ID_CURRENT_SAVE_DEFAULT, EMPTY_STRING,m_ShortCuts.ShortCutString(ID_CURRENT_SAVE_DEFAULT,AccessLevel),NULL,GetSaveSlotString(0));
|
||||
if (_CurrentSaveState == 0) { Item.ItemTicked = true; }
|
||||
CurrentSaveMenu.push_back(Item);
|
||||
|
@ -838,7 +838,7 @@ void CMainMenu::FillOutMenu ( MENU_HANDLE hMenu ) {
|
|||
ResetMenu.push_back(MENU_ITEM(ID_SYSTEM_RESET_HARD, MENU_RESET_HARD, m_ShortCuts.ShortCutString(ID_SYSTEM_RESET_HARD,AccessLevel)));
|
||||
SystemMenu.push_back(MENU_ITEM(SUB_MENU,MENU_RESET,EMPTY_STDSTR,&ResetMenu));
|
||||
}
|
||||
if (_Settings->LoadBool(GameRunning_CPU_Paused)) {
|
||||
if (g_Settings->LoadBool(GameRunning_CPU_Paused)) {
|
||||
SystemMenu.push_back(MENU_ITEM(ID_SYSTEM_PAUSE, MENU_RESUME, m_ShortCuts.ShortCutString(ID_SYSTEM_PAUSE,AccessLevel)));
|
||||
} else {
|
||||
SystemMenu.push_back(MENU_ITEM(ID_SYSTEM_PAUSE, MENU_PAUSE, m_ShortCuts.ShortCutString(ID_SYSTEM_PAUSE,AccessLevel)));
|
||||
|
@ -847,7 +847,7 @@ void CMainMenu::FillOutMenu ( MENU_HANDLE hMenu ) {
|
|||
SystemMenu.push_back(MENU_ITEM(SPLITER ));
|
||||
if (!inBasicMode) {
|
||||
Item.Reset(ID_SYSTEM_LIMITFPS, MENU_LIMIT_FPS,m_ShortCuts.ShortCutString(ID_SYSTEM_LIMITFPS,AccessLevel) );
|
||||
if (_Settings->LoadBool(GameRunning_LimitFPS)) { Item.ItemTicked = true; }
|
||||
if (g_Settings->LoadBool(GameRunning_LimitFPS)) { Item.ItemTicked = true; }
|
||||
SystemMenu.push_back(Item);
|
||||
SystemMenu.push_back(MENU_ITEM(SPLITER ));
|
||||
}
|
||||
|
@ -876,7 +876,7 @@ void CMainMenu::FillOutMenu ( MENU_HANDLE hMenu ) {
|
|||
OptionMenu.push_back(Item);
|
||||
if (!inBasicMode) {
|
||||
Item.Reset(ID_OPTIONS_ALWAYSONTOP, MENU_ON_TOP,m_ShortCuts.ShortCutString(ID_OPTIONS_ALWAYSONTOP,AccessLevel) );
|
||||
if (_Settings->LoadDword(UserInterface_AlwaysOnTop)) { Item.ItemTicked = true; }
|
||||
if (g_Settings->LoadDword(UserInterface_AlwaysOnTop)) { Item.ItemTicked = true; }
|
||||
Item.ItemEnabled = CPURunning;
|
||||
OptionMenu.push_back(Item);
|
||||
}
|
||||
|
@ -908,7 +908,7 @@ void CMainMenu::FillOutMenu ( MENU_HANDLE hMenu ) {
|
|||
OptionMenu.push_back(MENU_ITEM(SPLITER ));
|
||||
if (!inBasicMode) {
|
||||
Item.Reset(ID_OPTIONS_CPU_USAGE, MENU_SHOW_CPU,m_ShortCuts.ShortCutString(ID_OPTIONS_CPU_USAGE,AccessLevel) );
|
||||
if (_Settings->LoadDword(UserInterface_ShowCPUPer)) { Item.ItemTicked = true; }
|
||||
if (g_Settings->LoadDword(UserInterface_ShowCPUPer)) { Item.ItemTicked = true; }
|
||||
OptionMenu.push_back(Item);
|
||||
}
|
||||
OptionMenu.push_back(MENU_ITEM(ID_OPTIONS_SETTINGS, MENU_SETTINGS,m_ShortCuts.ShortCutString(ID_OPTIONS_SETTINGS,AccessLevel) ));
|
||||
|
@ -919,7 +919,7 @@ void CMainMenu::FillOutMenu ( MENU_HANDLE hMenu ) {
|
|||
if (bHaveDebugger())
|
||||
{
|
||||
Item.Reset(ID_PROFILE_PROFILE,EMPTY_STRING,EMPTY_STDSTR,NULL,"Profile Code" );
|
||||
if (_Settings->LoadBool(Debugger_ProfileCode)) { Item.ItemTicked = true; }
|
||||
if (g_Settings->LoadBool(Debugger_ProfileCode)) { Item.ItemTicked = true; }
|
||||
DebugProfileMenu.push_back(Item);
|
||||
Item.Reset(ID_PROFILE_RESETCOUNTER,EMPTY_STRING,EMPTY_STDSTR,NULL,"Reset Counters" );
|
||||
if (!CPURunning) { Item.ItemEnabled = false; }
|
||||
|
@ -969,7 +969,7 @@ void CMainMenu::FillOutMenu ( MENU_HANDLE hMenu ) {
|
|||
Item.ItemEnabled = true;
|
||||
DebugR4300Menu.push_back(Item);
|
||||
Item.Reset(ID_DEBUG_DISABLE_GAMEFIX,EMPTY_STRING,EMPTY_STDSTR,NULL,"Disable Game Fixes" );
|
||||
if (_Settings->LoadBool(Debugger_DisableGameFixes)) {
|
||||
if (g_Settings->LoadBool(Debugger_DisableGameFixes)) {
|
||||
Item.ItemTicked = true;
|
||||
}
|
||||
DebugR4300Menu.push_back(Item);
|
||||
|
@ -990,7 +990,7 @@ void CMainMenu::FillOutMenu ( MENU_HANDLE hMenu ) {
|
|||
/* Debug - App logging
|
||||
*******************/
|
||||
{
|
||||
DWORD LogLevel = _Settings->LoadDword(Debugger_AppLogLevel);
|
||||
DWORD LogLevel = g_Settings->LoadDword(Debugger_AppLogLevel);
|
||||
|
||||
Item.Reset(ID_DEBUGGER_APPLOG_ERRORS,EMPTY_STRING,EMPTY_STDSTR,NULL,"Error Messages" );
|
||||
if ((LogLevel & TraceError) != 0) { Item.ItemTicked = true; }
|
||||
|
@ -1027,7 +1027,7 @@ void CMainMenu::FillOutMenu ( MENU_HANDLE hMenu ) {
|
|||
DebugAppLoggingMenu.push_back(MENU_ITEM(SPLITER ));
|
||||
|
||||
Item.Reset(ID_DEBUGGER_APPLOG_FLUSH,EMPTY_STRING,EMPTY_STDSTR,NULL,"Auto flush file" );
|
||||
if (_Settings->LoadBool(Debugger_AppLogFlush)) { Item.ItemTicked = true; }
|
||||
if (g_Settings->LoadBool(Debugger_AppLogFlush)) { Item.ItemTicked = true; }
|
||||
DebugAppLoggingMenu.push_back(Item);
|
||||
}
|
||||
|
||||
|
@ -1039,7 +1039,7 @@ void CMainMenu::FillOutMenu ( MENU_HANDLE hMenu ) {
|
|||
|
||||
|
||||
Item.Reset(ID_DEBUGGER_GENERATELOG,EMPTY_STRING,EMPTY_STDSTR,NULL,"Generate Log" );
|
||||
if (_Settings->LoadBool(Debugger_GenerateDebugLog)) { Item.ItemTicked = true; }
|
||||
if (g_Settings->LoadBool(Debugger_GenerateDebugLog)) { Item.ItemTicked = true; }
|
||||
DebugLoggingMenu.push_back(Item);
|
||||
|
||||
/* Debugger Main Menu
|
||||
|
@ -1068,17 +1068,17 @@ void CMainMenu::FillOutMenu ( MENU_HANDLE hMenu ) {
|
|||
/* Notification Menu
|
||||
*******************/
|
||||
Item.Reset(ID_DEBUG_SHOW_UNHANDLED_MEM,EMPTY_STRING,EMPTY_STDSTR,NULL,"On Unhandled Memory Actions" );
|
||||
if (_Settings->LoadBool(Debugger_ShowUnhandledMemory)) {
|
||||
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) {
|
||||
Item.ItemTicked = true;
|
||||
}
|
||||
DebugNotificationMenu.push_back(Item);
|
||||
Item.Reset(ID_DEBUG_SHOW_PIF_ERRORS,EMPTY_STRING,EMPTY_STDSTR,NULL,"On PIF Errors" );
|
||||
if (_Settings->LoadBool(Debugger_ShowPifErrors)) {
|
||||
if (g_Settings->LoadBool(Debugger_ShowPifErrors)) {
|
||||
Item.ItemTicked = true;
|
||||
}
|
||||
DebugNotificationMenu.push_back(Item);
|
||||
Item.Reset(ID_DEBUG_SHOW_DIV_BY_ZERO,EMPTY_STRING,EMPTY_STDSTR,NULL,"On Div By Zero" );
|
||||
if (_Settings->LoadBool(Debugger_ShowDivByZero)) {
|
||||
if (g_Settings->LoadBool(Debugger_ShowDivByZero)) {
|
||||
Item.ItemTicked = true;
|
||||
}
|
||||
DebugNotificationMenu.push_back(Item);
|
||||
|
@ -1099,22 +1099,22 @@ void CMainMenu::FillOutMenu ( MENU_HANDLE hMenu ) {
|
|||
DebugMenu.push_back(Item);
|
||||
DebugMenu.push_back(MENU_ITEM(SPLITER));
|
||||
Item.Reset(ID_DEBUG_SHOW_TLB_MISSES,EMPTY_STRING,EMPTY_STDSTR,NULL,"Show TLB Misses" );
|
||||
if (_Settings->LoadBool(Debugger_ShowTLBMisses)) {
|
||||
if (g_Settings->LoadBool(Debugger_ShowTLBMisses)) {
|
||||
Item.ItemTicked = true;
|
||||
}
|
||||
Item.Reset(ID_DEBUG_SHOW_DLIST_COUNT,EMPTY_STRING,EMPTY_STDSTR,NULL,"Display Alist/Dlist Count" );
|
||||
if (_Settings->LoadBool(Debugger_ShowDListAListCount)) {
|
||||
if (g_Settings->LoadBool(Debugger_ShowDListAListCount)) {
|
||||
Item.ItemTicked = true;
|
||||
}
|
||||
DebugMenu.push_back(Item);
|
||||
Item.Reset(ID_DEBUG_SHOW_RECOMP_MEM_SIZE,EMPTY_STRING,EMPTY_STDSTR,NULL,"Display Recompiler Code Buffer Size" );
|
||||
if (_Settings->LoadBool(Debugger_ShowRecompMemSize)) {
|
||||
if (g_Settings->LoadBool(Debugger_ShowRecompMemSize)) {
|
||||
Item.ItemTicked = true;
|
||||
}
|
||||
DebugMenu.push_back(Item);
|
||||
DebugMenu.push_back(MENU_ITEM(SPLITER));
|
||||
Item.Reset(ID_DEBUG_GENERATE_LOG_FILES,EMPTY_STRING,EMPTY_STDSTR,NULL,"Generate Log Files" );
|
||||
if (_Settings->LoadBool(Debugger_GenerateLogFiles)) {
|
||||
if (g_Settings->LoadBool(Debugger_GenerateLogFiles)) {
|
||||
Item.ItemTicked = true;
|
||||
}
|
||||
DebugMenu.push_back(Item);
|
||||
|
@ -1123,10 +1123,10 @@ void CMainMenu::FillOutMenu ( MENU_HANDLE hMenu ) {
|
|||
/* Help Menu
|
||||
****************/
|
||||
MenuItemList HelpMenu;
|
||||
if (_Settings->LoadBool(Beta_IsBetaVersion))
|
||||
if (g_Settings->LoadBool(Beta_IsBetaVersion))
|
||||
{
|
||||
stdstr_f User("Beta For: %s",_Settings->LoadString(Beta_UserName).c_str());
|
||||
stdstr_f Email("Email: %s",_Settings->LoadString(Beta_EmailAddress).c_str());
|
||||
stdstr_f User("Beta For: %s",g_Settings->LoadString(Beta_UserName).c_str());
|
||||
stdstr_f Email("Email: %s",g_Settings->LoadString(Beta_EmailAddress).c_str());
|
||||
HelpMenu.push_back(MENU_ITEM(NO_ID, EMPTY_STRING,EMPTY_STDSTR,NULL,User ));
|
||||
HelpMenu.push_back(MENU_ITEM(NO_ID, EMPTY_STRING,EMPTY_STDSTR,NULL,Email ));
|
||||
HelpMenu.push_back(MENU_ITEM(SPLITER ));
|
||||
|
@ -1193,7 +1193,7 @@ void CMainMenu::ResetMenu(void) {
|
|||
m_ShortCuts.Load();
|
||||
}
|
||||
|
||||
if (!_Settings->LoadBool(UserInterface_InFullScreen))
|
||||
if (!g_Settings->LoadBool(UserInterface_InFullScreen))
|
||||
{
|
||||
//Create a new window with all the items
|
||||
WriteTrace(TraceDebug,"CMainMenu::ResetMenu - Create Menu");
|
||||
|
@ -1248,7 +1248,7 @@ void CMainMenu::ResetMenu(void) {
|
|||
|
||||
void CMainMenu::SaveShortCuts(MSC_MAP * ShortCuts) {
|
||||
Notify().BreakPoint(__FILE__,__LINE__);
|
||||
stdstr FileName = _Settings->LoadString(SupportFile_ShortCuts);
|
||||
stdstr FileName = g_Settings->LoadString(SupportFile_ShortCuts);
|
||||
FILE *file = fopen(FileName.c_str(),"w");
|
||||
for (MSC_MAP::iterator Item = ShortCuts->begin(); Item != ShortCuts->end(); Item++) {
|
||||
for (SHORTCUT_KEY_LIST::const_iterator ShortCut = Item->second.GetAccelItems().begin(); ShortCut != Item->second.GetAccelItems().end(); ShortCut++) {
|
||||
|
|
|
@ -348,7 +348,7 @@ void CShortCuts::Load (bool InitialValues )
|
|||
AddShortCut(ID_OPTIONS_CPU_USAGE, STR_SHORTCUT_OPTIONS, MENU_SHOW_CPU, CMenuShortCutKey::GAME_RUNNING );
|
||||
AddShortCut(ID_OPTIONS_SETTINGS, STR_SHORTCUT_OPTIONS, MENU_SETTINGS, CMenuShortCutKey::NOT_IN_FULLSCREEN );
|
||||
|
||||
stdstr FileName = _Settings->LoadString(SupportFile_ShortCuts);
|
||||
stdstr FileName = g_Settings->LoadString(SupportFile_ShortCuts);
|
||||
FILE *file = fopen(FileName.c_str(),"r");
|
||||
if (file == NULL || InitialValues)
|
||||
{
|
||||
|
@ -413,7 +413,7 @@ void CShortCuts::Save( void )
|
|||
{
|
||||
CGuard CS(m_CS);
|
||||
|
||||
stdstr FileName = _Settings->LoadString(SupportFile_ShortCuts);
|
||||
stdstr FileName = g_Settings->LoadString(SupportFile_ShortCuts);
|
||||
FILE *file = fopen(FileName.c_str(),"w");
|
||||
if (file == NULL)
|
||||
{
|
||||
|
@ -444,9 +444,9 @@ HACCEL CShortCuts::GetAcceleratorTable ( void )
|
|||
|
||||
//Generate a ACCEL list
|
||||
CMenuShortCutKey::ACCESS_MODE AccessLevel = CMenuShortCutKey::GAME_NOT_RUNNING;
|
||||
if (_Settings->LoadBool(GameRunning_CPU_Running))
|
||||
if (g_Settings->LoadBool(GameRunning_CPU_Running))
|
||||
{
|
||||
AccessLevel = _Settings->LoadBool(UserInterface_InFullScreen) ?
|
||||
AccessLevel = g_Settings->LoadBool(UserInterface_InFullScreen) ?
|
||||
CMenuShortCutKey::GAME_RUNNING_FULLSCREEN :
|
||||
CMenuShortCutKey::GAME_RUNNING_WINDOW;
|
||||
}
|
||||
|
|
|
@ -130,7 +130,7 @@ void CNotification::SetGfxPlugin( CGfxPlugin * Plugin )
|
|||
|
||||
void CNotification::SetWindowCaption (const char * Caption) {
|
||||
char WinTitle[256];
|
||||
_snprintf( WinTitle, sizeof(WinTitle), "%s - %s", Caption, _Settings->LoadString(Setting_ApplicationName).c_str());
|
||||
_snprintf( WinTitle, sizeof(WinTitle), "%s - %s", Caption, g_Settings->LoadString(Setting_ApplicationName).c_str());
|
||||
WinTitle[sizeof(WinTitle) - 1] = 0;
|
||||
_hWnd->Caption(WinTitle);
|
||||
}
|
||||
|
@ -155,12 +155,12 @@ void CNotification::AddRecentDir ( const char * RomDir ) {
|
|||
if (HIWORD(RomDir) == NULL) { return; }
|
||||
|
||||
//Get Information about the stored rom list
|
||||
size_t MaxRememberedDirs = _Settings->LoadDword(Directory_RecentGameDirCount);
|
||||
size_t MaxRememberedDirs = g_Settings->LoadDword(Directory_RecentGameDirCount);
|
||||
strlist RecentDirs;
|
||||
size_t i;
|
||||
for (i = 0; i < MaxRememberedDirs; i ++ )
|
||||
{
|
||||
stdstr RecentDir = _Settings->LoadStringIndex(Directory_RecentGameDirIndex,i);
|
||||
stdstr RecentDir = g_Settings->LoadStringIndex(Directory_RecentGameDirIndex,i);
|
||||
if (RecentDir.empty())
|
||||
{
|
||||
break;
|
||||
|
@ -187,7 +187,7 @@ void CNotification::AddRecentDir ( const char * RomDir ) {
|
|||
|
||||
for (i = 0, iter = RecentDirs.begin(); iter != RecentDirs.end(); iter++, i++)
|
||||
{
|
||||
_Settings->SaveStringIndex(Directory_RecentGameDirIndex,i,*iter);
|
||||
g_Settings->SaveStringIndex(Directory_RecentGameDirIndex,i,*iter);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -195,12 +195,12 @@ void CNotification::AddRecentRom ( const char * ImagePath ) {
|
|||
if (HIWORD(ImagePath) == NULL) { return; }
|
||||
|
||||
//Get Information about the stored rom list
|
||||
size_t MaxRememberedFiles = _Settings->LoadDword(File_RecentGameFileCount);
|
||||
size_t MaxRememberedFiles = g_Settings->LoadDword(File_RecentGameFileCount);
|
||||
strlist RecentGames;
|
||||
size_t i;
|
||||
for (i = 0; i < MaxRememberedFiles; i ++ )
|
||||
{
|
||||
stdstr RecentGame = _Settings->LoadStringIndex(File_RecentGameFileIndex,i);
|
||||
stdstr RecentGame = g_Settings->LoadStringIndex(File_RecentGameFileIndex,i);
|
||||
if (RecentGame.empty())
|
||||
{
|
||||
break;
|
||||
|
@ -227,7 +227,7 @@ void CNotification::AddRecentRom ( const char * ImagePath ) {
|
|||
|
||||
for (i = 0, iter = RecentGames.begin(); iter != RecentGames.end(); iter++, i++)
|
||||
{
|
||||
_Settings->SaveStringIndex(File_RecentGameFileIndex,i,*iter);
|
||||
g_Settings->SaveStringIndex(File_RecentGameFileIndex,i,*iter);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -243,7 +243,7 @@ void CNotification::HideRomBrowser ( void ) {
|
|||
|
||||
void CNotification::ShowRomBrowser ( void ) {
|
||||
if (_hWnd == NULL) { return; }
|
||||
if (_Settings->LoadDword(RomBrowser_Enabled)) {
|
||||
if (g_Settings->LoadDword(RomBrowser_Enabled)) {
|
||||
//Display the rom browser
|
||||
_hWnd->ShowRomList();
|
||||
_hWnd->HighLightLastRom();
|
||||
|
@ -274,7 +274,7 @@ bool CNotification::ProcessGuiMessages ( void ) const
|
|||
|
||||
void CNotification::BreakPoint ( const char * File, const int LineNumber )
|
||||
{
|
||||
if (_Settings->LoadBool(Debugger_Enabled))
|
||||
if (g_Settings->LoadBool(Debugger_Enabled))
|
||||
{
|
||||
DisplayError("Break point found at\n%s\n%d",File, LineNumber);
|
||||
if (IsDebuggerPresent() != 0)
|
||||
|
|
|
@ -12,11 +12,11 @@ CRomBrowser::CRomBrowser (WND_HANDLE & MainWindow, WND_HANDLE & StatusWindow ) :
|
|||
m_ShowingRomBrowser(false),
|
||||
m_AllowSelectionLastRom(true)
|
||||
{
|
||||
if (_Settings) {
|
||||
m_RomIniFile = new CIniFile(_Settings->LoadString(SupportFile_RomDatabase).c_str());
|
||||
m_NotesIniFile = new CIniFile(_Settings->LoadString(SupportFile_Notes).c_str());
|
||||
m_ExtIniFile = new CIniFile(_Settings->LoadString(SupportFile_ExtInfo).c_str());
|
||||
m_ZipIniFile = new CIniFile(_Settings->LoadString(SupportFile_7zipCache).c_str());
|
||||
if (g_Settings) {
|
||||
m_RomIniFile = new CIniFile(g_Settings->LoadString(SupportFile_RomDatabase).c_str());
|
||||
m_NotesIniFile = new CIniFile(g_Settings->LoadString(SupportFile_Notes).c_str());
|
||||
m_ExtIniFile = new CIniFile(g_Settings->LoadString(SupportFile_ExtInfo).c_str());
|
||||
m_ZipIniFile = new CIniFile(g_Settings->LoadString(SupportFile_7zipCache).c_str());
|
||||
}
|
||||
|
||||
m_hRomList = 0;
|
||||
|
@ -98,7 +98,7 @@ int CRomBrowser::CalcSortPosition (DWORD lParam)
|
|||
|
||||
int count;
|
||||
for (count = NoOfSortKeys; count >= 0; count --) {
|
||||
stdstr SortFieldName = _Settings->LoadStringIndex(RomBrowser_SortFieldIndex,count);
|
||||
stdstr SortFieldName = g_Settings->LoadStringIndex(RomBrowser_SortFieldIndex,count);
|
||||
if (SortFieldName.length() == 0)
|
||||
{
|
||||
continue;
|
||||
|
@ -118,7 +118,7 @@ int CRomBrowser::CalcSortPosition (DWORD lParam)
|
|||
SORT_FIELD SortFieldInfo;
|
||||
SortFieldInfo._this = this;
|
||||
SortFieldInfo.Key = index;
|
||||
SortFieldInfo.KeyAscend = _Settings->LoadBoolIndex(RomBrowser_SortAscendingIndex,count);
|
||||
SortFieldInfo.KeyAscend = g_Settings->LoadBoolIndex(RomBrowser_SortAscendingIndex,count);
|
||||
|
||||
//calc new start and end
|
||||
int LastTestPos = -1;
|
||||
|
@ -235,7 +235,7 @@ int CRomBrowser::CalcSortPosition (DWORD lParam)
|
|||
|
||||
//Compare end with item to see if we should do it after or before it
|
||||
for (count = 0; count < NoOfSortKeys; count ++) {
|
||||
stdstr SortFieldName = _Settings->LoadStringIndex(RomBrowser_SortFieldIndex,count);
|
||||
stdstr SortFieldName = g_Settings->LoadStringIndex(RomBrowser_SortFieldIndex,count);
|
||||
if (SortFieldName.length() == 0)
|
||||
{
|
||||
continue;
|
||||
|
@ -249,7 +249,7 @@ int CRomBrowser::CalcSortPosition (DWORD lParam)
|
|||
SORT_FIELD SortFieldInfo;
|
||||
SortFieldInfo._this = this;
|
||||
SortFieldInfo.Key = index;
|
||||
SortFieldInfo.KeyAscend = _Settings->LoadBoolIndex(RomBrowser_SortAscendingIndex,count) != 0;
|
||||
SortFieldInfo.KeyAscend = g_Settings->LoadBoolIndex(RomBrowser_SortAscendingIndex,count) != 0;
|
||||
|
||||
LV_ITEM lvItem;
|
||||
memset(&lvItem, 0, sizeof(LV_ITEM));
|
||||
|
@ -526,7 +526,7 @@ bool CRomBrowser::GetRomFileNames( strlist & FileList, const CPath & BaseDirecto
|
|||
|
||||
if (SearchPath.IsDirectory())
|
||||
{
|
||||
if (_Settings->LoadDword(RomBrowser_Recursive))
|
||||
if (g_Settings->LoadDword(RomBrowser_Recursive))
|
||||
{
|
||||
stdstr CurrentDir = Directory + SearchPath.GetCurrentDirectory() + "\\";
|
||||
GetRomFileNames(FileList,BaseDirectory,CurrentDir,InWatchThread);
|
||||
|
@ -581,7 +581,7 @@ void CRomBrowser::FillRomList ( strlist & FileList, const CPath & BaseDirectory,
|
|||
|
||||
if (SearchPath.IsDirectory())
|
||||
{
|
||||
if (_Settings->LoadDword(RomBrowser_Recursive))
|
||||
if (g_Settings->LoadDword(RomBrowser_Recursive))
|
||||
{
|
||||
stdstr CurrentDir = Directory + SearchPath.GetCurrentDirectory() + "\\";
|
||||
FillRomList(FileList,BaseDirectory,CurrentDir,lpLastRom);
|
||||
|
@ -742,7 +742,7 @@ void CRomBrowser::HighLightLastRom(void) {
|
|||
if (!RomBrowserVisible()) { return; }
|
||||
|
||||
//Get the string to the last rom
|
||||
stdstr LastRom = _Settings->LoadStringIndex(File_RecentGameFileIndex,0);
|
||||
stdstr LastRom = g_Settings->LoadStringIndex(File_RecentGameFileIndex,0);
|
||||
LPCSTR lpLastRom = LastRom.c_str();
|
||||
|
||||
LV_ITEM lvItem;
|
||||
|
@ -881,7 +881,7 @@ void CRomBrowser::ByteSwapRomData (BYTE * Data, int DataLen)
|
|||
}
|
||||
|
||||
void CRomBrowser::LoadRomList (void) {
|
||||
stdstr FileName = _Settings->LoadString(SupportFile_RomListCache);
|
||||
stdstr FileName = g_Settings->LoadString(SupportFile_RomListCache);
|
||||
|
||||
//Open the cache file
|
||||
HANDLE hFile = CreateFile(FileName.c_str(),GENERIC_READ,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS, NULL);
|
||||
|
@ -972,7 +972,7 @@ void CRomBrowser::RefreshRomBrowserStatic (CRomBrowser * _this)
|
|||
if (_this->m_hRomList == NULL) { return; }
|
||||
|
||||
//delete cache
|
||||
stdstr CacheFileName = _Settings->LoadString(SupportFile_RomListCache);
|
||||
stdstr CacheFileName = g_Settings->LoadString(SupportFile_RomListCache);
|
||||
DeleteFile(CacheFileName.c_str());
|
||||
|
||||
//clear all current items
|
||||
|
@ -985,7 +985,7 @@ void CRomBrowser::RefreshRomBrowserStatic (CRomBrowser * _this)
|
|||
Sleep(100);
|
||||
WriteTrace(TraceDebug,"CRomBrowser::RefreshRomBrowserStatic 3");
|
||||
|
||||
if (_this->m_WatchRomDir != _Settings->LoadString(Directory_Game))
|
||||
if (_this->m_WatchRomDir != g_Settings->LoadString(Directory_Game))
|
||||
{
|
||||
WriteTrace(TraceDebug,"CRomBrowser::RefreshRomBrowserStatic 4");
|
||||
_this->WatchThreadStop();
|
||||
|
@ -995,8 +995,8 @@ void CRomBrowser::RefreshRomBrowserStatic (CRomBrowser * _this)
|
|||
}
|
||||
|
||||
WriteTrace(TraceDebug,"CRomBrowser::RefreshRomBrowserStatic 7");
|
||||
stdstr RomDir = _Settings->LoadString(Directory_Game);
|
||||
stdstr LastRom = _Settings->LoadStringIndex(File_RecentGameFileIndex,0);
|
||||
stdstr RomDir = g_Settings->LoadString(Directory_Game);
|
||||
stdstr LastRom = g_Settings->LoadStringIndex(File_RecentGameFileIndex,0);
|
||||
WriteTrace(TraceDebug,"CRomBrowser::RefreshRomBrowserStatic 8");
|
||||
|
||||
strlist FileNames;
|
||||
|
@ -1054,15 +1054,15 @@ void CRomBrowser::ResetRomBrowserColomuns (void) {
|
|||
void CRomBrowser::ResizeRomList (WORD nWidth, WORD nHeight) {
|
||||
if (RomBrowserVisible())
|
||||
{
|
||||
if (_Settings->LoadDword(RomBrowser_Maximized) == 0 && nHeight != 0)
|
||||
if (g_Settings->LoadDword(RomBrowser_Maximized) == 0 && nHeight != 0)
|
||||
{
|
||||
if (_Settings->LoadDword(RomBrowser_Width) != nWidth)
|
||||
if (g_Settings->LoadDword(RomBrowser_Width) != nWidth)
|
||||
{
|
||||
_Settings->SaveDword(RomBrowser_Width,nWidth);
|
||||
g_Settings->SaveDword(RomBrowser_Width,nWidth);
|
||||
}
|
||||
if (_Settings->LoadDword(RomBrowser_Height) != nHeight)
|
||||
if (g_Settings->LoadDword(RomBrowser_Height) != nHeight)
|
||||
{
|
||||
_Settings->SaveDword(RomBrowser_Height,nHeight);
|
||||
g_Settings->SaveDword(RomBrowser_Height,nHeight);
|
||||
}
|
||||
}
|
||||
if (IsWindow((HWND)m_StatusWindow)) {
|
||||
|
@ -1088,7 +1088,7 @@ void CRomBrowser::RomBrowserToTop(void) {
|
|||
}
|
||||
|
||||
void CRomBrowser::RomBrowserMaximize(bool Mazimize) {
|
||||
_Settings->SaveDword(RomBrowser_Maximized,(DWORD)Mazimize);
|
||||
g_Settings->SaveDword(RomBrowser_Maximized,(DWORD)Mazimize);
|
||||
}
|
||||
|
||||
bool CRomBrowser::RomListDrawItem(int idCtrl, DWORD lParam) {
|
||||
|
@ -1184,17 +1184,17 @@ void CRomBrowser::RomList_ColoumnSortList(DWORD pnmh) {
|
|||
if (m_Fields[index].Pos() == (size_t)pnmv->iSubItem) { break; }
|
||||
}
|
||||
if (m_Fields.size() == index) { return; }
|
||||
if (_stricmp(_Settings->LoadStringIndex(RomBrowser_SortFieldIndex,0).c_str(),m_Fields[index].Name()) == 0) {
|
||||
_Settings->SaveBoolIndex(RomBrowser_SortAscendingIndex,0,!_Settings->LoadBoolIndex(RomBrowser_SortAscendingIndex,0));
|
||||
if (_stricmp(g_Settings->LoadStringIndex(RomBrowser_SortFieldIndex,0).c_str(),m_Fields[index].Name()) == 0) {
|
||||
g_Settings->SaveBoolIndex(RomBrowser_SortAscendingIndex,0,!g_Settings->LoadBoolIndex(RomBrowser_SortAscendingIndex,0));
|
||||
} else {
|
||||
int count;
|
||||
|
||||
for (count = NoOfSortKeys; count > 0; count --) {
|
||||
_Settings->SaveStringIndex(RomBrowser_SortFieldIndex,count,_Settings->LoadStringIndex(RomBrowser_SortFieldIndex,count - 1).c_str());
|
||||
_Settings->SaveBoolIndex(RomBrowser_SortAscendingIndex,count,_Settings->LoadBoolIndex(RomBrowser_SortAscendingIndex, count - 1));
|
||||
g_Settings->SaveStringIndex(RomBrowser_SortFieldIndex,count,g_Settings->LoadStringIndex(RomBrowser_SortFieldIndex,count - 1).c_str());
|
||||
g_Settings->SaveBoolIndex(RomBrowser_SortAscendingIndex,count,g_Settings->LoadBoolIndex(RomBrowser_SortAscendingIndex, count - 1));
|
||||
}
|
||||
_Settings->SaveStringIndex(RomBrowser_SortFieldIndex,0,m_Fields[index].Name());
|
||||
_Settings->SaveBoolIndex(RomBrowser_SortAscendingIndex,0,true);
|
||||
g_Settings->SaveStringIndex(RomBrowser_SortFieldIndex,0,m_Fields[index].Name());
|
||||
g_Settings->SaveBoolIndex(RomBrowser_SortAscendingIndex,0,true);
|
||||
}
|
||||
RomList_SortList();
|
||||
}
|
||||
|
@ -1383,8 +1383,8 @@ void CRomBrowser::RomList_PopupMenu(DWORD /*pnmh*/)
|
|||
DeleteMenu((HMENU)hPopupMenu,1,MF_BYPOSITION);
|
||||
DeleteMenu((HMENU)hPopupMenu,0,MF_BYPOSITION);
|
||||
} else {
|
||||
bool inBasicMode = _Settings->LoadDword(UserInterface_BasicMode) != 0;
|
||||
bool CheatsRemembered = _Settings->LoadDword(Setting_RememberCheats) != 0;
|
||||
bool inBasicMode = g_Settings->LoadDword(UserInterface_BasicMode) != 0;
|
||||
bool CheatsRemembered = g_Settings->LoadDword(Setting_RememberCheats) != 0;
|
||||
if (!CheatsRemembered) { DeleteMenu((HMENU)hPopupMenu,9,MF_BYPOSITION); }
|
||||
if (inBasicMode) { DeleteMenu((HMENU)hPopupMenu,8,MF_BYPOSITION); }
|
||||
if (inBasicMode && !CheatsRemembered) { DeleteMenu((HMENU)hPopupMenu,7,MF_BYPOSITION); }
|
||||
|
@ -1417,7 +1417,7 @@ void CRomBrowser::RomList_SortList(void) {
|
|||
SORT_FIELD SortFieldInfo;
|
||||
|
||||
for (int count = NoOfSortKeys; count >= 0; count --) {
|
||||
stdstr SortFieldName = _Settings->LoadStringIndex(RomBrowser_SortFieldIndex,count);
|
||||
stdstr SortFieldName = g_Settings->LoadStringIndex(RomBrowser_SortFieldIndex,count);
|
||||
|
||||
size_t index;
|
||||
for (index = 0; index < m_Fields.size(); index++) {
|
||||
|
@ -1426,7 +1426,7 @@ void CRomBrowser::RomList_SortList(void) {
|
|||
if (index >= m_Fields.size()) { continue; }
|
||||
SortFieldInfo._this = this;
|
||||
SortFieldInfo.Key = index;
|
||||
SortFieldInfo.KeyAscend = _Settings->LoadBoolIndex(RomBrowser_SortAscendingIndex,count) != 0;
|
||||
SortFieldInfo.KeyAscend = g_Settings->LoadBoolIndex(RomBrowser_SortAscendingIndex,count) != 0;
|
||||
ListView_SortItems((HWND)m_hRomList, RomList_CompareItems, &SortFieldInfo );
|
||||
}
|
||||
}
|
||||
|
@ -1440,7 +1440,7 @@ void CRomBrowser::SaveRomList ( strlist & FileList )
|
|||
{
|
||||
MD5 ListHash = RomListHash(FileList);
|
||||
|
||||
stdstr FileName = _Settings->LoadString(SupportFile_RomListCache);
|
||||
stdstr FileName = g_Settings->LoadString(SupportFile_RomListCache);
|
||||
HANDLE hFile = CreateFile(FileName.c_str(),GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS, NULL);
|
||||
|
||||
DWORD dwWritten;
|
||||
|
@ -1467,7 +1467,7 @@ void CRomBrowser::SaveRomList ( strlist & FileList )
|
|||
void CRomBrowser::SaveRomListColoumnInfo(void) {
|
||||
WriteTrace(TraceDebug,"SaveRomListColoumnInfo - Start");
|
||||
// if (!RomBrowserVisible()) { return; }
|
||||
if (_Settings == NULL) { return; }
|
||||
if (g_Settings == NULL) { return; }
|
||||
|
||||
LV_COLUMN lvColumn;
|
||||
|
||||
|
@ -1519,7 +1519,7 @@ void CRomBrowser::SelectRomDir(void)
|
|||
BROWSEINFO bi;
|
||||
|
||||
WriteTrace(TraceDebug,"CRomBrowser::SelectRomDir 1");
|
||||
stdstr RomDir = _Settings->LoadString(Directory_Game);
|
||||
stdstr RomDir = g_Settings->LoadString(Directory_Game);
|
||||
bi.hwndOwner = (HWND)m_MainWindow;
|
||||
bi.pidlRoot = NULL;
|
||||
bi.pszDisplayName = SelectedDir;
|
||||
|
@ -1540,7 +1540,7 @@ void CRomBrowser::SelectRomDir(void)
|
|||
}
|
||||
WriteTrace(TraceDebug,"CRomBrowser::SelectRomDir 4");
|
||||
WriteTrace(TraceDebug,"CRomBrowser::SelectRomDir 6");
|
||||
_Settings->SaveString(Directory_Game,Directory);
|
||||
g_Settings->SaveString(Directory_Game,Directory);
|
||||
WriteTrace(TraceDebug,"CRomBrowser::SelectRomDir 7");
|
||||
g_Notify->AddRecentDir(Directory);
|
||||
WriteTrace(TraceDebug,"CRomBrowser::SelectRomDir 8");
|
||||
|
@ -1556,8 +1556,8 @@ void CRomBrowser::FixRomListWindow (void) {
|
|||
SetWindowLong((HWND)m_MainWindow,GWL_STYLE,Style);
|
||||
|
||||
//Fix height and width
|
||||
int Width = _Settings->LoadDword(RomBrowser_Width);
|
||||
int Height = _Settings->LoadDword(RomBrowser_Height);
|
||||
int Width = g_Settings->LoadDword(RomBrowser_Width);
|
||||
int Height = g_Settings->LoadDword(RomBrowser_Height);
|
||||
|
||||
if (Width < 200) { Width = 200; }
|
||||
if (Height < 200) { Height = 200; }
|
||||
|
@ -1576,7 +1576,7 @@ void CRomBrowser::FixRomListWindow (void) {
|
|||
}
|
||||
|
||||
void CRomBrowser::ShowRomList (void) {
|
||||
if (_Settings->LoadBool(GameRunning_CPU_Running)) { return; }
|
||||
if (g_Settings->LoadBool(GameRunning_CPU_Running)) { return; }
|
||||
m_ShowingRomBrowser = true;
|
||||
WatchThreadStop();
|
||||
if (m_hRomList == NULL) { CreateRomListControl(); }
|
||||
|
@ -1619,7 +1619,7 @@ void CRomBrowser::HideRomList (void) {
|
|||
EnableWindow((HWND)m_hRomList,FALSE);
|
||||
ShowWindow((HWND)m_hRomList,SW_HIDE);
|
||||
|
||||
if (_Settings->LoadBool(RomBrowser_Maximized)) { ShowWindow((HWND)m_MainWindow,SW_RESTORE); }
|
||||
if (g_Settings->LoadBool(RomBrowser_Maximized)) { ShowWindow((HWND)m_MainWindow,SW_RESTORE); }
|
||||
|
||||
//Change the window style
|
||||
long Style = GetWindowLong((HWND)m_MainWindow,GWL_STYLE) & ~(WS_SIZEBOX | WS_MAXIMIZEBOX);
|
||||
|
@ -1630,8 +1630,8 @@ void CRomBrowser::HideRomList (void) {
|
|||
GetWindowRect((HWND)m_MainWindow,&rect);
|
||||
int X = (GetSystemMetrics( SM_CXSCREEN ) - (rect.right - rect.left)) / 2;
|
||||
int Y = (GetSystemMetrics( SM_CYSCREEN ) - (rect.bottom - rect.top)) / 2;
|
||||
_Settings->LoadDword(UserInterface_MainWindowTop,(DWORD &)Y);
|
||||
_Settings->LoadDword(UserInterface_MainWindowLeft,(DWORD &)X);
|
||||
g_Settings->LoadDword(UserInterface_MainWindowTop,(DWORD &)Y);
|
||||
g_Settings->LoadDword(UserInterface_MainWindowLeft,(DWORD &)X);
|
||||
SetWindowPos((HWND)m_MainWindow,NULL,X,Y,0,0,SWP_NOZORDER|SWP_NOSIZE);
|
||||
|
||||
//Mark the window as not visible
|
||||
|
@ -1649,7 +1649,7 @@ bool CRomBrowser::RomDirNeedsRefresh ( void )
|
|||
bool InWatchThread = (m_WatchThreadID == GetCurrentThreadId());
|
||||
|
||||
//Get Old MD5 of file names
|
||||
stdstr FileName = _Settings->LoadString(SupportFile_RomListCache);
|
||||
stdstr FileName = g_Settings->LoadString(SupportFile_RomListCache);
|
||||
HANDLE hFile = CreateFile(FileName.c_str(),GENERIC_READ,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS, NULL);
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
|
@ -1664,7 +1664,7 @@ bool CRomBrowser::RomDirNeedsRefresh ( void )
|
|||
|
||||
//Get Current MD5 of file names
|
||||
strlist FileNames;
|
||||
if (!GetRomFileNames(FileNames,CPath(_Settings->LoadString(Directory_Game)),stdstr(""), InWatchThread ))
|
||||
if (!GetRomFileNames(FileNames,CPath(g_Settings->LoadString(Directory_Game)),stdstr(""), InWatchThread ))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -1697,7 +1697,7 @@ void CRomBrowser::WatchRomDirChanged ( CRomBrowser * _this )
|
|||
try
|
||||
{
|
||||
WriteTrace(TraceDebug,"CRomBrowser::WatchRomDirChanged 1");
|
||||
_this->m_WatchRomDir = _Settings->LoadString(Directory_Game);
|
||||
_this->m_WatchRomDir = g_Settings->LoadString(Directory_Game);
|
||||
WriteTrace(TraceDebug,"CRomBrowser::WatchRomDirChanged 2");
|
||||
if (_this->RomDirNeedsRefresh())
|
||||
{
|
||||
|
@ -1707,7 +1707,7 @@ void CRomBrowser::WatchRomDirChanged ( CRomBrowser * _this )
|
|||
WriteTrace(TraceDebug,"CRomBrowser::WatchRomDirChanged 3");
|
||||
HANDLE hChange[] = {
|
||||
_this->m_WatchStopEvent,
|
||||
FindFirstChangeNotification(_this->m_WatchRomDir.c_str(),_Settings->LoadDword(RomBrowser_Recursive),FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_SIZE),
|
||||
FindFirstChangeNotification(_this->m_WatchRomDir.c_str(),g_Settings->LoadDword(RomBrowser_Recursive),FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_SIZE),
|
||||
};
|
||||
WriteTrace(TraceDebug,"CRomBrowser::WatchRomDirChanged 4");
|
||||
for (;;)
|
||||
|
|
|
@ -25,8 +25,8 @@ public:
|
|||
{
|
||||
if (!UseDefault)
|
||||
{
|
||||
m_PosChanged = _Settings->LoadDwordIndex(RomBrowser_PosIndex,m_ID,(ULONG &)m_Pos );
|
||||
_Settings->LoadDwordIndex(RomBrowser_WidthIndex,m_ID,m_ColWidth);
|
||||
m_PosChanged = g_Settings->LoadDwordIndex(RomBrowser_PosIndex,m_ID,(ULONG &)m_Pos );
|
||||
g_Settings->LoadDwordIndex(RomBrowser_WidthIndex,m_ID,m_ColWidth);
|
||||
}
|
||||
}
|
||||
inline LPCSTR Name ( void ) const { return m_Name.c_str(); }
|
||||
|
@ -39,18 +39,18 @@ public:
|
|||
void SetColWidth ( int ColWidth )
|
||||
{
|
||||
m_ColWidth = ColWidth;
|
||||
_Settings->SaveDwordIndex(RomBrowser_WidthIndex,m_ID,m_ColWidth);
|
||||
g_Settings->SaveDwordIndex(RomBrowser_WidthIndex,m_ID,m_ColWidth);
|
||||
}
|
||||
void SetColPos ( int Pos)
|
||||
{
|
||||
m_Pos = Pos;
|
||||
_Settings->SaveDwordIndex(RomBrowser_PosIndex,m_ID,m_Pos);
|
||||
g_Settings->SaveDwordIndex(RomBrowser_PosIndex,m_ID,m_Pos);
|
||||
m_PosChanged = true;
|
||||
}
|
||||
void ResetPos ( void )
|
||||
{
|
||||
m_Pos = m_DefaultPos;
|
||||
_Settings->DeleteSettingIndex(RomBrowser_PosIndex,m_ID);
|
||||
g_Settings->DeleteSettingIndex(RomBrowser_PosIndex,m_ID);
|
||||
m_PosChanged = false;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -57,11 +57,11 @@ bool CSettingConfig::UpdateAdvanced ( bool AdvancedMode, HTREEITEM hItem )
|
|||
|
||||
LRESULT CSettingConfig::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
|
||||
{
|
||||
stdstr ConfigRomTitle, GameIni(_Settings->LoadString(Game_IniKey));
|
||||
stdstr ConfigRomTitle, GameIni(g_Settings->LoadString(Game_IniKey));
|
||||
|
||||
if (!GameIni.empty())
|
||||
{
|
||||
ConfigRomTitle.Format("Config: %s",_Settings->LoadString(Game_GoodName).c_str());
|
||||
ConfigRomTitle.Format("Config: %s",g_Settings->LoadString(Game_GoodName).c_str());
|
||||
}
|
||||
|
||||
RECT rcSettingInfo;
|
||||
|
@ -72,21 +72,21 @@ LRESULT CSettingConfig::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*
|
|||
|
||||
if (m_GameConfig)
|
||||
{
|
||||
if (_Settings->LoadBool(Setting_RdbEditor))
|
||||
if (g_Settings->LoadBool(Setting_RdbEditor))
|
||||
{
|
||||
SetWindowText(stdstr_f("%s ** RDB Edit Mode **",ConfigRomTitle.c_str()).c_str());
|
||||
} else {
|
||||
SetWindowText(ConfigRomTitle.c_str());
|
||||
}
|
||||
} else {
|
||||
if (_Settings->LoadBool(Setting_RdbEditor))
|
||||
if (g_Settings->LoadBool(Setting_RdbEditor))
|
||||
{
|
||||
SetWindowText(stdstr_f("%s ** RDB Edit Mode **",GS(OPTIONS_TITLE)).c_str());
|
||||
} else {
|
||||
SetWindowText(GS(OPTIONS_TITLE));
|
||||
}
|
||||
|
||||
if (_Settings->LoadBool(Setting_PluginPageFirst))
|
||||
if (g_Settings->LoadBool(Setting_PluginPageFirst))
|
||||
{
|
||||
SettingsSection = new CConfigSettingSection(GS(TAB_PLUGIN));
|
||||
SettingsSection->AddPage(new COptionPluginPage(this->m_hWnd,rcSettingInfo ));
|
||||
|
@ -110,7 +110,7 @@ LRESULT CSettingConfig::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*
|
|||
SettingsSection->AddPage(new COptionsShortCutsPage(this->m_hWnd,rcSettingInfo ));
|
||||
m_Sections.push_back(SettingsSection);
|
||||
|
||||
if (!_Settings->LoadBool(Setting_PluginPageFirst))
|
||||
if (!g_Settings->LoadBool(Setting_PluginPageFirst))
|
||||
{
|
||||
SettingsSection = new CConfigSettingSection(GS(TAB_PLUGIN));
|
||||
SettingsSection->AddPage(new COptionPluginPage(this->m_hWnd,rcSettingInfo ));
|
||||
|
@ -125,7 +125,7 @@ LRESULT CSettingConfig::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*
|
|||
GameSettings->AddPage(new CGameGeneralPage(this->m_hWnd,rcSettingInfo ));
|
||||
GameSettings->AddPage(new CGameRecompilePage(this->m_hWnd,rcSettingInfo ));
|
||||
GameSettings->AddPage(new CGamePluginPage(this->m_hWnd,rcSettingInfo ));
|
||||
if (_Settings->LoadBool(Setting_RdbEditor))
|
||||
if (g_Settings->LoadBool(Setting_RdbEditor))
|
||||
{
|
||||
GameSettings->AddPage(new CGameStatusPage(this->m_hWnd,rcSettingInfo ));
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ LRESULT CSettingConfig::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*
|
|||
m_PagesTreeList.Attach(GetDlgItem(IDC_PAGELIST));
|
||||
|
||||
bool bFirstItem = true;
|
||||
bool HideAdvanced = _Settings->LoadBool(UserInterface_BasicMode);
|
||||
bool HideAdvanced = g_Settings->LoadBool(UserInterface_BasicMode);
|
||||
for (SETTING_SECTIONS::const_iterator iter = m_Sections.begin(); iter != m_Sections.end(); iter++)
|
||||
{
|
||||
CConfigSettingSection * Section = *iter;
|
||||
|
@ -215,14 +215,14 @@ LRESULT CSettingConfig::OnClicked (WORD /*wNotifyCode*/, WORD wID, HWND , BOOL&
|
|||
|
||||
void CSettingConfig::ApplySettings( bool UpdateScreen )
|
||||
{
|
||||
stdstr GameIni(_Settings->LoadString(Game_IniKey));
|
||||
stdstr GameIni(g_Settings->LoadString(Game_IniKey));
|
||||
|
||||
if (!GameIni.empty())
|
||||
{
|
||||
stdstr GoodName;
|
||||
if (!_Settings->LoadString(Game_GoodName,GoodName))
|
||||
if (!g_Settings->LoadString(Game_GoodName,GoodName))
|
||||
{
|
||||
_Settings->SaveString(Game_GoodName,GoodName);
|
||||
g_Settings->SaveString(Game_GoodName,GoodName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -155,35 +155,35 @@ void COptionsDirectoriesPage::UpdatePageSettings()
|
|||
stdstr Directory;
|
||||
|
||||
m_InUpdateSettings = true;
|
||||
m_PluginDir.SetChanged(_Settings->LoadString(Directory_PluginSelected,Directory));
|
||||
m_PluginDir.SetChanged(g_Settings->LoadString(Directory_PluginSelected,Directory));
|
||||
m_PluginDir.SetWindowText(Directory.c_str());
|
||||
m_AutoSaveDir.SetChanged(_Settings->LoadString(Directory_NativeSaveSelected,Directory));
|
||||
m_AutoSaveDir.SetChanged(g_Settings->LoadString(Directory_NativeSaveSelected,Directory));
|
||||
m_AutoSaveDir.SetWindowText(Directory.c_str());
|
||||
m_InstantSaveDir.SetChanged(_Settings->LoadString(Directory_InstantSaveSelected,Directory));
|
||||
m_InstantSaveDir.SetChanged(g_Settings->LoadString(Directory_InstantSaveSelected,Directory));
|
||||
m_InstantSaveDir.SetWindowText(Directory.c_str());
|
||||
m_ScreenShotDir.SetChanged(_Settings->LoadString(Directory_SnapShotSelected,Directory));
|
||||
m_ScreenShotDir.SetChanged(g_Settings->LoadString(Directory_SnapShotSelected,Directory));
|
||||
m_ScreenShotDir.SetWindowText(Directory.c_str());
|
||||
m_TextureDir.SetChanged(_Settings->LoadString(Directory_TextureSelected,Directory));
|
||||
m_TextureDir.SetChanged(g_Settings->LoadString(Directory_TextureSelected,Directory));
|
||||
m_TextureDir.SetWindowText(Directory.c_str());
|
||||
|
||||
bool UseSelected;
|
||||
m_PluginDefault.SetChanged(_Settings->LoadBool(Directory_PluginUseSelected,UseSelected));
|
||||
m_PluginDefault.SetChanged(g_Settings->LoadBool(Directory_PluginUseSelected,UseSelected));
|
||||
m_PluginDefault.SetCheck(!UseSelected);
|
||||
m_PluginSelected.SetCheck(UseSelected);
|
||||
|
||||
m_AutoSaveDefault.SetChanged(_Settings->LoadBool(Directory_NativeSaveUseSelected,UseSelected));
|
||||
m_AutoSaveDefault.SetChanged(g_Settings->LoadBool(Directory_NativeSaveUseSelected,UseSelected));
|
||||
m_AutoSaveDefault.SetCheck(!UseSelected);
|
||||
m_AutoSaveSelected.SetCheck(UseSelected);
|
||||
|
||||
m_InstantDefault.SetChanged(_Settings->LoadBool(Directory_InstantSaveUseSelected,UseSelected));
|
||||
m_InstantDefault.SetChanged(g_Settings->LoadBool(Directory_InstantSaveUseSelected,UseSelected));
|
||||
m_InstantDefault.SetCheck(!UseSelected);
|
||||
m_InstantSelected.SetCheck(UseSelected);
|
||||
|
||||
m_ScreenShotDefault.SetChanged(_Settings->LoadBool(Directory_SnapShotUseSelected,UseSelected));
|
||||
m_ScreenShotDefault.SetChanged(g_Settings->LoadBool(Directory_SnapShotUseSelected,UseSelected));
|
||||
m_ScreenShotDefault.SetCheck(!UseSelected);
|
||||
m_ScreenShotSelected.SetCheck(UseSelected);
|
||||
|
||||
m_TextureDefault.SetChanged(_Settings->LoadBool(Directory_TextureUseSelected,UseSelected));
|
||||
m_TextureDefault.SetChanged(g_Settings->LoadBool(Directory_TextureUseSelected,UseSelected));
|
||||
m_TextureDefault.SetCheck(!UseSelected);
|
||||
m_TextureSelected.SetCheck(UseSelected);
|
||||
|
||||
|
@ -240,7 +240,7 @@ void COptionsDirectoriesPage::ResetDirectory( CModifiedEditBox & EditBox, Settin
|
|||
return;
|
||||
}
|
||||
stdstr dir;
|
||||
_Settings->LoadDefaultString(Type,dir);
|
||||
g_Settings->LoadDefaultString(Type,dir);
|
||||
EditBox.SetWindowText(dir.c_str());
|
||||
EditBox.SetReset(true);
|
||||
}
|
||||
|
@ -252,7 +252,7 @@ void COptionsDirectoriesPage::ResetDefaultSelected ( CModifiedButton & ButtonDef
|
|||
return;
|
||||
}
|
||||
bool UseSelected;
|
||||
_Settings->LoadDefaultBool(Type,UseSelected);
|
||||
g_Settings->LoadDefaultBool(Type,UseSelected);
|
||||
ButtonDefault.SetCheck(!UseSelected);
|
||||
ButtonSelected.SetCheck(UseSelected);
|
||||
ButtonDefault.SetReset(true);
|
||||
|
@ -263,11 +263,11 @@ void COptionsDirectoriesPage::UpdateDirectory( CModifiedEditBox & EditBox, Setti
|
|||
if (EditBox.IsChanged())
|
||||
{
|
||||
stdstr dir = EditBox.GetWindowText();
|
||||
_Settings->SaveString(Type,dir.c_str());
|
||||
g_Settings->SaveString(Type,dir.c_str());
|
||||
}
|
||||
if (EditBox.IsReset())
|
||||
{
|
||||
_Settings->DeleteSetting(Type);
|
||||
g_Settings->DeleteSetting(Type);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -276,16 +276,16 @@ void COptionsDirectoriesPage::UpdateDefaultSelected ( CModifiedButton & Button,
|
|||
if (Button.IsChanged())
|
||||
{
|
||||
bool bUseSelected = (Button.GetCheck() & BST_CHECKED) == 0;
|
||||
_Settings->SaveBool(Type,bUseSelected);
|
||||
g_Settings->SaveBool(Type,bUseSelected);
|
||||
|
||||
if (Type == Directory_TextureUseSelected && !bUseSelected)
|
||||
{
|
||||
_Settings->DeleteSetting(Directory_TextureSelected);
|
||||
g_Settings->DeleteSetting(Directory_TextureSelected);
|
||||
}
|
||||
}
|
||||
if (Button.IsReset())
|
||||
{
|
||||
_Settings->DeleteSetting(Type);
|
||||
g_Settings->DeleteSetting(Type);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ CGameGeneralPage::CGameGeneralPage (HWND hParent, const RECT & rcDispay )
|
|||
ComboBox->AddItem(GS(NUMBER_6), 6 );
|
||||
}
|
||||
|
||||
SetDlgItemText(IDC_GOOD_NAME,_Settings->LoadString(Game_GoodName).c_str());
|
||||
SetDlgItemText(IDC_GOOD_NAME,g_Settings->LoadString(Game_GoodName).c_str());
|
||||
|
||||
CModifiedEditBox * TxtBox = AddModTextBox(GetDlgItem(IDC_VIREFRESH),Game_ViRefreshRate, false);
|
||||
TxtBox->SetTextField(GetDlgItem(IDC_VIREFESH_TEXT));
|
||||
|
|
|
@ -42,7 +42,7 @@ CGamePluginPage::CGamePluginPage (HWND hParent, const RECT & rcDispay )
|
|||
void CGamePluginPage::AddPlugins (int ListId,SettingID Type, PLUGIN_TYPE PluginType )
|
||||
{
|
||||
stdstr Default;
|
||||
bool PluginSelected = _Settings->LoadString(Type,Default);
|
||||
bool PluginSelected = g_Settings->LoadString(Type,Default);
|
||||
|
||||
CModifiedComboBox * ComboBox;
|
||||
ComboBox = AddModComboBox(GetDlgItem(ListId),Type);
|
||||
|
@ -171,7 +171,7 @@ void CGamePluginPage::UpdatePageSettings ( void )
|
|||
CModifiedComboBox * ComboBox = cb_iter->second;
|
||||
stdstr SelectedValue;
|
||||
|
||||
bool PluginChanged = _Settings->LoadString(cb_iter->first,SelectedValue);
|
||||
bool PluginChanged = g_Settings->LoadString(cb_iter->first,SelectedValue);
|
||||
ComboBox->SetChanged(PluginChanged);
|
||||
if (PluginChanged)
|
||||
{
|
||||
|
@ -247,26 +247,26 @@ void CGamePluginPage::ApplyComboBoxes ( void )
|
|||
|
||||
if (Plugin)
|
||||
{
|
||||
if (_Settings->LoadString(cb_iter->first) != Plugin->FileName.c_str())
|
||||
if (g_Settings->LoadString(cb_iter->first) != Plugin->FileName.c_str())
|
||||
{
|
||||
_Settings->SaveString(cb_iter->first,Plugin->FileName.c_str());
|
||||
g_Settings->SaveString(cb_iter->first,Plugin->FileName.c_str());
|
||||
}
|
||||
} else {
|
||||
_Settings->DeleteSetting(cb_iter->first);
|
||||
g_Settings->DeleteSetting(cb_iter->first);
|
||||
}
|
||||
switch (cb_iter->first)
|
||||
{
|
||||
case Game_EditPlugin_RSP: _Settings->SaveBool(Plugin_RSP_Changed,true); break;
|
||||
case Game_EditPlugin_Gfx: _Settings->SaveBool(Plugin_GFX_Changed,true); break;
|
||||
case Game_EditPlugin_Audio: _Settings->SaveBool(Plugin_AUDIO_Changed,true); break;
|
||||
case Game_EditPlugin_Contr: _Settings->SaveBool(Plugin_CONT_Changed,true); break;
|
||||
case Game_EditPlugin_RSP: g_Settings->SaveBool(Plugin_RSP_Changed,true); break;
|
||||
case Game_EditPlugin_Gfx: g_Settings->SaveBool(Plugin_GFX_Changed,true); break;
|
||||
case Game_EditPlugin_Audio: g_Settings->SaveBool(Plugin_AUDIO_Changed,true); break;
|
||||
case Game_EditPlugin_Contr: g_Settings->SaveBool(Plugin_CONT_Changed,true); break;
|
||||
default:
|
||||
Notify().BreakPoint(__FILE__,__LINE__);
|
||||
}
|
||||
}
|
||||
if (ComboBox->IsReset())
|
||||
{
|
||||
_Settings->DeleteSetting(cb_iter->first);
|
||||
g_Settings->DeleteSetting(cb_iter->first);
|
||||
ComboBox->SetReset(false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ CGameRecompilePage::CGameRecompilePage (HWND hParent, const RECT & rcDispay )
|
|||
{
|
||||
ComboBox->AddItem(GS(CORE_RECOMPILER), CPU_Recompiler);
|
||||
ComboBox->AddItem(GS(CORE_INTERPTER), CPU_Interpreter);
|
||||
if (_Settings->LoadBool(Debugger_Enabled))
|
||||
if (g_Settings->LoadBool(Debugger_Enabled))
|
||||
{
|
||||
ComboBox->AddItem(GS(CORE_SYNC), CPU_SyncCores);
|
||||
}
|
||||
|
|
|
@ -9,10 +9,10 @@ CGameStatusPage::CGameStatusPage (HWND hParent, const RECT & rcDispay )
|
|||
return;
|
||||
}
|
||||
|
||||
CIniFile RomIniFile (_Settings->LoadString(SupportFile_RomDatabase).c_str());
|
||||
CIniFile RomIniFile (g_Settings->LoadString(SupportFile_RomDatabase).c_str());
|
||||
strlist Keys;
|
||||
RomIniFile.GetKeyList("Rom Status",Keys);
|
||||
stdstr Status = _Settings->LoadString(Rdb_Status);
|
||||
stdstr Status = g_Settings->LoadString(Rdb_Status);
|
||||
|
||||
CModifiedComboBoxTxt * ComboBox;
|
||||
ComboBox = AddModComboBoxTxt(GetDlgItem(IDC_STATUS_TYPE),Rdb_Status);
|
||||
|
|
|
@ -221,7 +221,7 @@ void COptionsGameBrowserPage::ApplySettings( bool UpdateScreen )
|
|||
}
|
||||
if (bColChanged)
|
||||
{
|
||||
_Settings->SaveBool(RomBrowser_ColoumnsChanged,!_Settings->LoadBool(RomBrowser_ColoumnsChanged));
|
||||
g_Settings->SaveBool(RomBrowser_ColoumnsChanged,!g_Settings->LoadBool(RomBrowser_ColoumnsChanged));
|
||||
}
|
||||
|
||||
CSettingsPageImpl<COptionsGameBrowserPage>::ApplySettings(UpdateScreen);
|
||||
|
|
|
@ -341,7 +341,7 @@ void COptionsShortCutsPage::ShowPage()
|
|||
void COptionsShortCutsPage::ApplySettings( bool /*UpdateScreen*/ )
|
||||
{
|
||||
m_ShortCuts.Save();
|
||||
_Settings->SaveBool(Info_ShortCutsChanged,true);
|
||||
g_Settings->SaveBool(Info_ShortCutsChanged,true);
|
||||
}
|
||||
|
||||
bool COptionsShortCutsPage::EnableReset ( void )
|
||||
|
|
|
@ -40,7 +40,7 @@ COptionPluginPage::COptionPluginPage (HWND hParent, const RECT & rcDispay )
|
|||
|
||||
void COptionPluginPage::AddPlugins (int ListId,SettingID Type, PLUGIN_TYPE PluginType )
|
||||
{
|
||||
stdstr Default = _Settings->LoadString(Type);
|
||||
stdstr Default = g_Settings->LoadString(Type);
|
||||
|
||||
CModifiedComboBox * ComboBox;
|
||||
ComboBox = AddModComboBox(GetDlgItem(ListId),Type);
|
||||
|
@ -163,7 +163,7 @@ void COptionPluginPage::UpdatePageSettings ( void )
|
|||
CModifiedComboBox * ComboBox = cb_iter->second;
|
||||
stdstr SelectedValue;
|
||||
|
||||
ComboBox->SetChanged(_Settings->LoadString(cb_iter->first,SelectedValue));
|
||||
ComboBox->SetChanged(g_Settings->LoadString(cb_iter->first,SelectedValue));
|
||||
for (int i = 0, n = ComboBox->GetCount(); i < n; i++ )
|
||||
{
|
||||
const CPluginList::PLUGIN ** PluginPtr = (const CPluginList::PLUGIN **)ComboBox->GetItemDataPtr(i);
|
||||
|
@ -236,20 +236,20 @@ void COptionPluginPage::ApplyComboBoxes ( void )
|
|||
|
||||
const CPluginList::PLUGIN * Plugin = *PluginPtr;
|
||||
|
||||
_Settings->SaveString(cb_iter->first,Plugin->FileName.c_str());
|
||||
g_Settings->SaveString(cb_iter->first,Plugin->FileName.c_str());
|
||||
switch (Plugin->Info.Type)
|
||||
{
|
||||
case PLUGIN_TYPE_RSP: _Settings->SaveBool(Plugin_RSP_Changed,true); break;
|
||||
case PLUGIN_TYPE_GFX: _Settings->SaveBool(Plugin_GFX_Changed,true); break;
|
||||
case PLUGIN_TYPE_AUDIO: _Settings->SaveBool(Plugin_AUDIO_Changed,true); break;
|
||||
case PLUGIN_TYPE_CONTROLLER: _Settings->SaveBool(Plugin_CONT_Changed,true); break;
|
||||
case PLUGIN_TYPE_RSP: g_Settings->SaveBool(Plugin_RSP_Changed,true); break;
|
||||
case PLUGIN_TYPE_GFX: g_Settings->SaveBool(Plugin_GFX_Changed,true); break;
|
||||
case PLUGIN_TYPE_AUDIO: g_Settings->SaveBool(Plugin_AUDIO_Changed,true); break;
|
||||
case PLUGIN_TYPE_CONTROLLER: g_Settings->SaveBool(Plugin_CONT_Changed,true); break;
|
||||
default:
|
||||
g_Notify->BreakPoint(__FILE__,__LINE__);
|
||||
}
|
||||
}
|
||||
if (ComboBox->IsReset())
|
||||
{
|
||||
_Settings->DeleteSetting(cb_iter->first);
|
||||
g_Settings->DeleteSetting(cb_iter->first);
|
||||
ComboBox->SetReset(false);
|
||||
}
|
||||
}
|
||||
|
@ -263,7 +263,7 @@ bool COptionPluginPage::ResetComboBox ( CModifiedComboBox & ComboBox, SettingID
|
|||
}
|
||||
|
||||
ComboBox.SetReset(true);
|
||||
stdstr Value = _Settings->LoadDefaultString(Type);
|
||||
stdstr Value = g_Settings->LoadDefaultString(Type);
|
||||
for (int i = 0, n = ComboBox.GetCount(); i < n; i++)
|
||||
{
|
||||
const CPluginList::PLUGIN ** PluginPtr = (const CPluginList::PLUGIN **)ComboBox.GetItemDataPtr(i);
|
||||
|
|
|
@ -77,15 +77,15 @@ protected:
|
|||
stdstr Value = EditBox.GetWindowText();
|
||||
if (EditBox.IsbString())
|
||||
{
|
||||
_Settings->SaveString(Type,Value);
|
||||
g_Settings->SaveString(Type,Value);
|
||||
} else {
|
||||
DWORD dwValue = atoi(Value.c_str());
|
||||
_Settings->SaveDword(Type,dwValue);
|
||||
g_Settings->SaveDword(Type,dwValue);
|
||||
}
|
||||
}
|
||||
if (EditBox.IsReset())
|
||||
{
|
||||
_Settings->DeleteSetting(Type);
|
||||
g_Settings->DeleteSetting(Type);
|
||||
EditBox.SetReset(false);
|
||||
}
|
||||
}
|
||||
|
@ -96,14 +96,14 @@ protected:
|
|||
if (CheckBox.IsChanged())
|
||||
{
|
||||
bool bValue = CheckBox.GetCheck() == BST_CHECKED;
|
||||
if (bValue != _Settings->LoadBool(Type))
|
||||
if (bValue != g_Settings->LoadBool(Type))
|
||||
{
|
||||
_Settings->SaveBool(Type,bValue);
|
||||
g_Settings->SaveBool(Type,bValue);
|
||||
}
|
||||
}
|
||||
if (CheckBox.IsReset())
|
||||
{
|
||||
_Settings->DeleteSetting(Type);
|
||||
g_Settings->DeleteSetting(Type);
|
||||
CheckBox.SetReset(false);
|
||||
}
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ protected:
|
|||
return false;
|
||||
}
|
||||
|
||||
bool Value = _Settings->LoadDefaultBool(Type);
|
||||
bool Value = g_Settings->LoadDefaultBool(Type);
|
||||
CheckBox.SetReset(true);
|
||||
CheckBox.SetCheck(Value ? BST_CHECKED : BST_UNCHECKED);
|
||||
return true;
|
||||
|
@ -130,11 +130,11 @@ protected:
|
|||
|
||||
if (EditBox.IsbString())
|
||||
{
|
||||
stdstr Value = _Settings->LoadDefaultString(Type);
|
||||
stdstr Value = g_Settings->LoadDefaultString(Type);
|
||||
EditBox.SetWindowText(Value.c_str());
|
||||
EditBox.SetReset(true);
|
||||
} else {
|
||||
DWORD Value = _Settings->LoadDefaultDword(Type);
|
||||
DWORD Value = g_Settings->LoadDefaultDword(Type);
|
||||
EditBox.SetWindowText(stdstr_f("%d",Value).c_str());
|
||||
EditBox.SetReset(true);
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ protected:
|
|||
return item->second;
|
||||
}
|
||||
|
||||
CModifiedComboBox * ComboBox = new CModifiedComboBox(_Settings->LoadDefaultDword(Type),NULL,false);
|
||||
CModifiedComboBox * ComboBox = new CModifiedComboBox(g_Settings->LoadDefaultDword(Type),NULL,false);
|
||||
if (ComboBox == NULL)
|
||||
{
|
||||
return NULL;
|
||||
|
@ -201,7 +201,7 @@ protected:
|
|||
return item->second;
|
||||
}
|
||||
|
||||
CModifiedComboBoxTxt * ComboBox = new CModifiedComboBoxTxt(_Settings->LoadDefaultString(Type));
|
||||
CModifiedComboBoxTxt * ComboBox = new CModifiedComboBoxTxt(g_Settings->LoadDefaultString(Type));
|
||||
if (ComboBox == NULL)
|
||||
{
|
||||
return NULL;
|
||||
|
@ -218,7 +218,7 @@ protected:
|
|||
CModifiedButton * Button = iter->second;
|
||||
bool SettingSelected;
|
||||
|
||||
Button->SetChanged(_Settings->LoadBool(iter->first,SettingSelected));
|
||||
Button->SetChanged(g_Settings->LoadBool(iter->first,SettingSelected));
|
||||
Button->SetCheck(SettingSelected ? BST_CHECKED : BST_UNCHECKED);
|
||||
}
|
||||
|
||||
|
@ -231,7 +231,7 @@ protected:
|
|||
CModifiedComboBoxTxt * ComboBox = cbtxt_iter->second;
|
||||
stdstr SelectedValue;
|
||||
|
||||
ComboBox->SetChanged(_Settings->LoadString(cbtxt_iter->first,SelectedValue));
|
||||
ComboBox->SetChanged(g_Settings->LoadString(cbtxt_iter->first,SelectedValue));
|
||||
ComboBox->SetDefault(SelectedValue);
|
||||
}
|
||||
|
||||
|
@ -240,7 +240,7 @@ protected:
|
|||
CModifiedComboBox * ComboBox = cb_iter->second;
|
||||
DWORD SelectedValue;
|
||||
|
||||
ComboBox->SetChanged(_Settings->LoadDword(cb_iter->first,SelectedValue));
|
||||
ComboBox->SetChanged(g_Settings->LoadDword(cb_iter->first,SelectedValue));
|
||||
ComboBox->SetDefault(SelectedValue);
|
||||
}
|
||||
}
|
||||
|
@ -255,11 +255,11 @@ protected:
|
|||
if (TextBox->IsbString())
|
||||
{
|
||||
stdstr SelectedValue;
|
||||
TextBox->SetChanged(_Settings->LoadString(iter->first,SelectedValue));
|
||||
TextBox->SetChanged(g_Settings->LoadString(iter->first,SelectedValue));
|
||||
TextBox->SetWindowText(SelectedValue.c_str());
|
||||
} else {
|
||||
DWORD SelectedValue;
|
||||
TextBox->SetChanged(_Settings->LoadDword(iter->first,SelectedValue));
|
||||
TextBox->SetChanged(g_Settings->LoadDword(iter->first,SelectedValue));
|
||||
TextBox->SetWindowText(stdstr_f("%d",SelectedValue).c_str());
|
||||
}
|
||||
m_UpdatingTxt = false;
|
||||
|
@ -327,7 +327,7 @@ protected:
|
|||
}
|
||||
|
||||
ComboBox.SetReset(true);
|
||||
DWORD Value = _Settings->LoadDefaultDword(Type);
|
||||
DWORD Value = g_Settings->LoadDefaultDword(Type);
|
||||
for (int i = 0, n = ComboBox.GetCount(); i < n; i++)
|
||||
{
|
||||
if (*((WPARAM *)ComboBox.GetItemData(i)) != Value)
|
||||
|
@ -348,7 +348,7 @@ protected:
|
|||
}
|
||||
|
||||
ComboBox.SetReset(true);
|
||||
stdstr Value = _Settings->LoadDefaultString(Type);
|
||||
stdstr Value = g_Settings->LoadDefaultString(Type);
|
||||
for (int i = 0, n = ComboBox.GetCount(); i < n; i++)
|
||||
{
|
||||
if (*((stdstr *)ComboBox.GetItemData(i)) != Value)
|
||||
|
@ -370,11 +370,11 @@ protected:
|
|||
{
|
||||
return;
|
||||
}
|
||||
_Settings->SaveDword(Type,*(DWORD *)ComboBox.GetItemData(index));
|
||||
g_Settings->SaveDword(Type,*(DWORD *)ComboBox.GetItemData(index));
|
||||
}
|
||||
if (ComboBox.IsReset())
|
||||
{
|
||||
_Settings->DeleteSetting(Type);
|
||||
g_Settings->DeleteSetting(Type);
|
||||
ComboBox.SetReset(false);
|
||||
}
|
||||
}
|
||||
|
@ -388,11 +388,11 @@ protected:
|
|||
{
|
||||
return;
|
||||
}
|
||||
_Settings->SaveString(Type,((stdstr *)ComboBox.GetItemData(index))->c_str());
|
||||
g_Settings->SaveString(Type,((stdstr *)ComboBox.GetItemData(index))->c_str());
|
||||
}
|
||||
if (ComboBox.IsReset())
|
||||
{
|
||||
_Settings->DeleteSetting(Type);
|
||||
g_Settings->DeleteSetting(Type);
|
||||
ComboBox.SetReset(false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ void TestValidBinaryThread ( )
|
|||
#ifdef VALIDATE_DEBUG
|
||||
WriteTrace(TraceValidate,"v3");
|
||||
#endif
|
||||
_Settings->SaveBool(Beta_IsValidExe,DefaultResult);
|
||||
g_Settings->SaveBool(Beta_IsValidExe,DefaultResult);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ void TestValidBinaryThread ( )
|
|||
#ifdef VALIDATE_DEBUG
|
||||
WriteTrace(TraceValidate,"v4");
|
||||
#endif
|
||||
_Settings->SaveBool(Beta_IsValidExe,DefaultResult);
|
||||
g_Settings->SaveBool(Beta_IsValidExe,DefaultResult);
|
||||
InternetCloseHandle (hSession);
|
||||
hSession = NULL;
|
||||
return;
|
||||
|
@ -183,7 +183,7 @@ void TestValidBinaryThread ( )
|
|||
#ifdef VALIDATE_DEBUG
|
||||
WriteTrace(TraceValidate,"v5");
|
||||
#endif
|
||||
_Settings->SaveBool(Beta_IsValidExe,DefaultResult);
|
||||
g_Settings->SaveBool(Beta_IsValidExe,DefaultResult);
|
||||
InternetCloseHandle (hRequest);
|
||||
return;
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ void TestValidBinaryThread ( )
|
|||
|
||||
ComputerName.ToLower();
|
||||
|
||||
stdstr_f PostInfo("1,%s,%s,%s,%s,%s,%s",VALIDATE_BIN_APP,File_md5.hex_digest(),ComputerName.c_str(),VersionInfo(VERSION_PRODUCT_VERSION).c_str(),_Settings->LoadString(Beta_UserName).c_str(),_Settings->LoadString(Beta_EmailAddress).c_str());
|
||||
stdstr_f PostInfo("1,%s,%s,%s,%s,%s,%s",VALIDATE_BIN_APP,File_md5.hex_digest(),ComputerName.c_str(),VersionInfo(VERSION_PRODUCT_VERSION).c_str(),g_Settings->LoadString(Beta_UserName).c_str(),g_Settings->LoadString(Beta_EmailAddress).c_str());
|
||||
|
||||
//"Content-Type: application/x-www-form-urlencoded"
|
||||
char ContentType[] = { "\xE9\x2C\x01\x1A\x11\x0B\x1A\x59\x79\x2D\x09\x15\x5F\x1A\x41\x11\x00\x1C\x05\x0A\x02\x15\x1D\x06\x01\x41\x57\x55\x5A\x00\x00\x5A\x4B\x09\x1D\x1F\x40\x58\x07\x1E\x09\x0B\x0D\x0C\x0B\x01\x01" };
|
||||
|
@ -218,7 +218,7 @@ void TestValidBinaryThread ( )
|
|||
#ifdef VALIDATE_DEBUG
|
||||
WriteTrace(TraceValidate,"v6");
|
||||
#endif
|
||||
_Settings->SaveBool(Beta_IsValidExe,DefaultResult);
|
||||
g_Settings->SaveBool(Beta_IsValidExe,DefaultResult);
|
||||
InternetCloseHandle (hRequest);
|
||||
return;
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ void TestValidBinaryThread ( )
|
|||
#ifdef VALIDATE_DEBUG
|
||||
WriteTrace(TraceValidate,"v7");
|
||||
#endif
|
||||
_Settings->SaveBool(Beta_IsValidExe,DefaultResult);
|
||||
g_Settings->SaveBool(Beta_IsValidExe,DefaultResult);
|
||||
InternetCloseHandle (hRequest);
|
||||
return;
|
||||
}
|
||||
|
@ -408,7 +408,7 @@ void TestValidBinaryThread ( )
|
|||
}
|
||||
}
|
||||
}
|
||||
_Settings->SaveBool(Beta_IsValidExe,DefaultResult);
|
||||
g_Settings->SaveBool(Beta_IsValidExe,DefaultResult);
|
||||
}
|
||||
|
||||
void TestValidBinary ( )
|
||||
|
|
|
@ -135,12 +135,12 @@ CTraceFileLog * LogFile = NULL;
|
|||
|
||||
void LogLevelChanged (CTraceFileLog * LogFile)
|
||||
{
|
||||
LogFile->SetTraceLevel((TraceLevel)_Settings->LoadDword(Debugger_AppLogLevel));
|
||||
LogFile->SetTraceLevel((TraceLevel)g_Settings->LoadDword(Debugger_AppLogLevel));
|
||||
}
|
||||
|
||||
void LogFlushChanged (CTraceFileLog * LogFile)
|
||||
{
|
||||
LogFile->SetFlushFile(_Settings->LoadDword(Debugger_AppLogFlush) != 0);
|
||||
LogFile->SetFlushFile(g_Settings->LoadDword(Debugger_AppLogFlush) != 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -154,16 +154,16 @@ void InitializeLog ( void)
|
|||
}
|
||||
LogFilePath.SetNameExtension(_T("Project64.log"));
|
||||
|
||||
LogFile = new CTraceFileLog(LogFilePath, _Settings->LoadDword(Debugger_AppLogFlush) != 0, Log_New,500);
|
||||
LogFile = new CTraceFileLog(LogFilePath, g_Settings->LoadDword(Debugger_AppLogFlush) != 0, Log_New,500);
|
||||
#ifdef VALIDATE_DEBUG
|
||||
LogFile->SetTraceLevel((TraceLevel)(_Settings->LoadDword(Debugger_AppLogLevel) | TraceValidate));
|
||||
LogFile->SetTraceLevel((TraceLevel)(g_Settings->LoadDword(Debugger_AppLogLevel) | TraceValidate));
|
||||
#else
|
||||
LogFile->SetTraceLevel((TraceLevel)_Settings->LoadDword(Debugger_AppLogLevel));
|
||||
LogFile->SetTraceLevel((TraceLevel)g_Settings->LoadDword(Debugger_AppLogLevel));
|
||||
#endif
|
||||
AddTraceModule(LogFile);
|
||||
|
||||
_Settings->RegisterChangeCB(Debugger_AppLogLevel,LogFile,(CSettings::SettingChangedFunc)LogLevelChanged);
|
||||
_Settings->RegisterChangeCB(Debugger_AppLogFlush,LogFile,(CSettings::SettingChangedFunc)LogFlushChanged);
|
||||
g_Settings->RegisterChangeCB(Debugger_AppLogLevel,LogFile,(CSettings::SettingChangedFunc)LogLevelChanged);
|
||||
g_Settings->RegisterChangeCB(Debugger_AppLogFlush,LogFile,(CSettings::SettingChangedFunc)LogFlushChanged);
|
||||
}
|
||||
|
||||
|
||||
|
@ -255,8 +255,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lps
|
|||
LPCSTR AppName = "Project64 1.7";
|
||||
_Lang = new CLanguage();
|
||||
|
||||
_Settings = new CSettings;
|
||||
_Settings->Initilize(AppName);
|
||||
g_Settings = new CSettings;
|
||||
g_Settings->Initilize(AppName);
|
||||
|
||||
InitializeLog();
|
||||
|
||||
|
@ -267,7 +267,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lps
|
|||
|
||||
//Create the plugin container
|
||||
WriteTrace(TraceDebug,"WinMain - Create Plugins");
|
||||
_Plugins = new CPlugins(_Settings->LoadString(Directory_Plugin));
|
||||
_Plugins = new CPlugins(g_Settings->LoadString(Directory_Plugin));
|
||||
|
||||
//Select the language
|
||||
_Lang->LoadCurrentStrings(true);
|
||||
|
@ -275,9 +275,9 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lps
|
|||
//Create the main window with Menu
|
||||
WriteTrace(TraceDebug,"WinMain - Create Main Window");
|
||||
stdstr WinTitle(AppName);
|
||||
if (_Settings->LoadBool(Beta_IsBetaVersion))
|
||||
if (g_Settings->LoadBool(Beta_IsBetaVersion))
|
||||
{
|
||||
WinTitle.Format("Project64 %s (%s)",VersionInfo(VERSION_PRODUCT_VERSION).c_str(),_Settings->LoadString(Beta_UserName).c_str());
|
||||
WinTitle.Format("Project64 %s (%s)",VersionInfo(VERSION_PRODUCT_VERSION).c_str(),g_Settings->LoadString(Beta_UserName).c_str());
|
||||
}
|
||||
CMainGui MainWindow(true,WinTitle.c_str()), HiddenWindow(false);
|
||||
CMainMenu MainMenu(&MainWindow);
|
||||
|
@ -285,11 +285,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lps
|
|||
g_Notify->SetMainWindow(&MainWindow);
|
||||
|
||||
{
|
||||
stdstr_f User("%s",_Settings->LoadString(Beta_UserName).c_str());
|
||||
stdstr_f Email("%s",_Settings->LoadString(Beta_EmailAddress).c_str());
|
||||
stdstr_f User("%s",g_Settings->LoadString(Beta_UserName).c_str());
|
||||
stdstr_f Email("%s",g_Settings->LoadString(Beta_EmailAddress).c_str());
|
||||
|
||||
if (MD5(User).hex_digest() != _Settings->LoadString(Beta_UserNameMD5) ||
|
||||
MD5(Email).hex_digest() != _Settings->LoadString(Beta_EmailAddressMD5))
|
||||
if (MD5(User).hex_digest() != g_Settings->LoadString(Beta_UserNameMD5) ||
|
||||
MD5(Email).hex_digest() != g_Settings->LoadString(Beta_EmailAddressMD5))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -300,7 +300,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lps
|
|||
MainWindow.Show(true); //Show the main window
|
||||
CN64System::RunFileImage(__argv[1]);
|
||||
} else {
|
||||
if (_Settings->LoadDword(RomBrowser_Enabled))
|
||||
if (g_Settings->LoadDword(RomBrowser_Enabled))
|
||||
{
|
||||
WriteTrace(TraceDebug,"WinMain - Show Rom Browser");
|
||||
//Display the rom browser
|
||||
|
@ -326,8 +326,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lps
|
|||
}
|
||||
WriteTrace(TraceDebug,"WinMain - System Closed");
|
||||
|
||||
_Settings->UnregisterChangeCB(Debugger_AppLogLevel,LogFile,(CSettings::SettingChangedFunc)LogLevelChanged);
|
||||
_Settings->UnregisterChangeCB(Debugger_AppLogFlush,LogFile,(CSettings::SettingChangedFunc)LogFlushChanged);
|
||||
g_Settings->UnregisterChangeCB(Debugger_AppLogLevel,LogFile,(CSettings::SettingChangedFunc)LogLevelChanged);
|
||||
g_Settings->UnregisterChangeCB(Debugger_AppLogFlush,LogFile,(CSettings::SettingChangedFunc)LogFlushChanged);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
|
@ -338,7 +338,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lps
|
|||
|
||||
if (_Rom) { delete _Rom; _Rom = NULL; }
|
||||
if (_Plugins) { delete _Plugins; _Plugins = NULL; }
|
||||
if (_Settings) { delete _Settings; _Settings = NULL; }
|
||||
if (g_Settings) { delete g_Settings; g_Settings = NULL; }
|
||||
if (_Lang) { delete _Lang; _Lang = NULL; }
|
||||
|
||||
CoUninitialize();
|
||||
|
|
Loading…
Reference in New Issue