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:
cottonvibes 2010-05-28 22:40:08 +00:00
parent e82bb4a82b
commit 2e6bda7c50
3 changed files with 19 additions and 7 deletions

View File

@ -375,20 +375,23 @@ static wxString compatToStringWX(int compat) {
if (gameDB->keyExists(#gFix)) { \ if (gameDB->keyExists(#gFix)) { \
SetGameFixConfig().gFix = gameDB->getBool(#gFix); \ SetGameFixConfig().gFix = gameDB->getBool(#gFix); \
Console.WriteLn("Loading Gamefix: " #gFix); \ Console.WriteLn("Loading Gamefix: " #gFix); \
gf++; \
} \ } \
} }
// Load Game Settings found in database // Load Game Settings found in database
// (game fixes, round modes, clamp modes, etc...) // (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()) { if (gameDB && gameDB->gameLoaded()) {
SSE_MXCSR eeMX = EmuConfig.Cpu.sseMXCSR; SSE_MXCSR eeMX = EmuConfig.Cpu.sseMXCSR;
SSE_MXCSR vuMX = EmuConfig.Cpu.sseVUMXCSR; SSE_MXCSR vuMX = EmuConfig.Cpu.sseVUMXCSR;
int eeRM = eeMX.GetRoundMode(); int eeRM = eeMX.GetRoundMode();
int vuRM = vuMX.GetRoundMode(); int vuRM = vuMX.GetRoundMode();
bool rm = 0; bool rm = 0;
if (gameDB->keyExists("eeRoundMode")) { eeRM = gameDB->getInt("eeRoundMode"); rm=1; } int gf = 0;
if (gameDB->keyExists("vuRoundMode")) { vuRM = gameDB->getInt("vuRoundMode"); rm=1; } 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) { if (rm && eeRM<4 && vuRM<4) {
Console.WriteLn("Game DataBase: Changing roundmodes! [ee=%d] [vu=%d]", eeRM, vuRM); Console.WriteLn("Game DataBase: Changing roundmodes! [ee=%d] [vu=%d]", eeRM, vuRM);
SetCPUState(eeMX.SetRoundMode((SSE_RoundMode)eeRM), vuMX.SetRoundMode((SSE_RoundMode)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().fpuOverflow = clampMode >= 1;
SetRecompilerConfig().fpuExtraOverflow = clampMode >= 2; SetRecompilerConfig().fpuExtraOverflow = clampMode >= 2;
SetRecompilerConfig().fpuFullMode = clampMode >= 3; SetRecompilerConfig().fpuFullMode = clampMode >= 3;
gf++;
} }
if (gameDB->keyExists("vuClampMode")) { if (gameDB->keyExists("vuClampMode")) {
int clampMode = gameDB->getInt("vuClampMode"); int clampMode = gameDB->getInt("vuClampMode");
@ -406,6 +410,7 @@ static void loadGameSettings(DataBase_Loader* gameDB) {
SetRecompilerConfig().vuOverflow = clampMode >= 1; SetRecompilerConfig().vuOverflow = clampMode >= 1;
SetRecompilerConfig().vuExtraOverflow = clampMode >= 2; SetRecompilerConfig().vuExtraOverflow = clampMode >= 2;
SetRecompilerConfig().vuSignOverflow = clampMode >= 3; SetRecompilerConfig().vuSignOverflow = clampMode >= 3;
gf++;
} }
checkGamefix(VuAddSubHack); checkGamefix(VuAddSubHack);
checkGamefix(VuClipFlagHack); checkGamefix(VuClipFlagHack);
@ -415,7 +420,9 @@ static void loadGameSettings(DataBase_Loader* gameDB) {
checkGamefix(XgKickHack); checkGamefix(XgKickHack);
checkGamefix(IPUWaitHack); checkGamefix(IPUWaitHack);
checkGamefix(EETimingHack); checkGamefix(EETimingHack);
return gf;
} }
return 0;
} }
extern ScopedPtr<DataBase_Loader> GameDB; extern ScopedPtr<DataBase_Loader> GameDB;

View File

@ -41,7 +41,7 @@ public:
if (s.length() >= 2) { if (s.length() >= 2) {
if (s[0] == '/' && s[1] == '/') { if (s[0] == '/' && s[1] == '/') {
fs->seekp(pos); fs->seekp(pos);
fs->getline(buff, 1024); fs->getline(buff, sizeof(buff));
read(t); read(t);
return; return;
} }

View File

@ -582,6 +582,7 @@ void __fastcall eeGameStarting()
wxString gameSerial = L" [" + DiscID + L"]"; wxString gameSerial = L" [" + DiscID + L"]";
wxString gameCompat = L" [Status = Unknown]"; wxString gameCompat = L" [Status = Unknown]";
wxString gamePatch = L""; wxString gamePatch = L"";
wxString gameFixes = L"";
wxString gameCheats = L""; wxString gameCheats = L"";
if (GameDB && GameDB->gameLoaded()) { if (GameDB && GameDB->gameLoaded()) {
@ -597,7 +598,11 @@ void __fastcall eeGameStarting()
wxString pString( wxsFormat( L"%d", patches ) ); wxString pString( wxsFormat( L"%d", patches ) );
gamePatch = L" [Patches = " + pString + L"]"; 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) { 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); GetMTGS().SendGameCRC(ElfCRC);
g_GameStarted = true; g_GameStarted = true;