mirror of
https://github.com/azahar-emu/azahar.git
synced 2026-06-18 00:49:32 -04:00
Rename USE_DISCORD_PRESENCE option and def to ENABLE_DISCORD_RPC
This commit is contained in:
parent
04f3a93854
commit
1137d530b0
13 changed files with 27 additions and 27 deletions
|
|
@ -26,7 +26,7 @@ cmake .. -G Ninja \
|
|||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DENABLE_ROOM_STANDALONE=OFF \
|
||||
-DUSE_DISCORD_PRESENCE=ON \
|
||||
-DENABLE_DISCORD_RPC=ON \
|
||||
"${EXTRA_CMAKE_FLAGS[@]}"
|
||||
ninja
|
||||
strip -s bin/Release/*
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ cmake ../.. -GNinja \
|
|||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_OSX_ARCHITECTURES="$BUILD_ARCH" \
|
||||
-DENABLE_ROOM_STANDALONE=OFF \
|
||||
-DUSE_DISCORD_PRESENCE=ON \
|
||||
-DENABLE_DISCORD_RPC=ON \
|
||||
"${EXTRA_CMAKE_FLAGS[@]}"
|
||||
ninja
|
||||
ninja bundle
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ x86_64-w64-mingw32.shared-cmake .. \
|
|||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DUSE_DISCORD_PRESENCE=ON \
|
||||
-DENABLE_DISCORD_RPC=ON \
|
||||
-DUSE_SYSTEM_BOOST=ON \
|
||||
-DUSE_SYSTEM_CRYPTOPP=ON \
|
||||
"${EXTRA_CMAKE_FLAGS[@]}"
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ cmake .. -G Ninja \
|
|||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DUSE_DISCORD_PRESENCE=ON \
|
||||
-DENABLE_DISCORD_RPC=ON \
|
||||
"${EXTRA_CMAKE_FLAGS[@]}"
|
||||
ninja
|
||||
ninja bundle
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ CMAKE_DEPENDENT_OPTION(ENABLE_OPENGL "Enables the OpenGL renderer" ${DEFAULT_ENA
|
|||
# NetBSD doesn't support Vulkan yet, remove this check when it does.
|
||||
CMAKE_DEPENDENT_OPTION(ENABLE_VULKAN "Enables the Vulkan renderer" ON "NOT (BSD MATCHES \"NetBSD\")" OFF)
|
||||
|
||||
option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF)
|
||||
option(ENABLE_DISCORD_RPC "Enables Discord Rich Presence" OFF)
|
||||
|
||||
option(ENABLE_MICROPROFILE "Enables microprofile capabilities" OFF)
|
||||
|
||||
|
|
|
|||
2
externals/CMakeLists.txt
vendored
2
externals/CMakeLists.txt
vendored
|
|
@ -276,7 +276,7 @@ if (ENABLE_CUBEB)
|
|||
endif()
|
||||
|
||||
# DiscordRPC
|
||||
if (USE_DISCORD_PRESENCE)
|
||||
if (ENABLE_DISCORD_RPC)
|
||||
# rapidjson used by discord-rpc is old and doesn't correctly detect endianness for some platforms.
|
||||
include(TestBigEndian)
|
||||
test_big_endian(RAPIDJSON_BIG_ENDIAN)
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ if (ENABLE_QT AND APPLE)
|
|||
target_link_libraries(citra_meta PRIVATE Qt6::GuiPrivate)
|
||||
endif()
|
||||
|
||||
if (ENABLE_QT AND USE_DISCORD_PRESENCE)
|
||||
if (ENABLE_QT AND ENABLE_DISCORD_RPC)
|
||||
target_link_libraries(citra_meta PRIVATE discord-rpc)
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -340,13 +340,13 @@ target_compile_definitions(citra_qt PRIVATE
|
|||
-DQT_NO_CAST_TO_ASCII
|
||||
)
|
||||
|
||||
if (USE_DISCORD_PRESENCE)
|
||||
if (ENABLE_DISCORD_RPC)
|
||||
target_sources(citra_qt PUBLIC
|
||||
discord_impl.cpp
|
||||
discord_impl.h
|
||||
)
|
||||
target_link_libraries(citra_qt PRIVATE discord-rpc)
|
||||
target_compile_definitions(citra_qt PRIVATE -DUSE_DISCORD_PRESENCE)
|
||||
target_compile_definitions(citra_qt PRIVATE -DENABLE_DISCORD_RPC)
|
||||
endif()
|
||||
|
||||
if (ENABLE_WEB_SERVICE)
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
#endif
|
||||
#include "citra_qt/debugger/registers.h"
|
||||
#include "citra_qt/debugger/wait_tree.h"
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
#ifdef ENABLE_DISCORD_RPC
|
||||
#include "citra_qt/discord.h"
|
||||
#endif
|
||||
#include "citra_qt/dumping/dumping_dialog.h"
|
||||
|
|
@ -123,7 +123,7 @@
|
|||
Q_IMPORT_PLUGIN(QDarwinCameraPermissionPlugin);
|
||||
#endif
|
||||
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
#ifdef ENABLE_DISCORD_RPC
|
||||
#include "citra_qt/discord_impl.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -422,7 +422,7 @@ GMainWindow::GMainWindow(Core::System& system_)
|
|||
default_theme_paths = QIcon::themeSearchPaths();
|
||||
UpdateUITheme();
|
||||
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
#ifdef ENABLE_DISCORD_RPC
|
||||
SetDiscordEnabled(UISettings::values.enable_discord_presence.GetValue());
|
||||
discord_rpc->Update(false);
|
||||
#endif
|
||||
|
|
@ -1627,7 +1627,7 @@ void GMainWindow::ShutdownGame() {
|
|||
|
||||
AllowOSSleep();
|
||||
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
#ifdef ENABLE_DISCORD_RPC
|
||||
discord_rpc->Pause();
|
||||
#endif
|
||||
|
||||
|
|
@ -1658,7 +1658,7 @@ void GMainWindow::ShutdownGame() {
|
|||
|
||||
OnCloseMovie();
|
||||
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
#ifdef ENABLE_DISCORD_RPC
|
||||
discord_rpc->Update(false);
|
||||
#endif
|
||||
#ifdef __unix__
|
||||
|
|
@ -2602,7 +2602,7 @@ void GMainWindow::OnResumeGame(bool first_start) {
|
|||
play_time_manager->Start();
|
||||
|
||||
if (first_start) {
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
#ifdef ENABLE_DISCORD_RPC
|
||||
discord_rpc->Update(true);
|
||||
#endif
|
||||
}
|
||||
|
|
@ -2945,7 +2945,7 @@ void GMainWindow::OnConfigure() {
|
|||
const int old_input_profile_index = Settings::values.current_input_profile_index;
|
||||
const auto old_input_profiles = Settings::values.input_profiles;
|
||||
const auto old_touch_from_button_maps = Settings::values.touch_from_button_maps;
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
#ifdef ENABLE_DISCORD_RPC
|
||||
const bool old_discord_presence = UISettings::values.enable_discord_presence.GetValue();
|
||||
#endif
|
||||
#ifdef __unix__
|
||||
|
|
@ -2959,7 +2959,7 @@ void GMainWindow::OnConfigure() {
|
|||
if (UISettings::values.theme != old_theme) {
|
||||
UpdateUITheme();
|
||||
}
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
#ifdef ENABLE_DISCORD_RPC
|
||||
if (UISettings::values.enable_discord_presence.GetValue() != old_discord_presence) {
|
||||
SetDiscordEnabled(UISettings::values.enable_discord_presence.GetValue());
|
||||
discord_rpc->Update(system.IsPoweredOn());
|
||||
|
|
@ -4317,7 +4317,7 @@ void GMainWindow::RetranslateStatusBar() {
|
|||
multiplayer_state->retranslateUi();
|
||||
}
|
||||
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
#ifdef ENABLE_DISCORD_RPC
|
||||
void GMainWindow::SetDiscordEnabled([[maybe_unused]] bool state) {
|
||||
if (state) {
|
||||
discord_rpc = std::make_unique<DiscordRPC::DiscordImpl>(system);
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ namespace Camera {
|
|||
class QtMultimediaCameraHandlerFactory;
|
||||
}
|
||||
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
#ifdef ENABLE_DISCORD_RPC
|
||||
namespace DiscordRPC {
|
||||
class DiscordInterface;
|
||||
}
|
||||
|
|
@ -110,7 +110,7 @@ public:
|
|||
|
||||
GameList* game_list;
|
||||
std::unique_ptr<PlayTime::PlayTimeManager> play_time_manager;
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
#ifdef ENABLE_DISCORD_RPC
|
||||
std::unique_ptr<DiscordRPC::DiscordInterface> discord_rpc;
|
||||
#endif
|
||||
|
||||
|
|
@ -174,7 +174,7 @@ private:
|
|||
void BootGame(const QString& filename);
|
||||
void ShutdownGame();
|
||||
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
#ifdef ENABLE_DISCORD_RPC
|
||||
void SetDiscordEnabled(bool state);
|
||||
#endif
|
||||
void LoadAmiibo(const QString& filename);
|
||||
|
|
|
|||
|
|
@ -834,7 +834,7 @@ void QtConfig::ReadUIValues() {
|
|||
UISettings::values.theme =
|
||||
ReadSetting(Settings::QKeys::theme, QString::fromUtf8(UISettings::themes[0].second))
|
||||
.toString();
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
#ifdef ENABLE_DISCORD_RPC
|
||||
ReadBasicSetting(UISettings::values.enable_discord_presence);
|
||||
#endif
|
||||
ReadBasicSetting(UISettings::values.screenshot_resolution_factor);
|
||||
|
|
@ -1367,7 +1367,7 @@ void QtConfig::SaveUIValues() {
|
|||
if (global) {
|
||||
WriteSetting(Settings::QKeys::theme, UISettings::values.theme,
|
||||
QString::fromUtf8(UISettings::themes[0].second));
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
#ifdef ENABLE_DISCORD_RPC
|
||||
WriteBasicSetting(UISettings::values.enable_discord_presence);
|
||||
#endif
|
||||
WriteBasicSetting(UISettings::values.screenshot_resolution_factor);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ ConfigureWeb::ConfigureWeb(QWidget* parent)
|
|||
: QWidget(parent), ui(std::make_unique<Ui::ConfigureWeb>()) {
|
||||
ui->setupUi(this);
|
||||
|
||||
#ifndef USE_DISCORD_PRESENCE
|
||||
#ifndef ENABLE_DISCORD_RPC
|
||||
ui->discord_group->setEnabled(false);
|
||||
#endif
|
||||
SetConfiguration();
|
||||
|
|
@ -23,13 +23,13 @@ ConfigureWeb::ConfigureWeb(QWidget* parent)
|
|||
ConfigureWeb::~ConfigureWeb() = default;
|
||||
|
||||
void ConfigureWeb::SetConfiguration() {
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
#ifdef ENABLE_DISCORD_RPC
|
||||
ui->toggle_discordrpc->setChecked(UISettings::values.enable_discord_presence.GetValue());
|
||||
#endif
|
||||
}
|
||||
|
||||
void ConfigureWeb::ApplyConfiguration() {
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
#ifdef ENABLE_DISCORD_RPC
|
||||
UISettings::values.enable_discord_presence = ui->toggle_discordrpc->isChecked();
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ struct Values {
|
|||
|
||||
Settings::Setting<std::string> inserted_cartridge{"", "inserted_cartridge"};
|
||||
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
#ifdef ENABLE_DISCORD_RPC
|
||||
// Discord RPC
|
||||
Settings::Setting<bool> enable_discord_presence{true, "enable_discord_presence"};
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue