#define DEBUG(...)
#endif
-uint8_t busy = 0, rtg_on = 0, rtg_initialized = 0, emulator_exiting = 0;
+uint8_t busy = 0, rtg_on = 0, rtg_initialized = 0, emulator_exiting = 0, rtg_output_in_vblank = 0;
extern uint8_t *rtg_mem;
extern uint32_t framebuffer_addr;
extern uint32_t framebuffer_addr_adj;
raylib_texture = LoadTextureFromImage(raylib_fb);
+ printf("Loaded framebuffer texture.\n");
+
srcrect.x = srcrect.y = 0;
srcrect.width = width;
srcrect.height = height;
} else if (GetScreenHeight() == 1080) {
dstscale.width = 1440;
dstscale.height = 1080;
+ } else if (GetScreenHeight() == 1200) {
+ dstscale.width = 1600;
+ dstscale.height = 1200;
}
} else {
while (dstscale.height + height <= GetScreenHeight()) {
while (1) {
if (rtg_on) {
BeginDrawing();
+ rtg_output_in_vblank = 0;
updating_screen = 1;
switch (format) {
}
EndDrawing();
+ rtg_output_in_vblank = 1;
if (format == RTGFMT_RBG565) {
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
reinit = 1;
goto shutdown_raylib;
}
- if (!emulator_exiting) {
+ if (emulator_exiting) {
goto shutdown_raylib;
}
}