From fe513d047f7eabb876154407cb7b4003d7621524 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 12 Mar 2005 00:51:09 +0000 Subject: [PATCH] fix hold-only mappings --- stepmania/src/ScreenEdit.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 1f01a9f563..bc7aa5d73d 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -292,7 +292,10 @@ bool ScreenEdit::EditToDevice( EditButton button, int iSlotNum, DeviceInput &Dev { ASSERT( iSlotNum < NUM_EDIT_TO_DEVICE_SLOTS ); const MapEditToDI *pCurrentMap = GetCurrentMap(); - DeviceI = pCurrentMap->button[button][iSlotNum]; + if( pCurrentMap->button[button][iSlotNum].IsValid() ) + DeviceI = pCurrentMap->button[button][iSlotNum]; + else if( pCurrentMap->hold[button][iSlotNum].IsValid() ) + DeviceI = pCurrentMap->hold[button][iSlotNum]; return DeviceI.IsValid(); }