yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
controller_screenshot.cc
Go to the documentation of this file.
1#include "app/controller.h"
2
3#include <mutex>
4
6
7namespace yaze {
8
10 {
11 std::lock_guard<std::mutex> lock(screenshot_mutex_);
12 screenshot_requests_.push(request);
13 }
14 // Reuse the queue's guarded waker so an idle loop captures promptly without
15 // calling a window backend that another thread could be shutting down.
17}
18
19} // namespace yaze
std::queue< ScreenshotRequest > screenshot_requests_
Definition controller.h:124
void RequestScreenshot(const ScreenshotRequest &request)
std::mutex screenshot_mutex_
Definition controller.h:123
bool Post(std::function< void()> task)
static UiThreadQueue & Get()