commit 01c6020bcfe9090212df5ac229554fea25bdf2bf
Author: Jon Bell <jondbell@protonmail.com>
AuthorDate: Sat Apr 18 17:43:22 2020 -0600
Commit: Jon Bell <jondbell@protonmail.com>
CommitDate: Sat Apr 18 17:43:22 2020 -0600
Flush and swap buffers after pico draw to prevent visual issues
---
source/main.cpp | 12 ++++++------
source/tests/test_base.h | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/source/main.cpp b/source/main.cpp
index c4440fa..e510270 100644
--- a/source/main.cpp
+++ b/source/main.cpp
@@ -84,8 +84,6 @@ int main(int argc, char* argv[])
while (aptMainLoop())
{
- gspWaitForVBlank();
-
//Scan all the inputs. This should be done once for each frame
hidScanInput();
@@ -101,10 +99,6 @@ int main(int argc, char* argv[])
uint8_t p8kDown = ConvertInputToP8(kDown);
uint8_t p8kHeld = ConvertInputToP8(kHeld);
- // Flush and swap framebuffers
- gfxFlushBuffers();
- gfxSwapBuffers();
-
//_update();
uint8_t* fb = gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL);
@@ -123,6 +117,12 @@ int main(int argc, char* argv[])
//send pico 8 screen to framebuffer
console.FlipBuffer(fb);
+ // Flush and swap framebuffers
+ gfxFlushBuffers();
+ gfxSwapBuffers();
+
+ gspWaitForVBlank();
+
frames++;
}
diff --git a/source/tests/test_base.h b/source/tests/test_base.h
index 1471fc3..8b517e2 100644
--- a/source/tests/test_base.h
+++ b/source/tests/test_base.h
@@ -1,7 +1,7 @@
#pragma once
//if this is set to 1, test cases will be run on the test cart
-#define _TEST 1
+#define _TEST 0
//if this flag is set, only failures get printed to console
#define _PRINT_SUCCESS 1