#include "readpng.h"\r
#include "lprintf.h"\r
#include "common.h"\r
+#include "input.h"\r
#include "emu.h"\r
\r
\r
while (1)\r
{\r
PDebugZ80Frame();\r
- if (read_buttons_async(PBTN_NORTH)) break;\r
+ if (in_menu_wait_any(0) & PBTN_NORTH) break;\r
emu_waitSound();\r
}\r
\r
}\r
menu_draw_end();\r
\r
- inp = read_buttons(PBTN_EAST|PBTN_SOUTH|PBTN_WEST|PBTN_NORTH|PBTN_L|PBTN_R|PBTN_UP|PBTN_DOWN|PBTN_LEFT|PBTN_RIGHT);\r
- if (inp & PBTN_SOUTH) return;\r
+ inp = in_menu_wait(PBTN_EAST|PBTN_MBACK|PBTN_WEST|PBTN_NORTH|PBTN_L|PBTN_R|PBTN_UP|PBTN_DOWN|PBTN_LEFT|PBTN_RIGHT);\r
+ if (inp & PBTN_MBACK) return;\r
if (inp & PBTN_L) { mode--; if (mode < 0) mode = 3; }\r
if (inp & PBTN_R) { mode++; if (mode > 3) mode = 0; }\r
switch (mode)\r
case 0:\r
if (inp & PBTN_EAST) SekStepM68k();\r
if (inp & PBTN_NORTH) {\r
- while (inp & PBTN_NORTH) inp = read_buttons_async(PBTN_NORTH);\r
+ while (inp & PBTN_NORTH) inp = in_menu_wait_any(-1);\r
mplayer_loop();\r
}\r
if ((inp & (PBTN_WEST|PBTN_LEFT)) == (PBTN_WEST|PBTN_LEFT)) {\r
mkdir("dumps", 0777);\r
PDebugDumpMem();\r
- while (inp & PBTN_WEST) inp = read_buttons_async(PBTN_WEST);\r
+ while (inp & PBTN_WEST) inp = in_menu_wait_any(-1);\r
dumped = 1;\r
}\r
break;\r
PicoSkipFrame = 1;\r
PicoFrame();\r
PicoSkipFrame = 0;\r
- while (inp & PBTN_EAST) inp = read_buttons_async(PBTN_EAST);\r
+ while (inp & PBTN_EAST) inp = in_menu_wait_any(-1);\r
}\r
break;\r
case 3:\r