Compare commits

...

8 Commits

Author SHA1 Message Date
Filippo Tarpini
baa2a43b5e
Merge a2e43f1e9c into 0fdf1cc386 2025-11-15 19:59:47 +02:00
JosJuice
0fdf1cc386
Merge pull request #14112 from Simonx22/android/remove-unused-bimap-class
Android: Remove unused BiMap class
2025-11-15 16:22:17 +01:00
JosJuice
999e13b3b3
Merge pull request #14109 from OatmealDome/analytics-deadlock
DolphinAnalytics: Only call ReloadConfig in config changed callback when analytics enabled value changes
2025-11-15 14:44:54 +01:00
JosJuice
f823a06814
Merge pull request #14105 from cscd98/achievement-bugfix
Fix cheats always enabled without USE_RETRO_ACHIEVEMENTS
2025-11-15 14:44:16 +01:00
Simonx22
d1526157df Android: Remove unused BiMap class 2025-11-12 17:26:05 -05:00
Craig Carnell
f1fb550bf1 Fix cheats always enabled without USE_RETRO_ACHIEVEMENTS 2025-11-12 08:33:49 +00:00
OatmealDome
df5f351add
DolphinAnalytics: Only call ReloadConfig in config changed callback when analytics enabled value changes
Co-authored-by: Simonx22 <simon@oatmealdome.me>
2025-11-12 00:09:41 -05:00
Filoppi
a2e43f1e9c Audio: Deprecate OpenAL
This will also revert the setting of anyone that currently has OpenAL selected to the default, which is Cubeb.
OpenAL is only on Windows now, and it's the worst backend there by far, it crackles at latencies that Cubeb supports fine, it has no additional features to Cubeb.

There seems to be no reason to allow users to even select, and in the dev irc channel, no one was aware of any case where OpenAL might work better than Cubeb.
The plan is to see if users complain about this, and if not, just delete it from Dolphin.
2023-12-18 21:50:42 +02:00
5 changed files with 17 additions and 44 deletions

View File

@ -1,29 +0,0 @@
// SPDX-License-Identifier: GPL-2.0-or-later
package org.dolphinemu.dolphinemu.utils;
import java.util.HashMap;
import java.util.Map;
public class BiMap<K, V>
{
private Map<K, V> forward = new HashMap<>();
private Map<V, K> backward = new HashMap<>();
public synchronized void add(K key, V value)
{
forward.put(key, value);
backward.put(value, key);
}
public synchronized V getForward(K key)
{
return forward.get(key);
}
public synchronized K getBackward(V key)
{
return backward.get(key);
}
}

View File

@ -309,22 +309,14 @@ private:
#include <string>
#include "Common/CommonTypes.h"
namespace ActionReplay
{
struct ARCode;
}
#include "Core/ActionReplay.h"
#include "Core/GeckoCode.h"
namespace DiscIO
{
class Volume;
}
namespace Gecko
{
class GeckoCode;
}
class AchievementManager
{
public:
@ -339,13 +331,13 @@ public:
constexpr bool ShouldGeckoCodeBeActivated(const Gecko::GeckoCode& code,
const std::string& game_id, u16 revision)
{
return true;
return code.enabled;
}
constexpr bool ShouldARCodeBeActivated(const ActionReplay::ARCode& code,
const std::string& game_id, u16 revision)
{
return true;
return code.enabled;
}
constexpr void LoadGame(const DiscIO::Volume*) {}

View File

@ -18,7 +18,7 @@
#define BACKEND_NULLSOUND _trans("No Audio Output")
#define BACKEND_ALSA "ALSA"
#define BACKEND_CUBEB "Cubeb"
#define BACKEND_OPENAL "OpenAL"
#define BACKEND_OPENAL _trans("OpenAL (Deprecated)")
#define BACKEND_PULSEAUDIO "Pulse"
#define BACKEND_OPENSLES "OpenSLES"
#define BACKEND_WASAPI _trans("WASAPI (Exclusive Mode)")

View File

@ -57,10 +57,19 @@ void DolphinAnalytics::AndroidSetGetValFunc(std::function<std::string(std::strin
DolphinAnalytics::DolphinAnalytics()
{
m_last_analytics_enabled = Config::Get(Config::MAIN_ANALYTICS_ENABLED);
ReloadConfig();
MakeBaseBuilder();
m_config_changed_callback_id = Config::AddConfigChangedCallback([this] { ReloadConfig(); });
m_config_changed_callback_id = Config::AddConfigChangedCallback([this] {
bool current_analytics_enabled = Config::Get(Config::MAIN_ANALYTICS_ENABLED);
if (m_last_analytics_enabled != current_analytics_enabled)
{
m_last_analytics_enabled = current_analytics_enabled;
ReloadConfig();
}
});
}
DolphinAnalytics::~DolphinAnalytics()
@ -80,7 +89,7 @@ void DolphinAnalytics::ReloadConfig()
// Install the HTTP backend if analytics support is enabled.
std::unique_ptr<Common::AnalyticsReportingBackend> new_backend;
if (Config::Get(Config::MAIN_ANALYTICS_ENABLED))
if (m_last_analytics_enabled)
{
new_backend = std::make_unique<Common::HttpAnalyticsBackend>(ANALYTICS_ENDPOINT);
}

View File

@ -203,4 +203,5 @@ private:
std::mutex m_reporter_mutex;
Common::AnalyticsReporter m_reporter;
Config::ConfigChangedCallbackID m_config_changed_callback_id{};
bool m_last_analytics_enabled = false;
};