[Scummvm-git-logs] scummvm branch-2-3 -> fa3df6582241f5a68b5366b758db0eeefe88c005

lotharsm mail at serra.me
Sat Sep 11 16:50:58 UTC 2021


This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
17c6633bd3 BASE: Enable Discord RPC integration by default
a794f84af8 BACKENDS: PRESENCE: Only trigger Discord RPC if enabled in configuration
3df4ae9eda GUI: Add GUI option for Discord RPC
fa3df65822 NEWS: Mention Discord RPC GUI option


Commit: 17c6633bd310028278ac2c00da41fd7cf3fdecaa
    https://github.com/scummvm/scummvm/commit/17c6633bd310028278ac2c00da41fd7cf3fdecaa
Author: Lothar Serra Mari (mail at serra.me)
Date: 2021-09-11T18:50:29+02:00

Commit Message:
BASE: Enable Discord RPC integration by default

Changed paths:
    base/commandLine.cpp


diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index f84fa1265f..53927be248 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -352,6 +352,9 @@ void registerDefaults() {
 
 	ConfMan.registerDefault("fluidsynth_misc_interpolation", "4th");
 #endif
+#ifdef USE_DISCORD
+	ConfMan.registerDefault("discord_rpc", true);
+#endif
 }
 
 static bool parseGameName(const Common::String &gameName, Common::String &engineId, Common::String &gameId) {


Commit: a794f84af8bbbe09cfc240986a63dfbe4a684027
    https://github.com/scummvm/scummvm/commit/a794f84af8bbbe09cfc240986a63dfbe4a684027
Author: Lothar Serra Mari (mail at serra.me)
Date: 2021-09-11T18:50:29+02:00

Commit Message:
BACKENDS: PRESENCE: Only trigger Discord RPC if enabled in configuration

Changed paths:
    backends/presence/discord/discord.cpp


diff --git a/backends/presence/discord/discord.cpp b/backends/presence/discord/discord.cpp
index 700b88392a..5f2ab21393 100644
--- a/backends/presence/discord/discord.cpp
+++ b/backends/presence/discord/discord.cpp
@@ -24,6 +24,7 @@
 #include "backends/presence/discord/discord.h"
 
 #ifdef USE_DISCORD
+#include "common/config-manager.h"
 #include "common/translation.h"
 
 #include <discord_rpc.h>
@@ -53,7 +54,11 @@ void DiscordPresence::updateStatus(const Common::String &name, const Common::Str
 	presence.smallImageKey = "scummvm";
 	presence.smallImageText = "ScummVM";
 	presence.startTimestamp = time(0);
-	Discord_UpdatePresence(&presence);
+	if (ConfMan.getBool("discord_rpc", Common::ConfigManager::kApplicationDomain)) {
+		Discord_UpdatePresence(&presence);
+	} else {
+		Discord_ClearPresence();
+	}
 }
 
 #endif


Commit: 3df4ae9eda3177bcab2a78ab02fc614b7c97faa6
    https://github.com/scummvm/scummvm/commit/3df4ae9eda3177bcab2a78ab02fc614b7c97faa6
Author: Lothar Serra Mari (mail at serra.me)
Date: 2021-09-11T18:50:29+02:00

Commit Message:
GUI: Add GUI option for Discord RPC

Changed paths:
    gui/ThemeEngine.h
    gui/options.cpp
    gui/options.h
    gui/themes/default.inc
    gui/themes/residualvm.zip
    gui/themes/residualvm/THEMERC
    gui/themes/residualvm/residualvm_layout.stx
    gui/themes/residualvm/residualvm_layout_lowres.stx
    gui/themes/scummclassic.zip
    gui/themes/scummclassic/THEMERC
    gui/themes/scummclassic/classic_layout.stx
    gui/themes/scummclassic/classic_layout_lowres.stx
    gui/themes/scummmodern.zip
    gui/themes/scummmodern/THEMERC
    gui/themes/scummmodern/scummmodern_layout.stx
    gui/themes/scummmodern/scummmodern_layout_lowres.stx
    gui/themes/scummremastered.zip
    gui/themes/scummremastered/THEMERC
    gui/themes/scummremastered/remastered_layout.stx
    gui/themes/scummremastered/remastered_layout_lowres.stx


diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index 0fdd924bc7..9fbaf0b9d9 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -37,7 +37,7 @@
 #include "graphics/pixelformat.h"
 
 
-#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.50"
+#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.51"
 
 class OSystem;
 
diff --git a/gui/options.cpp b/gui/options.cpp
index 5a880d24bb..443ddb3961 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1921,6 +1921,9 @@ GlobalOptionsDialog::GlobalOptionsDialog(LauncherDialog *launcher)
 	_ttsCheckbox = nullptr;
 	_ttsVoiceSelectionPopUp = nullptr;
 #endif
+#ifdef USE_DISCORD
+	_discordRpcCheckbox = nullptr;
+#endif
 }
 
 GlobalOptionsDialog::~GlobalOptionsDialog() {
@@ -2287,6 +2290,15 @@ void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String
 
 	_guiConfirmExit->setState(ConfMan.getBool("confirm_exit", _domain));
 
+#ifdef USE_DISCORD
+	_discordRpcCheckbox = new CheckboxWidget(boss, prefix + "DiscordRpc",
+		_("Enable Discord integration"),
+		_("Show information about the games you are playing on Discord if the Discord client is running.")
+	);
+
+	_discordRpcCheckbox->setState(ConfMan.getBool("discord_rpc", _domain));
+#endif
+
 	// TODO: joystick setting
 
 #ifdef USE_TRANSLATION
@@ -2692,6 +2704,11 @@ void GlobalOptionsDialog::apply() {
 	if (_guiConfirmExit) {
 		ConfMan.setBool("confirm_exit", _guiConfirmExit->getState(), _domain);
 	}
+#ifdef USE_DISCORD
+	if (_discordRpcCheckbox) {
+		ConfMan.setBool("discord_rpc", _discordRpcCheckbox->getState(), _domain);
+	}
+#endif // USE_DISCORD
 
 	GUI::ThemeEngine::GraphicsMode gfxMode = (GUI::ThemeEngine::GraphicsMode)_rendererPopUp->getSelectedTag();
 	Common::String oldGfxConfig = ConfMan.get("gui_renderer");
diff --git a/gui/options.h b/gui/options.h
index 959300fc24..7a189a42d6 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -394,6 +394,10 @@ protected:
 
 	void addAccessibilityControls(GuiObject *boss, const Common::String &prefix);
 #endif
+#ifdef USE_DISCORD
+	bool _enableDiscordRpc;
+	CheckboxWidget *_discordRpcCheckbox;
+#endif
 };
 
 } // End of namespace GUI
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index 99d6edbb0e..bcdc87acd2 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -2040,6 +2040,11 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "type='Checkbox' "
 "/>"
 "</layout>"
+"<layout type='horizontal' padding='0,0,0,0' spacing='6' align='center'>"
+"<widget name='DiscordRpc' "
+"type='Checkbox' "
+"/>"
+"</layout>"
 "<layout type='horizontal' padding='0,0,0,0' spacing='10' align='center'>"
 "<widget name='UpdatesPopupDesc' "
 "type='OptionsLabel' "
@@ -3897,6 +3902,11 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
 "/>"
 "</layout>"
 "<layout type='horizontal' padding='0,0,0,0' spacing='6' align='center'>"
+"<widget name='DiscordRpc' "
+"type='Checkbox' "
+"/>"
+"</layout>"
+"<layout type='horizontal' padding='0,0,0,0' spacing='6' align='center'>"
 "<widget name='UpdatesPopupDesc' "
 "width='80' "
 "height='Globals.Line.Height' "
diff --git a/gui/themes/residualvm.zip b/gui/themes/residualvm.zip
index 565be7cde8..7e85e600a2 100644
Binary files a/gui/themes/residualvm.zip and b/gui/themes/residualvm.zip differ
diff --git a/gui/themes/residualvm/THEMERC b/gui/themes/residualvm/THEMERC
index 4d0202c9ff..cca6ebb7c5 100644
--- a/gui/themes/residualvm/THEMERC
+++ b/gui/themes/residualvm/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.50:ResidualVM Modern Theme:No Author]
+[SCUMMVM_STX0.8.51:ResidualVM Modern Theme:No Author]
diff --git a/gui/themes/residualvm/residualvm_layout.stx b/gui/themes/residualvm/residualvm_layout.stx
index 4a2288b6a6..94ee322bd7 100644
--- a/gui/themes/residualvm/residualvm_layout.stx
+++ b/gui/themes/residualvm/residualvm_layout.stx
@@ -692,6 +692,11 @@
 						type = 'Checkbox'
 				/>
 			</layout>
+			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
+				<widget name = 'DiscordRpc'
+						type = 'Checkbox'
+				/>
+			</layout>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
 				<widget name = 'UpdatesPopupDesc'
 						type = 'OptionsLabel'
diff --git a/gui/themes/residualvm/residualvm_layout_lowres.stx b/gui/themes/residualvm/residualvm_layout_lowres.stx
index a58ab4ebef..ef78612fe8 100644
--- a/gui/themes/residualvm/residualvm_layout_lowres.stx
+++ b/gui/themes/residualvm/residualvm_layout_lowres.stx
@@ -681,6 +681,11 @@
 						type = 'Checkbox'
 				/>
 			</layout>
+			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
+				<widget name = 'DiscordRpc'
+						type = 'Checkbox'
+				/>
+			</layout>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
 				<widget name = 'UpdatesPopupDesc'
 						width = '80'
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index a4a0470921..2ae630369e 100644
Binary files a/gui/themes/scummclassic.zip and b/gui/themes/scummclassic.zip differ
diff --git a/gui/themes/scummclassic/THEMERC b/gui/themes/scummclassic/THEMERC
index e1137567b8..430b9409b5 100644
--- a/gui/themes/scummclassic/THEMERC
+++ b/gui/themes/scummclassic/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.50:ScummVM Classic Theme:No Author]
+[SCUMMVM_STX0.8.51:ScummVM Classic Theme:No Author]
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index 3582bb12b2..9b78662974 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -678,6 +678,11 @@
 						type = 'Checkbox'
 				/>
 			</layout>
+			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
+				<widget name = 'DiscordRpc'
+						type = 'Checkbox'
+				/>
+			</layout>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
 				<widget name = 'UpdatesPopupDesc'
 						type = 'OptionsLabel'
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index 386d69ec1d..6c242a7d0d 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -681,6 +681,11 @@
 						type = 'Checkbox'
 				/>
 			</layout>
+			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
+				<widget name = 'DiscordRpc'
+						type = 'Checkbox'
+				/>
+			</layout>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
 				<widget name = 'UpdatesPopupDesc'
 						width = '80'
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index 36e592cc74..aee1f6740f 100644
Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ
diff --git a/gui/themes/scummmodern/THEMERC b/gui/themes/scummmodern/THEMERC
index 5978253628..2d9d6065fc 100644
--- a/gui/themes/scummmodern/THEMERC
+++ b/gui/themes/scummmodern/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.50:ScummVM Modern Theme:No Author]
+[SCUMMVM_STX0.8.51:ScummVM Modern Theme:No Author]
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index 4a2288b6a6..94ee322bd7 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -692,6 +692,11 @@
 						type = 'Checkbox'
 				/>
 			</layout>
+			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
+				<widget name = 'DiscordRpc'
+						type = 'Checkbox'
+				/>
+			</layout>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
 				<widget name = 'UpdatesPopupDesc'
 						type = 'OptionsLabel'
diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
index a58ab4ebef..ef78612fe8 100644
--- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx
+++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
@@ -681,6 +681,11 @@
 						type = 'Checkbox'
 				/>
 			</layout>
+			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
+				<widget name = 'DiscordRpc'
+						type = 'Checkbox'
+				/>
+			</layout>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
 				<widget name = 'UpdatesPopupDesc'
 						width = '80'
diff --git a/gui/themes/scummremastered.zip b/gui/themes/scummremastered.zip
index f1a4fdccd7..582c6c6f78 100644
Binary files a/gui/themes/scummremastered.zip and b/gui/themes/scummremastered.zip differ
diff --git a/gui/themes/scummremastered/THEMERC b/gui/themes/scummremastered/THEMERC
index f6ffc10c71..8b77c065e7 100644
--- a/gui/themes/scummremastered/THEMERC
+++ b/gui/themes/scummremastered/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.50:ScummVM Modern Theme Remastered:No Author]
+[SCUMMVM_STX0.8.51:ScummVM Modern Theme Remastered:No Author]
diff --git a/gui/themes/scummremastered/remastered_layout.stx b/gui/themes/scummremastered/remastered_layout.stx
index 66f6719dff..baedc99e6e 100644
--- a/gui/themes/scummremastered/remastered_layout.stx
+++ b/gui/themes/scummremastered/remastered_layout.stx
@@ -694,6 +694,11 @@
 						type = 'Checkbox'
 				/>
 			</layout>
+			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
+				<widget name = 'DiscordRpc'
+						type = 'Checkbox'
+				/>
+			</layout>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
 				<widget name = 'UpdatesPopupDesc'
 						type = 'OptionsLabel'
diff --git a/gui/themes/scummremastered/remastered_layout_lowres.stx b/gui/themes/scummremastered/remastered_layout_lowres.stx
index c0e891b880..cdd1300d46 100644
--- a/gui/themes/scummremastered/remastered_layout_lowres.stx
+++ b/gui/themes/scummremastered/remastered_layout_lowres.stx
@@ -683,6 +683,11 @@
 						type = 'Checkbox'
 				/>
 			</layout>
+			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
+				<widget name = 'DiscordRpc'
+						type = 'Checkbox'
+				/>
+			</layout>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' align = 'center'>
 				<widget name = 'UpdatesPopupDesc'
 						width = '80'


Commit: fa3df6582241f5a68b5366b758db0eeefe88c005
    https://github.com/scummvm/scummvm/commit/fa3df6582241f5a68b5366b758db0eeefe88c005
Author: Lothar Serra Mari (mail at serra.me)
Date: 2021-09-11T18:50:29+02:00

Commit Message:
NEWS: Mention Discord RPC GUI option

Changed paths:
    NEWS.md
    doc/de/NEUES.md


diff --git a/NEWS.md b/NEWS.md
index f407a601b1..96d8c70246 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -42,6 +42,7 @@ For a more comprehensive changelog of the latest experimental code, see:
    - Fixed switching to the default graphics mode. This was sometimes not applied
      until restarting ScummVM or starting a game.
    - ScummVM GUI has been fully translated into Korean and Japanese.
+   - Added GUI option for enabling and disabling the Discord RPC integration.
 
  ADL:
    - Added support for Mystery House French translation.
diff --git a/doc/de/NEUES.md b/doc/de/NEUES.md
index 25d9348321..585bb303b5 100644
--- a/doc/de/NEUES.md
+++ b/doc/de/NEUES.md
@@ -44,6 +44,7 @@ Programmcodes finden Sie auf Englisch unter:
      Fällen wurde die Änderung erst nach einem Neustart von ScummVM
      oder beim Start eines Spiels übernommen.
    - Die ScummVM-Benutzeroberfläche ist jetzt vollst#ndig auf koreanisch und japanisch verfügbar.
+   - Option zur ScummVM-Benutzeroberfläche hinzugefügt, mit der die Discord RPC-Integration aktiviert und deaktiviert werden kann.
 
  ADL:
    - Unterstützung für die französische Übersetzung  von Mystery House hinzugefügt.




More information about the Scummvm-git-logs mailing list