summaryrefslogtreecommitdiff
path: root/Source/Plugins/InputPluginCommon/Src/ConfigDiag.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2010-04-24 00:44:10 +0000
committerJordan Woyak <jordan.woyak@gmail.com>2010-04-24 00:44:10 +0000
commit23689387e1f00bf045daa44df5c733950cdfb5d2 (patch)
treeeee9dbd66cdc19e8309791e1bff89a9560d99395 /Source/Plugins/InputPluginCommon/Src/ConfigDiag.cpp
parent1d8db5ce3f44cf637a88a6521680e2a336ff8f7c (diff)
More improvements to new wiimote plugin: Added emulated Drums/Guitar extensions. Wiimote rumble now handled for every output report. Fixed some mem leaks. Hopefully fixed a floating point exception in Linux, thanks to glennrics.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5403 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Plugins/InputPluginCommon/Src/ConfigDiag.cpp')
-rw-r--r--Source/Plugins/InputPluginCommon/Src/ConfigDiag.cpp32
1 files changed, 22 insertions, 10 deletions
diff --git a/Source/Plugins/InputPluginCommon/Src/ConfigDiag.cpp b/Source/Plugins/InputPluginCommon/Src/ConfigDiag.cpp
index 72738c9164..afa521d8d8 100644
--- a/Source/Plugins/InputPluginCommon/Src/ConfigDiag.cpp
+++ b/Source/Plugins/InputPluginCommon/Src/ConfigDiag.cpp
@@ -714,24 +714,36 @@ ControlGroupBox::ControlGroupBox( ControllerEmu::ControlGroup* const group, wxWi
}
break;
case GROUP_TYPE_MIXED_TRIGGERS :
+ case GROUP_TYPE_TRIGGERS :
{
- wxBitmap bitmap(64+12+1, int(6*group->controls.size())+1);
+ int height = (int)(6 * group->controls.size());
+ int width = 64+12+1;
+ if (GROUP_TYPE_TRIGGERS == group->type)
+ {
+ height *= 2;
+ width = 64;
+ }
+ wxBitmap bitmap(width, height+1);
wxMemoryDC dc;
dc.SelectObject(bitmap);
dc.Clear();
dc.SelectObject(wxNullBitmap);
static_bitmap = new wxStaticBitmap( parent, -1, bitmap, wxDefaultPosition, wxDefaultSize, wxBITMAP_TYPE_BMP );
- PadSettingChoice* threshold_cbox = new PadSettingChoice( parent, group->settings[0] );
- _connect_macro_( threshold_cbox, GamepadPage::AdjustSetting, wxEVT_COMMAND_CHOICE_SELECTED, eventsink );
-
- options.push_back( threshold_cbox );
-
- wxBoxSizer* const szr = new wxBoxSizer( wxHORIZONTAL );
- szr->Add( new wxStaticText( parent, -1, wxString::FromAscii( group->settings[0]->name ) ), 0, wxCENTER|wxRIGHT, 5 );
- szr->Add( threshold_cbox, 0, wxRIGHT, 5 );
+ std::vector<ControllerEmu::ControlGroup::Setting*>::const_iterator
+ i = group->settings.begin(),
+ e = group->settings.end();
+ for ( ; i!=e; ++i )
+ {
+ PadSettingChoice* cbox = new PadSettingChoice( parent, *i );
+ _connect_macro_( cbox, GamepadPage::AdjustSetting, wxEVT_COMMAND_CHOICE_SELECTED, eventsink );
+ options.push_back( cbox );
+ wxBoxSizer* const szr = new wxBoxSizer( wxHORIZONTAL );
+ szr->Add( new wxStaticText( parent, -1, wxString::FromAscii( (*i)->name ) ), 0, wxCENTER|wxRIGHT, 5 );
+ szr->Add( cbox, 0, wxRIGHT, 5 );
+ Add( szr, 0, wxALL|wxCENTER, 5 );
+ }
- Add( szr, 0, wxALL|wxCENTER, 5 );
Add( static_bitmap, 0, wxALL|wxCENTER, 5 );
}
break;