git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

gbdk-lib/examples/gb/mbc7_accelerometer/src/vsync_no_halt.c

      1 #include <gbdk/platform.h>
      2 
      3 void vsync_no_halt(void) {
      4 
      5     // Return if the screen isn't on since
      6     // VBL isr to toggle vbl_done won't run
      7     if ((LCDC_REG & LCDCF_ON) == 0) return;
      8 
      9     // Wait until VBlank ISR marks the frame done
     10     VBL_DONE = 0;
     11     while (VBL_DONE == 0);
     12 }

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.