mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-24 18:28:02 +00:00
NVFlinger: Lock race condition between CPU, Host Timing, VSync.
This commit is contained in:
parent
9140f5d1f3
commit
2c0431e5ed
3 changed files with 11 additions and 0 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
|
@ -79,6 +80,10 @@ public:
|
|||
|
||||
s64 GetNextTicks() const;
|
||||
|
||||
std::unique_lock<std::mutex> Lock() {
|
||||
return std::unique_lock{*guard};
|
||||
}
|
||||
|
||||
private:
|
||||
/// Finds the display identified by the specified ID.
|
||||
VI::Display* FindDisplay(u64 display_id);
|
||||
|
|
@ -108,6 +113,8 @@ private:
|
|||
/// Event that handles screen composition.
|
||||
std::shared_ptr<Core::Timing::EventType> composition_event;
|
||||
|
||||
std::shared_ptr<std::mutex> guard;
|
||||
|
||||
Core::System& system;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue