diff --git a/bsnes/snes/alt/ppu-compatibility/ppu.hpp b/bsnes/snes/alt/ppu-compatibility/ppu.hpp index f31a359c..2d4ccb53 100644 --- a/bsnes/snes/alt/ppu-compatibility/ppu.hpp +++ b/bsnes/snes/alt/ppu-compatibility/ppu.hpp @@ -66,6 +66,7 @@ class PPU : public Processor, public PPUcounter, public MMIO { void layer_enable(unsigned layer, unsigned priority, bool enable); unsigned frameskip; unsigned framecounter; + bool frame_skipped() const { return framecounter > 0; } unsigned get_frameskip() const { return frameskip; } void set_frameskip(unsigned frameskip); diff --git a/bsnes/snes/alt/ppu-performance/ppu.hpp b/bsnes/snes/alt/ppu-performance/ppu.hpp index 789904e1..06a004b9 100644 --- a/bsnes/snes/alt/ppu-performance/ppu.hpp +++ b/bsnes/snes/alt/ppu-performance/ppu.hpp @@ -19,6 +19,7 @@ class PPU : public Processor, public PPUcounter, public MMIO { void frame(); void layer_enable(unsigned layer, unsigned priority, bool enable); + bool frame_skipped() const { return display.framecounter > 0; } unsigned get_frameskip() const { return display.frameskip; } void set_frameskip(unsigned frameskip); diff --git a/bsnes/snes/ppu/ppu.hpp b/bsnes/snes/ppu/ppu.hpp index 4080119a..4631c86f 100644 --- a/bsnes/snes/ppu/ppu.hpp +++ b/bsnes/snes/ppu/ppu.hpp @@ -17,6 +17,7 @@ class PPU : public Processor, public PPUcounter, public MMIO { void reset(); void layer_enable(unsigned, unsigned, bool) {} + bool frame_skipped() const { return false; } unsigned get_frameskip() const { return 0; } void set_frameskip(unsigned) {} diff --git a/bsnes/snes/video/video.cpp b/bsnes/snes/video/video.cpp index 347fde65..ae4cff1a 100644 --- a/bsnes/snes/video/video.cpp +++ b/bsnes/snes/video/video.cpp @@ -60,12 +60,14 @@ void Video::update() { if(frame_hires) { width <<= 1; - //normalize line widths - for(unsigned y = 0; y < 240; y++) { - if(line_width[y] == 512) continue; - uint16_t *buffer = data + y * 1024; - for(signed x = 255; x >= 0; x--) { - buffer[(x * 2) + 0] = buffer[(x * 2) + 1] = buffer[x]; + if(!ppu.frame_skipped()) { + //normalize line widths + for(unsigned y = 0; y < 240; y++) { + if(line_width[y] == 512) continue; + uint16_t *buffer = data + y * 1024; + for(signed x = 255; x >= 0; x--) { + buffer[(x * 2) + 0] = buffer[(x * 2) + 1] = buffer[x]; + } } } } diff --git a/bsnes/ui-qt/input/userinterface-emulationspeed.cpp b/bsnes/ui-qt/input/userinterface-emulationspeed.cpp index 6714e507..095d8853 100644 --- a/bsnes/ui-qt/input/userinterface-emulationspeed.cpp +++ b/bsnes/ui-qt/input/userinterface-emulationspeed.cpp @@ -56,7 +56,7 @@ struct Speedup : HotkeyInput { void pressed() { if(SNES::PPU::SupportsFrameSkip) { - frameskip = SNES::ppu.get_frameskip(); + frameskip = SNES::ppu.get_frameskip(); SNES::ppu.set_frameskip(9); }