mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
CPUThreadConfigCallback: Remove some CPU thread asserts
Turns out that we have two subsystems that want to register CPU thread callbacks from a different thread than the CPU thread: FreeLookConfig and VideoConfig. Both seem to happen from the host thread before the CPU thread starts, so there's no thread safety issue. But ideally, if we want to allow registering callbacks from threads other than the CPU thread, we should make registering callbacks actually thread-safe. This is an unsolved problem for the regular Config system, so I would like to leave it outside the scope of this PR.
This commit is contained in:
parent
7197e3abd0
commit
b62c25864f
@ -44,8 +44,6 @@ namespace CPUThreadConfigCallback
|
||||
{
|
||||
ConfigChangedCallbackID AddConfigChangedCallback(Config::ConfigChangedCallback func)
|
||||
{
|
||||
DEBUG_ASSERT(Core::IsCPUThread());
|
||||
|
||||
static auto s_config_changed_callback_id = Config::AddConfigChangedCallback(&OnConfigChanged);
|
||||
|
||||
const ConfigChangedCallbackID callback_id{s_next_callback_id};
|
||||
@ -56,8 +54,6 @@ ConfigChangedCallbackID AddConfigChangedCallback(Config::ConfigChangedCallback f
|
||||
|
||||
void RemoveConfigChangedCallback(ConfigChangedCallbackID callback_id)
|
||||
{
|
||||
DEBUG_ASSERT(Core::IsCPUThread());
|
||||
|
||||
for (auto it = s_callbacks.begin(); it != s_callbacks.end(); ++it)
|
||||
{
|
||||
if (it->first == callback_id)
|
||||
|
Loading…
Reference in New Issue
Block a user