From: notaz Date: Tue, 15 Jul 2008 16:00:54 +0000 (+0000) Subject: step-frame added to debug X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e6cbce1c737e837a3102c196c11874ec8ab8ff3;p=libpicofe.git step-frame added to debug git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@548 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/common/common.h b/common/common.h index 9653db1..1bef02c 100644 --- a/common/common.h +++ b/common/common.h @@ -26,6 +26,8 @@ void menu_flip(void); #define read_buttons(which) \ wait_for_input(which) +#define read_buttons_async(which) \ + (gp2x_joystick_read(0) & (which)) #define menu_draw_begin() \ gp2x_pd_clone_buffer2() #define clear_screen() \ @@ -67,6 +69,8 @@ void menu_draw_end(void); #define read_buttons(which) \ wait_for_input(which, 0) +#define read_buttons_async(which) \ + (psp_pad_read(0) & (which)) #define clear_screen() \ memset(SCREEN_BUFFER, 0, SCREEN_WIDTH*SCREEN_HEIGHT*2) #define darken_screen() \ diff --git a/common/menu.c b/common/menu.c index 2775859..b3dc27a 100644 --- a/common/menu.c +++ b/common/menu.c @@ -439,6 +439,7 @@ void debug_menu_loop(void) if ((inp & (BTN_WEST|BTN_LEFT)) == (BTN_WEST|BTN_LEFT)) { mkdir("dumps", 0777); PDebugDumpMem(); + while (inp & BTN_WEST) inp = read_buttons_async(BTN_WEST); dumped = 1; } break; @@ -447,6 +448,13 @@ void debug_menu_loop(void) if (inp & BTN_RIGHT) PicoDrawMask ^= PDRAW_LAYERA_ON; if (inp & BTN_DOWN) PicoDrawMask ^= PDRAW_SPRITES_LOW_ON; if (inp & BTN_UP) PicoDrawMask ^= PDRAW_SPRITES_HI_ON; + if (inp & BTN_EAST) { + PsndOut = NULL; // just in case + PicoSkipFrame = 1; + PicoFrame(); + PicoSkipFrame = 0; + while (inp & BTN_EAST) inp = read_buttons_async(BTN_EAST); + } break; case 3: if (inp & BTN_DOWN) spr_offs++;