From 0043bd3547c9fc53d13fac7378afd35f53d01ecf Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Mon, 5 Dec 2016 00:45:31 +0000 Subject: [PATCH 1/3] Remove two unused variables --- Source/Core/DolphinWX/ISOProperties/ISOProperties.cpp | 1 - Source/Core/VideoBackends/Vulkan/FramebufferManager.h | 1 - 2 files changed, 2 deletions(-) diff --git a/Source/Core/DolphinWX/ISOProperties/ISOProperties.cpp b/Source/Core/DolphinWX/ISOProperties/ISOProperties.cpp index 0b8c00e1b6..2c6bbc4803 100644 --- a/Source/Core/DolphinWX/ISOProperties/ISOProperties.cpp +++ b/Source/Core/DolphinWX/ISOProperties/ISOProperties.cpp @@ -349,7 +349,6 @@ long CISOProperties::GetElementStyle(const char* section, const char* key) void CISOProperties::CreateGUIControls() { const int space5 = FromDIP(5); - const int space10 = FromDIP(10); wxButton* const EditConfig = new wxButton(this, ID_EDITCONFIG, _("Edit Config")); EditConfig->SetToolTip(_("This will let you manually edit the INI config file.")); diff --git a/Source/Core/VideoBackends/Vulkan/FramebufferManager.h b/Source/Core/VideoBackends/Vulkan/FramebufferManager.h index 92a689fb41..ccb17b0185 100644 --- a/Source/Core/VideoBackends/Vulkan/FramebufferManager.h +++ b/Source/Core/VideoBackends/Vulkan/FramebufferManager.h @@ -184,7 +184,6 @@ public: private: std::unique_ptr m_texture; - VkFramebuffer m_framebuffer; }; } // namespace Vulkan From 3c090a37d4f552008bbc287fcd635064e294f553 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Mon, 5 Dec 2016 00:36:09 +0000 Subject: [PATCH 2/3] evdev: fix shutdown hang Note: This probably means our approach of populating from udev isn't safe to be called multiple times. --- Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp index bee0c44a02..788ea963bc 100644 --- a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp +++ b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp @@ -141,7 +141,6 @@ static void StopHotplugThread() void Init() { s_devnode_name_map.clear(); - PopulateDevices(); StartHotplugThread(); } From f575902cf31ead3238d43ac475a5d3a33f83ce1f Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Mon, 5 Dec 2016 00:37:36 +0000 Subject: [PATCH 3/3] evdev: set flag in a thread-safe way --- .../ControllerInterface/evdev/evdev.cpp | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp index 788ea963bc..58f92f29a4 100644 --- a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp +++ b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp @@ -116,26 +116,28 @@ static void HotplugThreadFunc() static void StartHotplugThread() { - if (s_hotplug_thread_running.IsSet()) + // Mark the thread as running. + if (!s_hotplug_thread_running.TestAndSet()) + // It was already running. return; s_wakeup_eventfd = eventfd(0, 0); _assert_msg_(PAD, s_wakeup_eventfd != -1, "Couldn't create eventfd."); - s_hotplug_thread_running.Set(true); s_hotplug_thread = std::thread(HotplugThreadFunc); } static void StopHotplugThread() { - if (s_hotplug_thread_running.TestAndClear()) + // Tell the hotplug thread to stop. + if (!s_hotplug_thread_running.TestAndClear()) + // It wasn't running, we're done. + return; + // Write something to efd so that select() stops blocking. + uint64_t value = 1; + if (write(s_wakeup_eventfd, &value, sizeof(uint64_t)) < 0) { - // Write something to efd so that select() stops blocking. - uint64_t value = 1; - if (write(s_wakeup_eventfd, &value, sizeof(uint64_t)) < 0) - { - } - s_hotplug_thread.join(); } + s_hotplug_thread.join(); } void Init()