diff options
Diffstat (limited to 'games-engines/fs2_open/files/fs2_open-23.2.0-disable-discord.patch')
-rw-r--r-- | games-engines/fs2_open/files/fs2_open-23.2.0-disable-discord.patch | 175 |
1 files changed, 175 insertions, 0 deletions
diff --git a/games-engines/fs2_open/files/fs2_open-23.2.0-disable-discord.patch b/games-engines/fs2_open/files/fs2_open-23.2.0-disable-discord.patch new file mode 100644 index 000000000..90154f817 --- /dev/null +++ b/games-engines/fs2_open/files/fs2_open-23.2.0-disable-discord.patch @@ -0,0 +1,175 @@ +--- a/freespace2/freespace.cpp ++++ b/freespace2/freespace.cpp +@@ -84,7 +84,6 @@ + #include "io/timer.h" + #include "jumpnode/jumpnode.h" + #include "lab/labv2.h" +-#include "libs/discord/discord.h" + #include "libs/ffmpeg/FFmpeg.h" + #include "lighting/lighting.h" + #include "lighting/lighting_profiles.h" +@@ -1987,9 +1986,6 @@ + #ifdef WITH_FFMPEG + libs::ffmpeg::initialize(); + #endif +- if (Discord_presence) { +- libs::discord::init(); +- } + } + + mod_table_post_process(); +--- a/code/source_groups.cmake ++++ b/code/source_groups.cmake +@@ -706,11 +706,6 @@ + libs/antlr/ErrorListener.h + ) + +-add_file_folder("Libs\\\\Discord" +- libs/discord/discord.cpp +- libs/discord/discord.h +-) +- + if (FSO_BUILD_WITH_FFMPEG) + add_file_folder("Libs\\\\FFmpeg" + libs/ffmpeg/FFmpeg.cpp +--- a/code/mod_table/mod_table.h ++++ b/code/mod_table/mod_table.h +@@ -124,7 +124,6 @@ + } Shadow_disable_overrides; + extern float Thruster_easing; + extern bool Always_use_distant_firepoints; +-extern bool Discord_presence; + extern bool Hotkey_always_hide_hidden_ships; + extern bool Use_weapon_class_sounds_for_hits_to_player; + extern bool SCPUI_loads_hi_res_animations; +--- a/code/mod_table/mod_table.cpp ++++ b/code/mod_table/mod_table.cpp +@@ -12,7 +12,6 @@ + #include "globalincs/version.h" + #include "graphics/shadows.h" + #include "localization/localize.h" +-#include "libs/discord/discord.h" + #include "mission/missioncampaign.h" + #include "mission/missionload.h" + #include "mission/missionmessage.h" +@@ -135,7 +134,6 @@ + shadow_disable_overrides Shadow_disable_overrides {false, false, false, false}; + float Thruster_easing; + bool Always_use_distant_firepoints; +-bool Discord_presence; + bool Hotkey_always_hide_hidden_ships; + bool Use_weapon_class_sounds_for_hits_to_player; + bool SCPUI_loads_hi_res_animations; +@@ -145,29 +143,6 @@ + std::array<std::tuple<float, float>, 6> Fred_spacemouse_nonlinearity; + bool Randomize_particle_rotation; + +-static auto DiscordOption __UNUSED = options::OptionBuilder<bool>("Other.Discord", "Discord Presence", "Toggle Discord Rich Presence") +- .category("Other") +- .default_val(Discord_presence) +- .level(options::ExpertLevel::Advanced) +- .importance(55) +- .change_listener([](bool val, bool) { +- if(Discord_presence){ +- if (!val) { +- Discord_presence = false; +- libs::discord::shutdown(); +- return true; +- } +- } else { +- if (val) { +- Discord_presence = true; +- libs::discord::init(); +- return true; +- } +- } +- return false; +- }) +- .finish(); +- + void mod_table_set_version_flags(); + + SCP_vector<std::pair<SCP_string, gr_capability>> req_render_ext_pairs = { +@@ -1264,10 +1239,6 @@ + stuff_boolean(&Always_use_distant_firepoints); + } + +- if (optional_string("$Enable Discord rich presence:")) { +- stuff_boolean(&Discord_presence); +- } +- + if (optional_string("$Always hide hidden ships in hotkey list:")) { + stuff_boolean(&Hotkey_always_hide_hidden_ships); + } +@@ -1440,7 +1411,6 @@ + Lead_indicator_behavior = leadIndicatorBehavior::DEFAULT; + Thruster_easing = 0; + Always_use_distant_firepoints = false; +- Discord_presence = true; + Hotkey_always_hide_hidden_ships = false; + Use_weapon_class_sounds_for_hits_to_player = false; + SCPUI_loads_hi_res_animations = true; +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -33,8 +33,6 @@ + include(FFmpeg.cmake) + endif() + +-add_subdirectory(discord) +- + include(libRocket.cmake) + + add_subdirectory(libpcp) +--- a/code/CMakeLists.txt ++++ b/code/CMakeLists.txt +@@ -44,8 +44,6 @@ + + target_link_libraries(code PUBLIC md5) + +-target_link_libraries(code PUBLIC discord-rpc) +- + target_link_libraries(code PUBLIC libRocket) + + target_link_libraries(code PUBLIC pcp) +--- a/code/scripting/api/libs/base.cpp ++++ b/code/scripting/api/libs/base.cpp +@@ -8,7 +8,6 @@ + #include "freespace.h" + + #include "gamesequence/gamesequence.h" +-#include "libs/discord/discord.h" + #include "mission/missiontraining.h" + #include "network/multi.h" + #include "parse/parselo.h" +@@ -754,31 +753,6 @@ + } + + +-ADE_FUNC(setDiscordPresence, +- l_Base, +- "string DisplayText, [boolean Gameplay]", +- "Sets the Discord presence to a specific string. If Gameplay is true then the string is ignored and presence will " +- "be set as if the player is in-mission. The latter will fail if the player is not in a mission.", +- nullptr, +- "nothing") +-{ +- const char* text; +- bool gp = false; +- if (!ade_get_args(L, "s|b", &text, &gp)) { +- return ADE_RETURN_NIL; +- } +- +- if (gp) { +- if ((Game_mode & GM_IN_MISSION) != 0){ +- libs::discord::set_presence_gameplay(); +- } +- } else { +- libs::discord::set_presence_string(text); +- } +- +- return ADE_RETURN_NIL; +-} +- + ADE_FUNC(hasFocus, l_Base, nullptr, "Returns if the game engine has focus or not", "boolean", "True if the game has focus, false if it has been lost") + { + return ade_set_args(L, "b", os_foreground()); |