1. Circumvent the IDirectInputDevice2::SetDataFormat() error when opening the configuration window to.

2. Fixed the Allow out of focus input option again

3. Allow changing of the mapped pads while a game is running

4. Prevented crashes or problems from any combination of having the configuration window open when a game is started or stopped

5. Fixed a crash that would occur after nJoy was started with a connected pad, then stopped, and all pads disconnected, then started again

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2215 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson
2009-02-11 10:30:02 +00:00
parent 5ba51ed789
commit 68f39cb287
18 changed files with 271 additions and 136 deletions

View File

@ -136,7 +136,7 @@ void Config::Save(int Slot)
{
/* Save joypad specific settings. Check for "PadMapping[i].ID < SDL_NumJoysticks()" to
avoid reading a joyinfo that does't exist */
if(PadMapping[i].ID >= SDL_NumJoysticks()) continue;
if(PadMapping[i].ID >= joyinfo.size()) continue;
// Create a new section name after the joypad name
SectionName = joyinfo[PadMapping[i].ID].Name;
@ -175,7 +175,7 @@ void Config::Save(int Slot)
//if(m_frame) m_frame->LogMsg("Saved: %s %i\n", SectionName.c_str(), PadMapping[i].triggertype);
}
//Console::Print("%i: Save: %i\n", 0, PadMapping[0].halfpress);
Console::Print("%i: Save: %i\n", 0, PadMapping[0].halfpress);
file.Save("nJoy.ini");
}
@ -224,8 +224,8 @@ void Config::Load(bool ChangePad, bool ChangeSaveByID)
if(g_Config.bSaveByID)
{
/* Prevent a crash from illegal access to joyinfo that will only have values for
the current amount of connected PadMapping */
if(PadMapping[i].ID >= SDL_NumJoysticks()) continue;
the current amount of connected pads */
if(PadMapping[i].ID >= joyinfo.size()) continue;
// Create a section name
SectionName = joyinfo[PadMapping[i].ID].Name;
@ -263,6 +263,6 @@ void Config::Load(bool ChangePad, bool ChangeSaveByID)
//if(m_frame) m_frame->LogMsg("%i: Enabled: %i\n", i, PadMapping[i].buttons[CTL_X_BUTTON]);
}
//Console::Print("%i: Load: %i\n", 0, PadMapping[0].halfpress);
Console::Print("%i: Load: %i\n", 0, PadMapping[0].halfpress);
}