Skip to content

Commit

Permalink
Config: Add an ini setting to control real Wii Remote report duplicat…
Browse files Browse the repository at this point in the history
…ion and decouple it from the speaker data setting.

It is enabled by default.
  • Loading branch information
jordan-woyak committed Jun 26, 2021
1 parent 52fb2fa commit 9d0f73e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Source/Core/Core/Config/MainSettings.cpp
Expand Up @@ -109,6 +109,8 @@ const Info<DiscIO::Region> MAIN_FALLBACK_REGION{{System::Main, "Core", "Fallback
const Info<bool> MAIN_AUTO_DISC_CHANGE{{System::Main, "Core", "AutoDiscChange"}, false};
const Info<bool> MAIN_ALLOW_SD_WRITES{{System::Main, "Core", "WiiSDCardAllowWrites"}, true};
const Info<bool> MAIN_ENABLE_SAVESTATES{{System::Main, "Core", "EnableSaveStates"}, false};
const Info<bool> MAIN_REAL_WII_REMOTE_REPEAT_REPORTS{
{System::Main, "Core", "RealWiiRemoteRepeatReports"}, true};

// Main.Display

Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/Config/MainSettings.h
Expand Up @@ -87,6 +87,7 @@ extern const Info<bool> MAIN_AUTO_DISC_CHANGE;
extern const Info<bool> MAIN_ALLOW_SD_WRITES;
extern const Info<bool> MAIN_ENABLE_SAVESTATES;
extern const Info<DiscIO::Region> MAIN_FALLBACK_REGION;
extern const Info<bool> MAIN_REAL_WII_REMOTE_REPEAT_REPORTS;

// Main.DSP

Expand Down
3 changes: 2 additions & 1 deletion Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp
Expand Up @@ -47,7 +47,7 @@ bool IsSettingSaveable(const Config::Location& config_location)
}
}

static constexpr std::array<const Config::Location*, 17> s_setting_saveable = {
static constexpr std::array s_setting_saveable = {
// Main.Core

&Config::MAIN_DEFAULT_ISO.GetLocation(),
Expand All @@ -63,6 +63,7 @@ bool IsSettingSaveable(const Config::Location& config_location)
&Config::MAIN_GFX_BACKEND.GetLocation(),
&Config::MAIN_ENABLE_SAVESTATES.GetLocation(),
&Config::MAIN_FALLBACK_REGION.GetLocation(),
&Config::MAIN_REAL_WII_REMOTE_REPEAT_REPORTS.GetLocation(),

// Main.Interface

Expand Down
4 changes: 3 additions & 1 deletion Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp
Expand Up @@ -16,6 +16,7 @@
#include "Common/IniFile.h"
#include "Common/Swap.h"
#include "Common/Thread.h"
#include "Core/Config/MainSettings.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/HW/Wiimote.h"
Expand Down Expand Up @@ -442,7 +443,8 @@ void Wiimote::Update()
// We duplicate data reports to accomplish this.
// Unfortunately this breaks detection of motion gestures in some games.
// e.g. Sonic and the Secret Rings, Jett Rocket
const bool repeat_reports_to_maintain_200hz = SConfig::GetInstance().m_WiimoteEnableSpeaker;
const bool repeat_reports_to_maintain_200hz =
Config::Get(Config::MAIN_REAL_WII_REMOTE_REPEAT_REPORTS);

const Report& rpt = ProcessReadQueue(repeat_reports_to_maintain_200hz);

Expand Down

0 comments on commit 9d0f73e

Please sign in to comment.