only save mappings for user-changable mapping slots (less cluttered keymaps.ini)
This commit is contained in:
@@ -526,7 +526,7 @@ void InputMapper::SaveMappingsToDisk()
|
|||||||
RString sNameString = GameI.toString( pGame );
|
RString sNameString = GameI.toString( pGame );
|
||||||
|
|
||||||
vector<RString> asValues;
|
vector<RString> asValues;
|
||||||
for( int slot = 0; slot < NUM_GAME_TO_DEVICE_SLOTS; ++slot )
|
for( int slot = 0; slot < NUM_USER_GAME_TO_DEVICE_SLOTS; ++slot ) // don't save data from the last (keyboard automap) slot
|
||||||
asValues.push_back( m_GItoDI[i][j][slot].ToString() );
|
asValues.push_back( m_GItoDI[i][j][slot].ToString() );
|
||||||
|
|
||||||
while( asValues.size() && asValues.back() == "" )
|
while( asValues.size() && asValues.back() == "" )
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
#include "GameConstantsAndTypes.h"
|
#include "GameConstantsAndTypes.h"
|
||||||
|
|
||||||
const int NUM_GAME_TO_DEVICE_SLOTS = 5; // five device inputs may map to one game input
|
const int NUM_GAME_TO_DEVICE_SLOTS = 5; // five device inputs may map to one game input
|
||||||
|
const int NUM_SHOWN_GAME_TO_DEVICE_SLOTS = 3;
|
||||||
|
const int NUM_USER_GAME_TO_DEVICE_SLOTS = 2;
|
||||||
|
|
||||||
class InputMapper
|
class InputMapper
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,9 +14,9 @@
|
|||||||
#include "InputEventPlus.h"
|
#include "InputEventPlus.h"
|
||||||
#include "LocalizedString.h"
|
#include "LocalizedString.h"
|
||||||
|
|
||||||
#define BUTTONS_TO_MAP THEME->GetMetric ( m_sName, "ButtonsToMap" )
|
#define BUTTONS_TO_MAP THEME->GetMetric ( m_sName, "ButtonsToMap" )
|
||||||
static LocalizedString INVALID_BUTTON ( "ScreenMapControllers", "InvalidButton" );
|
static LocalizedString INVALID_BUTTON ( "ScreenMapControllers", "InvalidButton" );
|
||||||
#define MAPPED_TO_COMMAND(gc,slot) THEME->GetMetricA( m_sName, ssprintf("MappedToP%iS%iCommand", gc+1, slot+1) )
|
#define MAPPED_TO_COMMAND(gc,slot) THEME->GetMetricA( m_sName, ssprintf("MappedToP%iS%iCommand", gc+1, slot+1) )
|
||||||
|
|
||||||
static const float g_fSecondsToWaitForInput = 0.05f;
|
static const float g_fSecondsToWaitForInput = 0.05f;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user