diff --git a/Core/HW/Display.cpp b/Core/HW/Display.cpp index 6f78bebeeb..f21d442d33 100644 --- a/Core/HW/Display.cpp +++ b/Core/HW/Display.cpp @@ -15,6 +15,7 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. +#include #include #include #include @@ -41,7 +42,9 @@ typedef std::pair FlipListener; static std::vector flipListeners; static uint64_t frameStartTicks; -static int numVBlanks; +// Atomic because the WebSocket debugger reads it from its own thread (input.buttons.press uses +// it to count down frames) while the CPU thread bumps it. +static std::atomic numVBlanks; // hCount is computed now. static int vCount; // The "AccumulatedHcount" can be adjusted, this is the base.