DolphinQt2: replace Settings with SConfig where possible

Changes:
- `ShowDevelopmentWarning` is now under the '[Interface]' group in
  Dolphin.ini, with other interface-related settings. So, whoever uses
  DolphinQt will have to edit that manually again. Sorry!
- Game search paths and the last file are now shared properly with
  DolphinWX
- Qt-only preferences like "Preferred View: list/table" are now
  stored using the platform's native settings storage, rather than in
  UI.ini
This commit is contained in:
Michael Maltese
2017-06-22 15:11:53 -07:00
parent 898bbffaa7
commit d0fdb9f149
16 changed files with 132 additions and 448 deletions

View File

@ -11,6 +11,7 @@
#include "AudioCommon/AudioCommon.h"
#include "Common/Thread.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/HotkeyManager.h"
#include "Core/IOS/IOS.h"
@ -172,7 +173,7 @@ void HotkeyScheduler::Run()
AudioCommon::ToggleMuteVolume();
// Wiimote
if (settings.IsBluetoothPassthroughEnabled())
if (SConfig::GetInstance().m_bt_passthrough_enabled)
{
const auto ios = IOS::HLE::GetIOS();
auto device = ios ? ios->GetDeviceByName("/dev/usb/oh1/57e/305") : nullptr;
@ -184,7 +185,7 @@ void HotkeyScheduler::Run()
// TODO Debugging shortcuts (Separate PR)
if (settings.IsWiiGameRunning())
if (SConfig::GetInstance().bWii)
{
int wiimote_id = -1;
if (IsHotkey(HK_WIIMOTE1_CONNECT))
@ -224,16 +225,16 @@ void HotkeyScheduler::Run()
if (IsHotkey(HK_DECREASE_EMULATION_SPEED))
{
auto speed = settings.GetEmulationSpeed() - 0.1;
auto speed = SConfig::GetInstance().m_EmulationSpeed - 0.1;
speed = (speed <= 0 || (speed >= 0.95 && speed <= 1.05)) ? 1.0 : speed;
settings.SetEmulationSpeed(speed);
SConfig::GetInstance().m_EmulationSpeed = speed;
}
if (IsHotkey(HK_INCREASE_EMULATION_SPEED))
{
auto speed = settings.GetEmulationSpeed() + 0.1;
auto speed = SConfig::GetInstance().m_EmulationSpeed + 0.1;
speed = (speed >= 0.95 && speed <= 1.05) ? 1.0 : speed;
settings.SetEmulationSpeed(speed);
SConfig::GetInstance().m_EmulationSpeed = speed;
}
// Slot Saving / Loading