mirror of https://github.com/mgba-emu/mgba.git
PSP2: Simplify frame limiter code
This commit is contained in:
parent
357e2e2d6b
commit
8fd76bc9f5
|
@ -25,18 +25,17 @@
|
|||
#include <vita2d.h>
|
||||
|
||||
static void _drawStart(void) {
|
||||
vita2d_set_vblank_wait(false);
|
||||
static int vcount = 0;
|
||||
extern bool frameLimiter;
|
||||
int oldVCount = vcount;
|
||||
vcount = sceDisplayGetVcount();
|
||||
vita2d_set_vblank_wait(frameLimiter && vcount + 1 >= oldVCount);
|
||||
vita2d_start_drawing();
|
||||
vita2d_clear_screen();
|
||||
}
|
||||
|
||||
static void _drawEnd(void) {
|
||||
static int vcount = 0;
|
||||
extern bool frameLimiter;
|
||||
int oldVCount = vcount;
|
||||
vita2d_end_drawing();
|
||||
vcount = sceDisplayGetVcount();
|
||||
vita2d_set_vblank_wait(frameLimiter && vcount + 1 >= oldVCount);
|
||||
vita2d_swap_buffers();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue