mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 12:30:12 +02:00
Completely run effEditIdle from a timer
Although it hasn't shown up, this will get rid of the possibility of off-thread effEditIdle calls causing issues. And since we need some way to run call this function while the event loop is running anyways, doing it entirely from a timer similar to how hosts on Windows would do it seems like the best solution.
This commit is contained in:
@@ -50,6 +50,8 @@ Win32Thread::~Win32Thread() {
|
||||
|
||||
Win32Thread::Win32Thread() : handle(nullptr, nullptr) {}
|
||||
|
||||
Win32Timer::Win32Timer() {}
|
||||
|
||||
Win32Timer::Win32Timer(HWND window_handle,
|
||||
size_t timer_id,
|
||||
unsigned int interval_ms)
|
||||
@@ -63,13 +65,12 @@ Win32Timer::~Win32Timer() {
|
||||
}
|
||||
}
|
||||
|
||||
Win32Timer::Win32Timer(Win32Timer&& o) : timer_id(o.timer_id) {
|
||||
o.timer_id = std::nullopt;
|
||||
}
|
||||
Win32Timer::Win32Timer(Win32Timer&& o)
|
||||
: window_handle(o.window_handle), timer_id(std::move(o.timer_id)) {}
|
||||
|
||||
Win32Timer& Win32Timer::operator=(Win32Timer&& o) {
|
||||
timer_id = o.timer_id;
|
||||
o.timer_id = std::nullopt;
|
||||
window_handle = o.window_handle;
|
||||
timer_id = std::move(o.timer_id);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user