From b91e3808ffbc190697979dc3dd3b418b42c382aa Mon Sep 17 00:00:00 2001 From: Marcus Wanners Date: Wed, 25 Mar 2009 00:01:30 +0000 Subject: [PATCH] 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 --- .../Plugins/Plugin_PadSimple/Src/PadSimple.cpp | 7 +++---- Source/Plugins/Plugin_PadSimple/Src/PadSimple.h | 17 +++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Source/Plugins/Plugin_PadSimple/Src/PadSimple.cpp b/Source/Plugins/Plugin_PadSimple/Src/PadSimple.cpp index 40833f3a5e..a4b4123d42 100644 --- a/Source/Plugins/Plugin_PadSimple/Src/PadSimple.cpp +++ b/Source/Plugins/Plugin_PadSimple/Src/PadSimple.cpp @@ -811,10 +811,7 @@ void PAD_Rumble(u8 _numPAD, unsigned int _uType, unsigned int _uStrength) } else if (_uType == 1) { - // Put big number lower if the rumble is too strong. - // Original value was 8000, but this was too weak for - // parts of some games. - a = _uStrength > 2 ? 65535 : 0; + a = _uStrength > 2 ? pad[_numPAD].RumbleStrength : 0; } a = int ((float)a * 0.96f); @@ -948,6 +945,7 @@ void LoadConfig() file.Get(SectionName, "Attached", &pad[i].bAttached, i==0); file.Get(SectionName, "DisableOnBackground", &pad[i].bDisable, false); file.Get(SectionName, "Rumble", &pad[i].bRumble, true); + file.Get(SectionName, "RumbleStrength", &pad[i].RumbleStrength, 8000); file.Get(SectionName, "XPad#", &pad[i].XPadPlayer); // Recording @@ -984,6 +982,7 @@ void SaveConfig() file.Set(SectionName, "Attached", pad[i].bAttached); file.Set(SectionName, "DisableOnBackground", pad[i].bDisable); file.Set(SectionName, "Rumble", pad[i].bRumble); + file.Set(SectionName, "RumbleStrength", pad[i].RumbleStrength); file.Set(SectionName, "XPad#", pad[i].XPadPlayer); // Recording #ifdef RERECORDING diff --git a/Source/Plugins/Plugin_PadSimple/Src/PadSimple.h b/Source/Plugins/Plugin_PadSimple/Src/PadSimple.h index 6f2441d9c4..041bb1077b 100644 --- a/Source/Plugins/Plugin_PadSimple/Src/PadSimple.h +++ b/Source/Plugins/Plugin_PadSimple/Src/PadSimple.h @@ -77,14 +77,15 @@ static const char* controlNames[] = struct SPads { - bool bEnableXPad; // Use an XPad in addition to the keyboard? - bool bAttached; // Pad is "attached" to the gamecube/wii - bool bDisable; // Disabled when dolphin isn't in focus - bool bRumble; // Rumble for xpad - bool bRecording; - bool bPlayback; - int XPadPlayer; // Player# of the xpad - unsigned int keyForControl[NUMCONTROLS];// Keyboard mapping + bool bEnableXPad; // Use an XPad in addition to the keyboard? + bool bAttached; // Pad is "attached" to the gamecube/wii + bool bDisable; // Disabled when dolphin isn't in focus + bool bRumble; // Rumble for xpad + unsigned int RumbleStrength; // Rumble strength + bool bRecording; // Record input? + bool bPlayback; // Playback input? + int XPadPlayer; // Player# of the xpad + unsigned int keyForControl[NUMCONTROLS]; // Keyboard mapping }; extern SPads pad[];