mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00:00
Updating Cheats manager when the ISO is changed etc.
The Cheats manager should be updated when the ISO is changed because it's non-modal Removing code that read the ID from file because the cheats manager only has a use when an emulation is running (when the ID doesn't need to be read from the ISO again because it's in a variable). This fixes loading Gecko codes for .wad during an emulation because "VolumeHandler::GetVolume()" return false in this case
This commit is contained in:
parent
719f18a122
commit
7cc2e3146b
5 changed files with 57 additions and 22 deletions
|
@ -3,6 +3,7 @@
|
|||
// Refer to the license.txt file included.
|
||||
|
||||
#include "GeckoCodeDiag.h"
|
||||
#include "Core.h"
|
||||
#include "WxUtils.h"
|
||||
|
||||
#include <SFML/Network/Http.hpp>
|
||||
|
@ -59,10 +60,10 @@ CodeConfigPanel::CodeConfigPanel(wxWindow* const parent)
|
|||
SetSizerAndFit(sizer_main);
|
||||
}
|
||||
|
||||
void CodeConfigPanel::UpdateCodeList()
|
||||
void CodeConfigPanel::UpdateCodeList(bool checkRunning)
|
||||
{
|
||||
// disable the button if it doesn't have an effect
|
||||
btn_download->Enable(!m_gameid.empty());
|
||||
btn_download->Enable((!checkRunning || Core::IsRunning()) && !m_gameid.empty());
|
||||
|
||||
m_listbox_gcodes->Clear();
|
||||
// add the codes to the listbox
|
||||
|
@ -80,14 +81,15 @@ void CodeConfigPanel::UpdateCodeList()
|
|||
UpdateInfoBox(evt);
|
||||
}
|
||||
|
||||
void CodeConfigPanel::LoadCodes(const IniFile& inifile, const std::string& gameid)
|
||||
void CodeConfigPanel::LoadCodes(const IniFile& inifile, const std::string& gameid, bool checkRunning)
|
||||
{
|
||||
m_gameid = gameid;
|
||||
|
||||
m_gcodes.clear();
|
||||
Gecko::LoadCodes(inifile, m_gcodes);
|
||||
if (!checkRunning || Core::IsRunning())
|
||||
Gecko::LoadCodes(inifile, m_gcodes);
|
||||
|
||||
UpdateCodeList();
|
||||
UpdateCodeList(checkRunning);
|
||||
}
|
||||
|
||||
void CodeConfigPanel::ToggleCode(wxCommandEvent& evt)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue