Made backslash mappable. Fixed mistake in previous AddSegment fix so now it correctly compares to the previous segment again. F7/F8 no longer allow negative bpms to match Edit BPM behavior.
This commit is contained in:
@@ -28,6 +28,7 @@ static void InitNames()
|
|||||||
g_mapNamesToString[KEY_COMMA] = "comma";
|
g_mapNamesToString[KEY_COMMA] = "comma";
|
||||||
g_mapNamesToString[KEY_SPACE] = "space";
|
g_mapNamesToString[KEY_SPACE] = "space";
|
||||||
g_mapNamesToString[KEY_DEL] = "delete";
|
g_mapNamesToString[KEY_DEL] = "delete";
|
||||||
|
g_mapNamesToString[KEY_BACKSLASH] = "backslash";
|
||||||
|
|
||||||
g_mapNamesToString[KEY_BACK] = "backspace";
|
g_mapNamesToString[KEY_BACK] = "backspace";
|
||||||
g_mapNamesToString[KEY_TAB] = "tab";
|
g_mapNamesToString[KEY_TAB] = "tab";
|
||||||
@@ -145,6 +146,12 @@ RString DeviceButtonToString( DeviceButton key )
|
|||||||
{
|
{
|
||||||
InitNames();
|
InitNames();
|
||||||
|
|
||||||
|
// Check the name map first to allow making names for keys that are inside
|
||||||
|
// the ascii range. -Kyz
|
||||||
|
map<DeviceButton,RString>::const_iterator it = g_mapNamesToString.find( key );
|
||||||
|
if( it != g_mapNamesToString.end() )
|
||||||
|
return it->second;
|
||||||
|
|
||||||
// All printable ASCII except for uppercase alpha characters line up.
|
// All printable ASCII except for uppercase alpha characters line up.
|
||||||
if( key >= 33 && key < 127 && !(key >= 'A' && key <= 'Z' ) )
|
if( key >= 33 && key < 127 && !(key >= 'A' && key <= 'Z' ) )
|
||||||
return ssprintf( "%c", key );
|
return ssprintf( "%c", key );
|
||||||
@@ -158,10 +165,6 @@ RString DeviceButtonToString( DeviceButton key )
|
|||||||
if( key >= MIDI_FIRST && key <= MIDI_LAST )
|
if( key >= MIDI_FIRST && key <= MIDI_LAST )
|
||||||
return ssprintf( "Midi %d", key-MIDI_FIRST );
|
return ssprintf( "Midi %d", key-MIDI_FIRST );
|
||||||
|
|
||||||
map<DeviceButton,RString>::const_iterator it = g_mapNamesToString.find( key );
|
|
||||||
if( it != g_mapNamesToString.end() )
|
|
||||||
return it->second;
|
|
||||||
|
|
||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-1
@@ -2367,7 +2367,10 @@ bool ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
|||||||
}
|
}
|
||||||
|
|
||||||
float fNewBPM = fBPM + fDelta;
|
float fNewBPM = fBPM + fDelta;
|
||||||
GetAppropriateTimingForUpdate().SetBPMAtBeat( GetBeat(), fNewBPM );
|
if(fNewBPM > 0.0f)
|
||||||
|
{
|
||||||
|
GetAppropriateTimingForUpdate().AddSegment(BPMSegment(GetRow(), fNewBPM));
|
||||||
|
}
|
||||||
(fDelta>0 ? m_soundValueIncrease : m_soundValueDecrease).Play();
|
(fDelta>0 ? m_soundValueIncrease : m_soundValueDecrease).Play();
|
||||||
SetDirty( true );
|
SetDirty( true );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -423,6 +423,18 @@ void TimingData::AddSegment( const TimingSegment *seg )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// if true, this is redundant segment change
|
||||||
|
if( (*prev) == (*seg) )
|
||||||
|
{
|
||||||
|
if( prev != cur )
|
||||||
|
{
|
||||||
|
EraseSegment( vSegs, index, cur );
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user