GTK: Fix "#3598672 - emulated system option in gvbam changes by itself in Linux"
Applied patch 3599614 thanks to Mika Attila git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@1154 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
1a6a4d2f9d
commit
526429f009
|
@ -27,6 +27,16 @@
|
||||||
namespace VBA
|
namespace VBA
|
||||||
{
|
{
|
||||||
|
|
||||||
|
static const VBA::Window::EEmulatorType aEmulatorType[] =
|
||||||
|
{
|
||||||
|
VBA::Window::EmulatorAuto,
|
||||||
|
VBA::Window::EmulatorCGB,
|
||||||
|
VBA::Window::EmulatorSGB,
|
||||||
|
VBA::Window::EmulatorGB,
|
||||||
|
VBA::Window::EmulatorGBA,
|
||||||
|
VBA::Window::EmulatorSGB2
|
||||||
|
};
|
||||||
|
|
||||||
GameBoyConfigDialog::GameBoyConfigDialog(GtkDialog* _pstDialog, const Glib::RefPtr<Gtk::Builder>& refBuilder) :
|
GameBoyConfigDialog::GameBoyConfigDialog(GtkDialog* _pstDialog, const Glib::RefPtr<Gtk::Builder>& refBuilder) :
|
||||||
Gtk::Dialog(_pstDialog),
|
Gtk::Dialog(_pstDialog),
|
||||||
m_poConfig(0)
|
m_poConfig(0)
|
||||||
|
@ -49,8 +59,6 @@ void GameBoyConfigDialog::vSetConfig(Config::Section * _poConfig, VBA::Window *
|
||||||
m_poConfig = _poConfig;
|
m_poConfig = _poConfig;
|
||||||
m_poWindow = _poWindow;
|
m_poWindow = _poWindow;
|
||||||
|
|
||||||
const int aEmulatorType[] = { 0, 2, 3, 5, 1, 4 };
|
|
||||||
|
|
||||||
VBA::Window::EEmulatorType eDefaultEmulatorType = (VBA::Window::EEmulatorType)m_poConfig->oGetKey<int>("emulator_type");
|
VBA::Window::EEmulatorType eDefaultEmulatorType = (VBA::Window::EEmulatorType)m_poConfig->oGetKey<int>("emulator_type");
|
||||||
m_poSystemComboBox->set_active(aEmulatorType[eDefaultEmulatorType]);
|
m_poSystemComboBox->set_active(aEmulatorType[eDefaultEmulatorType]);
|
||||||
|
|
||||||
|
@ -70,16 +78,6 @@ void GameBoyConfigDialog::vSetConfig(Config::Section * _poConfig, VBA::Window *
|
||||||
|
|
||||||
void GameBoyConfigDialog::vOnSystemChanged()
|
void GameBoyConfigDialog::vOnSystemChanged()
|
||||||
{
|
{
|
||||||
const VBA::Window::EEmulatorType aEmulatorType[] =
|
|
||||||
{
|
|
||||||
VBA::Window::EmulatorAuto,
|
|
||||||
VBA::Window::EmulatorCGB,
|
|
||||||
VBA::Window::EmulatorSGB,
|
|
||||||
VBA::Window::EmulatorGB,
|
|
||||||
VBA::Window::EmulatorGBA,
|
|
||||||
VBA::Window::EmulatorSGB2
|
|
||||||
};
|
|
||||||
|
|
||||||
int iSystem = m_poSystemComboBox->get_active_row_number();
|
int iSystem = m_poSystemComboBox->get_active_row_number();
|
||||||
m_poConfig->vSetKey("emulator_type", aEmulatorType[iSystem]);
|
m_poConfig->vSetKey("emulator_type", aEmulatorType[iSystem]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue