ScreenEdit: Fix crash on pressing certain buttons in record.

This commit is contained in:
Flameshadowxeroshin
2013-01-02 10:38:11 -06:00
parent e7db656fa7
commit 3fb91639b3
+7 -1
View File
@@ -368,7 +368,9 @@ void ScreenEdit::InitEditMappings()
m_RecordMappingsDeviceInput.button[EDIT_BUTTON_REMOVE_NOTE][0] = DeviceInput(DEVICE_KEYBOARD, KEY_LALT);
m_RecordMappingsDeviceInput.button[EDIT_BUTTON_REMOVE_NOTE][1] = DeviceInput(DEVICE_KEYBOARD, KEY_RALT);
m_RecordMappingsDeviceInput.button[EDIT_BUTTON_RETURN_TO_EDIT][0] = DeviceInput(DEVICE_KEYBOARD, KEY_ESC);
m_RecordMappingsMenuButton.button[EDIT_BUTTON_RETURN_TO_EDIT][1] = GAME_BUTTON_BACK;
m_RecordMappingsDeviceInput.button[EDIT_BUTTON_RETURN_TO_EDIT][1] = DeviceInput(DEVICE_KEYBOARD, KEY_ENTER)
m_RecordMappingsMenuButton.button[EDIT_BUTTON_RETURN_TO_EDIT][0] = GAME_BUTTON_BACK;
m_RecordMappingsMenuButton.button[EDIT_BUTTON_RETURN_TO_EDIT][0] = GAME_BUTTON_START;
m_RecordPausedMappingsDeviceInput.button[EDIT_BUTTON_PLAY_SELECTION][0] = DeviceInput(DEVICE_KEYBOARD, KEY_Cp);
m_RecordPausedMappingsDeviceInput.button[EDIT_BUTTON_RECORD_SELECTION][0] = DeviceInput(DEVICE_KEYBOARD, KEY_Cr);
@@ -2749,6 +2751,10 @@ void ScreenEdit::InputRecord( const InputEventPlus &input, EditButton EditB )
const int iCol = GAMESTATE->GetCurrentStyle()->GameInputToColumn( input.GameI );
//Is this actually a column? If not, ignore the input.
if( iCol == -1 )
return;
switch( input.type )
{
DEFAULT_FAIL( input.type );