mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-16 07:50:28 +02:00
A null check and a locking simplification
This commit is contained in:
1 parent
0576cafdeb
commit
fae1f4acd3
2 files changed
+16
-14
No files matched your search
+5
-5
@@ -243,12 +243,12 @@ void DisplayFireVblankStart() {
|
||||
}
|
||||
|
||||
void DisplayFireVblankEnd() {
|
||||
std::vector<VblankCallback> toCall = [] {
|
||||
std::lock_guard<std::mutex> guard(listenersLock);
|
||||
return vblankListeners;
|
||||
}();
|
||||
|
||||
isVblank = 0;
|
||||
std::vector<VblankCallback> toCall;
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(listenersLock);
|
||||
toCall = vblankListeners;
|
||||
}
|
||||
|
||||
for (VblankCallback cb : toCall) {
|
||||
cb();
|
||||
|
||||
Reference in new issue
Block a user