Skip to content

Commit

Permalink
PFBA: Fix some remaining flickering borders
Browse files Browse the repository at this point in the history
  • Loading branch information
rsn8887 committed Aug 8, 2017
1 parent 54c072f commit d6b40f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pfba/gui/gui.cpp
Expand Up @@ -673,10 +673,6 @@ void Gui::Run() {
} else if (key & Input::Key::KEY_FIRE1) {
if (romSelected != NULL
&& romSelected->state != RomList::RomState::MISSING) {
for (int i = 0; i < 6; i++) {
Clear();
Flip();
}
RunRom(romSelected);
}
} else if (key & Input::Key::KEY_MENU1) {
Expand Down
10 changes: 10 additions & 0 deletions pfba/run.cpp
Expand Up @@ -330,6 +330,16 @@ void RunEmulator(Gui *g, int drvnum) {
StartTicks(); // no frameskip

GameLooping = true;

// prevent flickering borders by rendering a few frames and
// blanking the display afterwards
for (int i = 0; i < 9; i++)
RunOneFrame(true, 0, 0);
for (int i = 0; i < 3; i++) {
video->Clear();
video->Flip();
}

while (GameLooping) {

int showFps = gui->GetConfig()->GetRomValue(Option::Index::ROM_SHOW_FPS);
Expand Down

0 comments on commit d6b40f8

Please sign in to comment.