Changed rumble strength to a setting in the config file.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2751 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Marcus Wanners 2009-03-25 00:01:30 +00:00
parent 5533ac9b7f
commit b91e3808ff
2 changed files with 12 additions and 12 deletions

View File

@ -811,10 +811,7 @@ void PAD_Rumble(u8 _numPAD, unsigned int _uType, unsigned int _uStrength)
} }
else if (_uType == 1) else if (_uType == 1)
{ {
// Put big number lower if the rumble is too strong. a = _uStrength > 2 ? pad[_numPAD].RumbleStrength : 0;
// Original value was 8000, but this was too weak for
// parts of some games.
a = _uStrength > 2 ? 65535 : 0;
} }
a = int ((float)a * 0.96f); a = int ((float)a * 0.96f);
@ -948,6 +945,7 @@ void LoadConfig()
file.Get(SectionName, "Attached", &pad[i].bAttached, i==0); file.Get(SectionName, "Attached", &pad[i].bAttached, i==0);
file.Get(SectionName, "DisableOnBackground", &pad[i].bDisable, false); file.Get(SectionName, "DisableOnBackground", &pad[i].bDisable, false);
file.Get(SectionName, "Rumble", &pad[i].bRumble, true); file.Get(SectionName, "Rumble", &pad[i].bRumble, true);
file.Get(SectionName, "RumbleStrength", &pad[i].RumbleStrength, 8000);
file.Get(SectionName, "XPad#", &pad[i].XPadPlayer); file.Get(SectionName, "XPad#", &pad[i].XPadPlayer);
// Recording // Recording
@ -984,6 +982,7 @@ void SaveConfig()
file.Set(SectionName, "Attached", pad[i].bAttached); file.Set(SectionName, "Attached", pad[i].bAttached);
file.Set(SectionName, "DisableOnBackground", pad[i].bDisable); file.Set(SectionName, "DisableOnBackground", pad[i].bDisable);
file.Set(SectionName, "Rumble", pad[i].bRumble); file.Set(SectionName, "Rumble", pad[i].bRumble);
file.Set(SectionName, "RumbleStrength", pad[i].RumbleStrength);
file.Set(SectionName, "XPad#", pad[i].XPadPlayer); file.Set(SectionName, "XPad#", pad[i].XPadPlayer);
// Recording // Recording
#ifdef RERECORDING #ifdef RERECORDING

View File

@ -81,10 +81,11 @@ struct SPads
bool bAttached; // Pad is "attached" to the gamecube/wii bool bAttached; // Pad is "attached" to the gamecube/wii
bool bDisable; // Disabled when dolphin isn't in focus bool bDisable; // Disabled when dolphin isn't in focus
bool bRumble; // Rumble for xpad bool bRumble; // Rumble for xpad
bool bRecording; unsigned int RumbleStrength; // Rumble strength
bool bPlayback; bool bRecording; // Record input?
bool bPlayback; // Playback input?
int XPadPlayer; // Player# of the xpad int XPadPlayer; // Player# of the xpad
unsigned int keyForControl[NUMCONTROLS];// Keyboard mapping unsigned int keyForControl[NUMCONTROLS]; // Keyboard mapping
}; };
extern SPads pad[]; extern SPads pad[];