Skip to content

Commit

Permalink
Always make sure that a frame is output every retro_run().
Browse files Browse the repository at this point in the history
  • Loading branch information
Themaister committed Sep 13, 2012
1 parent a28009a commit 796ba04
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libretro/libretro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ static const unsigned binds[] = {
RETRO_DEVICE_ID_JOYPAD_L
};

static unsigned has_frame;

void retro_run(void)
{
poll_cb();
Expand All @@ -377,7 +379,8 @@ void retro_run(void)

joy = J;

CPULoop();
has_frame = 0;
do { CPULoop(); } while (!has_frame);
}

size_t retro_serialize_size(void)
Expand Down Expand Up @@ -444,6 +447,7 @@ void systemDrawScreen()
{
video_cb(pix, 240, 160, 512); //last arg is pitch
g_video_frames++;
has_frame = 1;
}

void systemMessage(const char* str, ...)
Expand Down

0 comments on commit 796ba04

Please sign in to comment.