mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
Merge pull request #10443 from JosJuice/port-wiimote-source
Port Wiimote source settings to the new config system
This commit is contained in:
@ -36,6 +36,7 @@
|
||||
#include "Core/Boot/Boot.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/Config/SYSCONFSettings.h"
|
||||
#include "Core/Config/WiimoteSettings.h"
|
||||
#include "Core/ConfigLoaders/MovieConfigLoader.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
@ -176,7 +177,7 @@ std::string GetInputDisplay()
|
||||
s_controllers[i] = ControllerType::GC;
|
||||
else
|
||||
s_controllers[i] = ControllerType::None;
|
||||
s_wiimotes[i] = WiimoteCommon::GetSource(i) != WiimoteSource::None;
|
||||
s_wiimotes[i] = Config::Get(Config::GetInfoForWiimoteSource(i)) != WiimoteSource::None;
|
||||
}
|
||||
}
|
||||
|
||||
@ -513,7 +514,7 @@ void ChangeWiiPads(bool instantly)
|
||||
|
||||
for (int i = 0; i < MAX_WIIMOTES; ++i)
|
||||
{
|
||||
wiimotes[i] = WiimoteCommon::GetSource(i) != WiimoteSource::None;
|
||||
wiimotes[i] = Config::Get(Config::GetInfoForWiimoteSource(i)) != WiimoteSource::None;
|
||||
}
|
||||
|
||||
// This is important for Wiimotes, because they can desync easily if they get re-activated
|
||||
@ -525,7 +526,8 @@ void ChangeWiiPads(bool instantly)
|
||||
{
|
||||
const bool is_using_wiimote = IsUsingWiimote(i);
|
||||
|
||||
WiimoteCommon::SetSource(i, is_using_wiimote ? WiimoteSource::Emulated : WiimoteSource::None);
|
||||
Config::SetCurrent(Config::GetInfoForWiimoteSource(i),
|
||||
is_using_wiimote ? WiimoteSource::Emulated : WiimoteSource::None);
|
||||
if (bt != nullptr)
|
||||
bt->AccessWiimoteByIndex(i)->Activate(is_using_wiimote);
|
||||
}
|
||||
|
Reference in New Issue
Block a user