diff --git a/Source/Core/DolphinWX/Src/BootManager.cpp b/Source/Core/DolphinWX/Src/BootManager.cpp index 5814f87e75..2bb708716d 100644 --- a/Source/Core/DolphinWX/Src/BootManager.cpp +++ b/Source/Core/DolphinWX/Src/BootManager.cpp @@ -78,7 +78,7 @@ bool BootCore(const std::string& _rFilename) // Load overrides IniFile ini; std::string unique_id = StartUp.GetUniqueID(); - if (unique_id.size() == 6 && ini.Load(("Patches/" + unique_id + ".ini").c_str())) + if (unique_id.size() == 6 && ini.Load(("GameIni/" + unique_id + ".ini").c_str())) { ini.Get("Core", "UseDualCore", &StartUp.bUseDualCore, StartUp.bUseDualCore); ini.Get("Core", "SkipIdle", &StartUp.bSkipIdle, StartUp.bSkipIdle); diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp index 711f1e4067..80ea68df08 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp @@ -28,6 +28,7 @@ #include "GameListCtrl.h" #include "Blob.h" #include "FilesystemViewer.h" +#include "IniFile.h" #if USE_XPM_BITMAPS #include "../resources/Flag_Europe.xpm" @@ -251,6 +252,54 @@ void CGameListCtrl::InsertItemInReportView(long _Index) item.SetTextColour(wxColour(0xFF0000)); SetItem(item); } + //emulation status = COLUMN_EMULATION_STATE + { + wxListItem item; + item.SetId(ItemIndex); + IniFile ini; + std::string EmuState; + std::string GameIni; + item.SetColumn(COLUMN_EMULATION_STATE); + //NOTE (Daco): i dont like the fact of having so much ini's just to have + //the game emulation state of every game you have. + GameIni = "GameIni/" + (rISOFile.GetUniqueID()) + ".ini"; + ini.Load(GameIni.c_str()); + ini.Get("EmuState","EmulationStateId",&EmuState); + if (EmuState.empty()) + { + //srry, its empty + //item.SetText("unknown"); + //without unknown it looks more pretty :P + } + else + { + if(EmuState == "5") + item.SetText("Perfect"); + else if(EmuState == "4") + item.SetText("In Game"); + else if(EmuState == "3") + item.SetText("Intro"); + else if(EmuState == "2") + { + item.SetText("Problems: Other"); + //NOTE (Daco): IMO under 2 i see problems like music and games that only work + //with GL or only with DX9 + //TODO (Daco): maybe 2 should get a function to present more info... o.o + } + else if(EmuState == "1") + item.SetText("Broken"); + else if(EmuState == "0") + item.SetText("Not Set"); + else + { + //if the EmuState isn't a number between 0 & 5 we dont know the state + //hence why it should say unknown + item.SetText("unknown emu ID"); + } + } + SetItem(item); + + } #ifndef __WXMSW__ // country @@ -636,11 +685,13 @@ void CGameListCtrl::OnEditPatchFile(wxCommandEvent& WXUNUSED (event)) const GameListItem *iso = GetSelectedISO(); if (!iso) return; - std::string filename = "Patches/" + iso->GetUniqueID() + ".ini"; + std::string filename = "GameIni/" + iso->GetUniqueID() + ".ini"; if (!File::Exists(filename.c_str())) { if (AskYesNo("%s.ini does not exist. Do you want to create it?", iso->GetUniqueID().c_str())) { FILE *f = fopen(filename.c_str(), "w"); fprintf(f, "# %s - %s\r\n\r\n", iso->GetUniqueID().c_str(), iso->GetName().c_str()); + fprintf(f, "[EmuState]\n#The Emulation State.\n"); + fprintf(f, "EmulationStateId = 0\n"); fprintf(f, "[OnFrame]\r\n#Add memory patches here.\r\n\r\n"); fprintf(f, "[ActionReplay]\r\n#Add decrypted action replay cheats here.\r\n"); fclose(f);