mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-13 07:49:19 +01:00
Qt: Implement missing settings
This commit is contained in:
parent
94ba78d717
commit
15243093c4
@ -159,18 +159,18 @@ void HotkeyScheduler::Run()
|
|||||||
if (IsHotkey(HK_EXIT))
|
if (IsHotkey(HK_EXIT))
|
||||||
emit ExitHotkey();
|
emit ExitHotkey();
|
||||||
|
|
||||||
|
auto& settings = Settings::Instance();
|
||||||
|
|
||||||
// Volume
|
// Volume
|
||||||
if (IsHotkey(HK_VOLUME_DOWN))
|
if (IsHotkey(HK_VOLUME_DOWN))
|
||||||
AudioCommon::DecreaseVolume(3);
|
settings.DecreaseVolume(3);
|
||||||
|
|
||||||
if (IsHotkey(HK_VOLUME_UP))
|
if (IsHotkey(HK_VOLUME_UP))
|
||||||
AudioCommon::IncreaseVolume(3);
|
settings.IncreaseVolume(3);
|
||||||
|
|
||||||
if (IsHotkey(HK_VOLUME_TOGGLE_MUTE))
|
if (IsHotkey(HK_VOLUME_TOGGLE_MUTE))
|
||||||
AudioCommon::ToggleMuteVolume();
|
AudioCommon::ToggleMuteVolume();
|
||||||
|
|
||||||
auto& settings = Settings::Instance();
|
|
||||||
|
|
||||||
// Wiimote
|
// Wiimote
|
||||||
if (settings.IsBluetoothPassthroughEnabled())
|
if (settings.IsBluetoothPassthroughEnabled())
|
||||||
{
|
{
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QSize>
|
#include <QSize>
|
||||||
|
|
||||||
|
#include "AudioCommon/AudioCommon.h"
|
||||||
#include "Common/FileSearch.h"
|
#include "Common/FileSearch.h"
|
||||||
#include "Common/FileUtil.h"
|
#include "Common/FileUtil.h"
|
||||||
#include "Common/StringUtil.h"
|
#include "Common/StringUtil.h"
|
||||||
@ -230,6 +231,32 @@ bool Settings::GetHideCursor() const
|
|||||||
return SConfig::GetInstance().bHideCursor;
|
return SConfig::GetInstance().bHideCursor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Settings::GetVolume() const
|
||||||
|
{
|
||||||
|
return SConfig::GetInstance().m_Volume;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Settings::SetVolume(int volume)
|
||||||
|
{
|
||||||
|
if (GetVolume() != volume)
|
||||||
|
{
|
||||||
|
SConfig::GetInstance().m_Volume = volume;
|
||||||
|
emit VolumeChanged(volume);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Settings::IncreaseVolume(int volume)
|
||||||
|
{
|
||||||
|
AudioCommon::IncreaseVolume(volume);
|
||||||
|
emit VolumeChanged(GetVolume());
|
||||||
|
}
|
||||||
|
|
||||||
|
void Settings::DecreaseVolume(int volume)
|
||||||
|
{
|
||||||
|
AudioCommon::DecreaseVolume(volume);
|
||||||
|
emit VolumeChanged(GetVolume());
|
||||||
|
}
|
||||||
|
|
||||||
bool& Settings::BannerVisible() const
|
bool& Settings::BannerVisible() const
|
||||||
{
|
{
|
||||||
return SConfig::GetInstance().m_showBannerColumn;
|
return SConfig::GetInstance().m_showBannerColumn;
|
||||||
|
@ -75,6 +75,12 @@ public:
|
|||||||
void SetHideCursor(bool hide_cursor);
|
void SetHideCursor(bool hide_cursor);
|
||||||
bool GetHideCursor() const;
|
bool GetHideCursor() const;
|
||||||
|
|
||||||
|
// Audio
|
||||||
|
int GetVolume() const;
|
||||||
|
void SetVolume(int volume);
|
||||||
|
void IncreaseVolume(int volume);
|
||||||
|
void DecreaseVolume(int volume);
|
||||||
|
|
||||||
// Columns
|
// Columns
|
||||||
bool& BannerVisible() const;
|
bool& BannerVisible() const;
|
||||||
bool& CountryVisible() const;
|
bool& CountryVisible() const;
|
||||||
@ -116,6 +122,7 @@ signals:
|
|||||||
void PathAdded(const QString&);
|
void PathAdded(const QString&);
|
||||||
void PathRemoved(const QString&);
|
void PathRemoved(const QString&);
|
||||||
void HideCursorChanged();
|
void HideCursorChanged();
|
||||||
|
void VolumeChanged(int volume);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Settings();
|
Settings();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user