From 51a4647d4e6e17342e320b470556cfc724e6bc90 Mon Sep 17 00:00:00 2001 From: Zihao Yu Date: Wed, 5 Feb 2020 01:34:15 +0800 Subject: [PATCH] apps,fceux,x6502: skip spin --- apps/fceux/src/x6502.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/fceux/src/x6502.cpp b/apps/fceux/src/x6502.cpp index 5e3201b7..2fd38d8a 100644 --- a/apps/fceux/src/x6502.cpp +++ b/apps/fceux/src/x6502.cpp @@ -484,11 +484,16 @@ extern int test; test++; _tcount=0; if(MapIRQHook) MapIRQHook(temp); + uint32 lastPC = _PC; _PC++; switch(b1) { #include "ops.inc" } + if (lastPC == _PC) { + // spinning, just finish the run + _count = 0; + } } }