diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2023-05-19 19:31:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-19 19:31:40 +0200 |
| commit | 50fe493990edfaefd7ee7372ed9d9fa954c0f2ab (patch) | |
| tree | eb683650e058db6c7e5560c7788048d55804f26e /Source/Core/InputCommon/ControllerInterface/OSX/RunLoopStopper.h | |
| parent | 279fcafdc32354063ecc9ec3ad0512f6eb6b75fc (diff) | |
| parent | 72d08f6c8022dd1181270029980e64d9b70e9ce3 (diff) | |
Merge pull request #11739 from OatmealDome/iokit-be-gone
InputCommon: Remove OSX (IOKit) input backend
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/OSX/RunLoopStopper.h')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/OSX/RunLoopStopper.h | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/OSX/RunLoopStopper.h b/Source/Core/InputCommon/ControllerInterface/OSX/RunLoopStopper.h deleted file mode 100644 index a749e9f85b..0000000000 --- a/Source/Core/InputCommon/ControllerInterface/OSX/RunLoopStopper.h +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2016 Dolphin Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include <Foundation/Foundation.h> - -namespace ciface::OSX -{ -class RunLoopStopper -{ - CFRunLoopSourceRef m_source; - CFRunLoopRef m_runloop = nullptr; - -public: - RunLoopStopper() - { - CFRunLoopSourceContext ctx = {.version = 0, - .perform = [](void*) { CFRunLoopStop(CFRunLoopGetCurrent()); }}; - m_source = CFRunLoopSourceCreate(kCFAllocatorDefault, 0, &ctx); - } - ~RunLoopStopper() { CFRelease(m_source); } - void Signal() - { - CFRunLoopSourceSignal(m_source); - if (m_runloop != nullptr) - CFRunLoopWakeUp(m_runloop); - } - void AddToRunLoop(CFRunLoopRef runloop, CFStringRef mode) - { - m_runloop = runloop; - CFRunLoopAddSource(runloop, m_source, mode); - } - void RemoveFromRunLoop(CFRunLoopRef runloop, CFStringRef mode) - { - m_runloop = nullptr; - CFRunLoopRemoveSource(runloop, m_source, mode); - } -}; -} // namespace ciface::OSX |
