summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video/snes_ppu.cpp
diff options
context:
space:
mode:
author Vas Crabb <cuavas@users.noreply.github.com>2023-03-25 05:53:58 +1100
committer GitHub <noreply@github.com>2023-03-25 05:53:58 +1100
commit5f97af903c8bc7e3d4d031c9794cd620d3b2af98 (patch)
tree0052d342c46aee33333b25f3da53c9683c92b8b7 /src/devices/video/snes_ppu.cpp
parentfbb67a2764e26c03821e66f896b5417a2bfe682e (diff)
-Lua engine: run everything in coroutines. (#11019)
* This lets you use emu.wait(...) directly without mucking around creating coroutines. * Allow emu.wait to accept an attotime argument. * Added a couple more wait helper functions. -emu/profiler.h: Actually use scope-based profiling helpers. * This makes the comment at the top of emu/profile.h less dishonest, and makes it easier to write exception-safe code. * Got rid of some do { ... } while (0) loops that only existed so break could be used like a goto.
Diffstat (limited to 'src/devices/video/snes_ppu.cpp')
-rw-r--r--src/devices/video/snes_ppu.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/devices/video/snes_ppu.cpp b/src/devices/video/snes_ppu.cpp
index a05ae16ea38..3bf448dc4c2 100644
--- a/src/devices/video/snes_ppu.cpp
+++ b/src/devices/video/snes_ppu.cpp
@@ -1254,7 +1254,7 @@ void snes_ppu_device::refresh_scanline( bitmap_rgb32 &bitmap, uint16_t curline )
{
bool blurring = m_options.read_safe(0) & 0x01;
- g_profiler.start(PROFILER_VIDEO);
+ auto profile = g_profiler.start(PROFILER_VIDEO);
cache_background();
@@ -1282,10 +1282,7 @@ void snes_ppu_device::refresh_scanline( bitmap_rgb32 &bitmap, uint16_t curline )
struct SNES_SCANLINE *below = &m_scanlines[SNES_SUBSCREEN];
#if SNES_LAYER_DEBUG
if (dbg_video(curline))
- {
- g_profiler.stop();
return;
- }
/* Toggle drawing of SNES_SUBSCREEN or SNES_MAINSCREEN */
if (m_debug_options.draw_subscreen)
@@ -1357,8 +1354,6 @@ void snes_ppu_device::refresh_scanline( bitmap_rgb32 &bitmap, uint16_t curline )
}
}
}
-
- g_profiler.stop();
}
uint16_t snes_ppu_device::pixel(uint16_t x, SNES_SCANLINE *above, SNES_SCANLINE *below, uint8_t *window_above, uint8_t *window_below)