\r
#include "gp2x.h"\r
#include "usbjoy.h"\r
+#include "asmutils.h"\r
\r
volatile unsigned short *gp2x_memregs;\r
//static\r
}\r
\r
\r
-/* LCD updates @ 80Hz? */\r
void gp2x_video_wait_vsync(void)\r
{\r
- gp2x_memregs[0x2846>>1] = 0x20|2; //(gp2x_memregs[0x2846>>1] | 0x20) & ~2;\r
- while(!(gp2x_memregs[0x2846>>1] & 2));// usleep(1);\r
+ unsigned short v = gp2x_memregs[0x1182>>1];\r
+ while (!((v ^ gp2x_memregs[0x1182>>1]) & 0x10)) spend_cycles(1024);\r
}\r
\r
\r