mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-18 01:14:56 +00:00
added discord rpc (#1178)
* added discord rpc
* linting issues
* Revert "linting issues"
This reverts commit 55f4e39506
.
* fix clang-format issues
* removed wrong rpc submodule
* added correct rpc submodule
* Moved cmake instructions to correct files.
* added minor suggestions from pr
* Added an option to enable/disable RPC, added rpc to emulator.cpp making it work on nonqt builds
* typo & minor stuff
* Changed getInstance implementation with Singleton class.
* Update discord_rpc_handler.cpp
discord id
* fixed ci clangformat errors
---------
Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
This commit is contained in:
parent
aba803bd04
commit
3e7137cc6b
14 changed files with 133 additions and 50 deletions
|
@ -165,6 +165,17 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices, QWidge
|
|||
BackgroundMusicPlayer::getInstance().setVolume(val);
|
||||
});
|
||||
|
||||
connect(ui->discordRPCCheckbox, &QCheckBox::stateChanged, this, [](int val) {
|
||||
Config::setEnableDiscordRPC(val);
|
||||
auto* rpc = Common::Singleton<DiscordRPCHandler::RPC>::Instance();
|
||||
if (val == Qt::Checked) {
|
||||
rpc->init();
|
||||
rpc->setStatusIdling();
|
||||
} else {
|
||||
rpc->shutdown();
|
||||
}
|
||||
});
|
||||
|
||||
connect(ui->backButtonBehaviorComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, [this](int index) {
|
||||
if (index >= 0 && index < ui->backButtonBehaviorComboBox->count()) {
|
||||
|
@ -273,6 +284,7 @@ void SettingsDialog::LoadValuesFromConfig() {
|
|||
ui->nullGpuCheckBox->setChecked(Config::nullGpu());
|
||||
ui->playBGMCheckBox->setChecked(Config::getPlayBGM());
|
||||
ui->BGMVolumeSlider->setValue((Config::getBGMvolume()));
|
||||
ui->discordRPCCheckbox->setChecked(Config::getEnableDiscordRPC());
|
||||
ui->fullscreenCheckBox->setChecked(Config::isFullscreenMode());
|
||||
ui->showSplashCheckBox->setChecked(Config::showSplash());
|
||||
ui->ps4proCheckBox->setChecked(Config::isNeoMode());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue