mirror of https://github.com/PCSX2/pcsx2.git
If any gamefixes are loaded by the db (including roundmode/clamping changes), then console titlebar will display [Fixes = n], where n is the number of gamefixes loaded.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3109 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
e82bb4a82b
commit
2e6bda7c50
|
@ -375,20 +375,23 @@ static wxString compatToStringWX(int compat) {
|
|||
if (gameDB->keyExists(#gFix)) { \
|
||||
SetGameFixConfig().gFix = gameDB->getBool(#gFix); \
|
||||
Console.WriteLn("Loading Gamefix: " #gFix); \
|
||||
gf++; \
|
||||
} \
|
||||
}
|
||||
|
||||
// Load Game Settings found in database
|
||||
// (game fixes, round modes, clamp modes, etc...)
|
||||
static void loadGameSettings(DataBase_Loader* gameDB) {
|
||||
// Returns number of gamefixes set
|
||||
static int loadGameSettings(DataBase_Loader* gameDB) {
|
||||
if (gameDB && gameDB->gameLoaded()) {
|
||||
SSE_MXCSR eeMX = EmuConfig.Cpu.sseMXCSR;
|
||||
SSE_MXCSR vuMX = EmuConfig.Cpu.sseVUMXCSR;
|
||||
int eeRM = eeMX.GetRoundMode();
|
||||
int vuRM = vuMX.GetRoundMode();
|
||||
bool rm = 0;
|
||||
if (gameDB->keyExists("eeRoundMode")) { eeRM = gameDB->getInt("eeRoundMode"); rm=1; }
|
||||
if (gameDB->keyExists("vuRoundMode")) { vuRM = gameDB->getInt("vuRoundMode"); rm=1; }
|
||||
bool rm = 0;
|
||||
int gf = 0;
|
||||
if (gameDB->keyExists("eeRoundMode")) { eeRM = gameDB->getInt("eeRoundMode"); rm=1; gf++; }
|
||||
if (gameDB->keyExists("vuRoundMode")) { vuRM = gameDB->getInt("vuRoundMode"); rm=1; gf++; }
|
||||
if (rm && eeRM<4 && vuRM<4) {
|
||||
Console.WriteLn("Game DataBase: Changing roundmodes! [ee=%d] [vu=%d]", eeRM, vuRM);
|
||||
SetCPUState(eeMX.SetRoundMode((SSE_RoundMode)eeRM), vuMX.SetRoundMode((SSE_RoundMode)vuRM));
|
||||
|
@ -399,6 +402,7 @@ static void loadGameSettings(DataBase_Loader* gameDB) {
|
|||
SetRecompilerConfig().fpuOverflow = clampMode >= 1;
|
||||
SetRecompilerConfig().fpuExtraOverflow = clampMode >= 2;
|
||||
SetRecompilerConfig().fpuFullMode = clampMode >= 3;
|
||||
gf++;
|
||||
}
|
||||
if (gameDB->keyExists("vuClampMode")) {
|
||||
int clampMode = gameDB->getInt("vuClampMode");
|
||||
|
@ -406,6 +410,7 @@ static void loadGameSettings(DataBase_Loader* gameDB) {
|
|||
SetRecompilerConfig().vuOverflow = clampMode >= 1;
|
||||
SetRecompilerConfig().vuExtraOverflow = clampMode >= 2;
|
||||
SetRecompilerConfig().vuSignOverflow = clampMode >= 3;
|
||||
gf++;
|
||||
}
|
||||
checkGamefix(VuAddSubHack);
|
||||
checkGamefix(VuClipFlagHack);
|
||||
|
@ -415,7 +420,9 @@ static void loadGameSettings(DataBase_Loader* gameDB) {
|
|||
checkGamefix(XgKickHack);
|
||||
checkGamefix(IPUWaitHack);
|
||||
checkGamefix(EETimingHack);
|
||||
return gf;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern ScopedPtr<DataBase_Loader> GameDB;
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
if (s.length() >= 2) {
|
||||
if (s[0] == '/' && s[1] == '/') {
|
||||
fs->seekp(pos);
|
||||
fs->getline(buff, 1024);
|
||||
fs->getline(buff, sizeof(buff));
|
||||
read(t);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -582,6 +582,7 @@ void __fastcall eeGameStarting()
|
|||
wxString gameSerial = L" [" + DiscID + L"]";
|
||||
wxString gameCompat = L" [Status = Unknown]";
|
||||
wxString gamePatch = L"";
|
||||
wxString gameFixes = L"";
|
||||
wxString gameCheats = L"";
|
||||
|
||||
if (GameDB && GameDB->gameLoaded()) {
|
||||
|
@ -597,7 +598,11 @@ void __fastcall eeGameStarting()
|
|||
wxString pString( wxsFormat( L"%d", patches ) );
|
||||
gamePatch = L" [Patches = " + pString + L"]";
|
||||
}
|
||||
loadGameSettings(GameDB);
|
||||
int fixes = loadGameSettings(GameDB);
|
||||
if (fixes) {
|
||||
wxString pString( wxsFormat( L"%d", fixes ) );
|
||||
gameFixes = L" [Fixes = " + pString + L"]";
|
||||
}
|
||||
}
|
||||
|
||||
if (EmuConfig.EnableCheats) {
|
||||
|
@ -608,7 +613,7 @@ void __fastcall eeGameStarting()
|
|||
}
|
||||
}
|
||||
|
||||
Console.SetTitle(gameName + gameSerial + gameCompat + gamePatch + gameCheats);
|
||||
Console.SetTitle(gameName+gameSerial+gameCompat+gameFixes+gamePatch+gameCheats);
|
||||
|
||||
GetMTGS().SendGameCRC(ElfCRC);
|
||||
g_GameStarted = true;
|
||||
|
|
Loading…
Reference in New Issue