Njoy: added an option to choose what kind of analog filtering you want. it should be changeable when you choose to view advanced settings. this solved my analog/digital config problems i had and it *should* still work for those who had np with Jpeterson's change. i was told the wiimote had the same problem (makes sense) but im not sure if alot of ppl had that problem with their controllers so i have kept it as an ini changeable option only (set AdvancedMapFilter to True to use the same filtering as Njoy 0.3 does with AdvancedMapFilter enabled.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2180 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
daco65
2009-02-09 18:43:03 +00:00
parent 1026b3b6f1
commit 2ff2852771
8 changed files with 41 additions and 13 deletions

View File

@ -91,6 +91,7 @@ void Config::Load(bool ChangePad)
iniFile.Get(SectionName.c_str(), "TriggerType", &WiiMoteEmu::PadMapping[i].triggertype, 0);
iniFile.Get(SectionName.c_str(), "Diagonal", &WiiMoteEmu::PadMapping[i].SDiagonal, "100%");
iniFile.Get(SectionName.c_str(), "SquareToCircle", &WiiMoteEmu::PadMapping[i].bSquareToCircle, false);
iniFile.Get(SectionName.c_str(), "AdvancedMapFilter", &WiiMoteEmu::PadMapping[i].bFilterSettings,false);
}
// =============================
Console::Print("Load()\n");
@ -153,6 +154,7 @@ void Config::Save()
iniFile.Set(SectionName.c_str(), "TriggerType", WiiMoteEmu::PadMapping[i].triggertype);
//iniFile.Set(SectionName.c_str(), "Diagonal", PadMapping[i].SDiagonal);
//iniFile.Set(SectionName.c_str(), "SquareToCircle", PadMapping[i].bSquareToCircle);
iniFile.Set(SectionName.c_str(), "AdvancedMapFilter", WiiMoteEmu::PadMapping[i].bFilterSettings);
// ======================================
}

View File

@ -254,6 +254,8 @@ void ConfigDialog::DoGetButtons(int GetId)
bool Hat = false; // No hats allowed
bool AdvancedMapFilter = WiiMoteEmu::PadMapping[Controller].bFilterSettings;
// Values used in this function
char format[128];
int Seconds = 4; // Seconds to wait for
@ -312,7 +314,7 @@ void ConfigDialog::DoGetButtons(int GetId)
InputCommon::GetButton(
WiiMoteEmu::joyinfo[PadID].joy, PadID, WiiMoteEmu::joyinfo[PadID].NumButtons, WiiMoteEmu::joyinfo[PadID].NumAxes, WiiMoteEmu::joyinfo[PadID].NumHats,
g_Pressed, value, type, pressed, Succeed, Stop,
LeftRight, Axis, XInput, Button, Hat);
LeftRight, Axis, XInput, Button, Hat, AdvancedMapFilter);
}
// ========================= Check for keys