- if (events & (1 << 5)) {\r
- PicoPicoPage++;\r
- if (PicoPicoPage > 6) PicoPicoPage = 6;\r
- sprintf(noticeMsg, "Page %i ", PicoPicoPage);\r
- gettimeofday(¬iceMsgTime, 0);\r
- }\r
- if (pico_inp_mode != 0) {\r
- PicoPad[0] &= ~0x0f; // release UDLR\r
- if (gp2x_keys & GP2X_UP) { pico_pen_y--; if (pico_pen_y < 0) pico_pen_y = 0; }\r
- if (gp2x_keys & GP2X_DOWN) { pico_pen_y++; if (pico_pen_y > 251) pico_pen_y = 251; }\r
- if (gp2x_keys & GP2X_LEFT) { pico_pen_x--; if (pico_pen_x < 0) pico_pen_x = 0; }\r
- if (gp2x_keys & GP2X_RIGHT){ pico_pen_x++; if (pico_pen_x > 353) pico_pen_x = 353; }\r
- PicoPicoPenPos[0] = 0x03c + pico_pen_x;\r
- PicoPicoPenPos[1] = pico_inp_mode == 1 ? (0x2f8 + pico_pen_y) : (0x1fc + pico_pen_y);\r
+\r
+ // for F200\r
+ ret = gp2x_touchpad_read(&px, &py);\r
+ if (ret >= 0) {\r
+ if (ret > 5000) {\r
+ if (pdown_frames++ > 5)\r
+ PicoPad[0] |= 0x20;\r
+\r
+ pico_pen_x = px;\r
+ pico_pen_y = py;\r
+ if (!(Pico.video.reg[12]&1)) {\r
+ pico_pen_x -= 32;\r
+ if (pico_pen_x < 0) pico_pen_x = 0;\r
+ if (pico_pen_x > 248) pico_pen_x = 248;\r
+ }\r
+ if (pico_pen_y > 224) pico_pen_y = 224;\r
+ }\r
+ else\r
+ pdown_frames= 0;\r
+\r
+ //if (ret == 0)\r
+ // PicoPicohw.pen_pos[0] = PicoPicohw.pen_pos[1] = 0x8000;\r