summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfearlessTobi <thm.frey@gmail.com>2018-09-09 00:57:41 +0200
committerfearlessTobi <thm.frey@gmail.com>2018-09-09 00:57:41 +0200
commit500e81429a883a4721e19158f0c4059fd5e216f6 (patch)
tree3acef7c3cdea8a5d1318a26aba58c378a3a1a635
parentMerge pull request #1256 from bunnei/tex-target-support (diff)
downloadyuzu-500e81429a883a4721e19158f0c4059fd5e216f6.tar
yuzu-500e81429a883a4721e19158f0c4059fd5e216f6.tar.gz
yuzu-500e81429a883a4721e19158f0c4059fd5e216f6.tar.bz2
yuzu-500e81429a883a4721e19158f0c4059fd5e216f6.tar.lz
yuzu-500e81429a883a4721e19158f0c4059fd5e216f6.tar.xz
yuzu-500e81429a883a4721e19158f0c4059fd5e216f6.tar.zst
yuzu-500e81429a883a4721e19158f0c4059fd5e216f6.zip
-rw-r--r--src/core/hle/service/hid/hid.cpp8
-rw-r--r--src/core/settings.h2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index 0d31abe8b..a8e0c869f 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -2,7 +2,6 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
-#include <atomic>
#include "common/logging/log.h"
#include "core/core.h"
#include "core/core_timing.h"
@@ -78,7 +77,7 @@ private:
SharedMemory mem{};
std::memcpy(&mem, shared_mem->GetPointer(), sizeof(SharedMemory));
- if (is_device_reload_pending.exchange(false))
+ if (Settings::values.is_device_reload_pending.exchange(false))
LoadInputDevices();
// Set up controllers as neon red+blue Joy-Con attached to console
@@ -267,7 +266,6 @@ private:
CoreTiming::EventType* pad_update_event;
// Stored input state info
- std::atomic<bool> is_device_reload_pending{true};
std::array<std::unique_ptr<Input::ButtonDevice>, Settings::NativeButton::NUM_BUTTONS_HID>
buttons;
std::array<std::unique_ptr<Input::AnalogDevice>, Settings::NativeAnalog::NUM_STICKS_HID> sticks;
@@ -797,7 +795,9 @@ public:
}
};
-void ReloadInputDevices() {}
+void ReloadInputDevices() {
+ Settings::values.is_device_reload_pending.store(true);
+}
void InstallInterfaces(SM::ServiceManager& service_manager) {
std::make_shared<Hid>()->InstallAsService(service_manager);
diff --git a/src/core/settings.h b/src/core/settings.h
index 5bf1863e6..08a16ef2c 100644
--- a/src/core/settings.h
+++ b/src/core/settings.h
@@ -5,6 +5,7 @@
#pragma once
#include <array>
+#include <atomic>
#include <string>
#include "common/common_types.h"
@@ -120,6 +121,7 @@ struct Values {
std::array<std::string, NativeAnalog::NumAnalogs> analogs;
std::string motion_device;
std::string touch_device;
+ std::atomic_bool is_device_reload_pending{true};
// Core
bool use_cpu_jit;