some Pico work
authornotaz <notasas@gmail.com>
Wed, 7 May 2008 18:53:53 +0000 (18:53 +0000)
committernotaz <notasas@gmail.com>
Wed, 7 May 2008 18:53:53 +0000 (18:53 +0000)
git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@442 be3aeb3a-fb24-0410-a615-afba39da0efa

gp2x/emu.c

index f5b8ce3..e3f1148 100644 (file)
@@ -411,15 +411,15 @@ static void RunEventsPico(unsigned int events, unsigned int gp2x_keys)
                gettimeofday(&noticeMsgTime, 0);\r
        }\r
        if (events & (1 << 4)) {\r
-               PicoPicoPage--;\r
-               if (PicoPicoPage < 0) PicoPicoPage = 0;\r
-               sprintf(noticeMsg, "Page %i                 ", PicoPicoPage);\r
+               PicoPicohw.page--;\r
+               if (PicoPicohw.page < 0) PicoPicohw.page = 0;\r
+               sprintf(noticeMsg, "Page %i                 ", PicoPicohw.page);\r
                gettimeofday(&noticeMsgTime, 0);\r
        }\r
        if (events & (1 << 5)) {\r
-               PicoPicoPage++;\r
-               if (PicoPicoPage > 6) PicoPicoPage = 6;\r
-               sprintf(noticeMsg, "Page %i                 ", PicoPicoPage);\r
+               PicoPicohw.page++;\r
+               if (PicoPicohw.page > 6) PicoPicohw.page = 6;\r
+               sprintf(noticeMsg, "Page %i                 ", PicoPicohw.page);\r
                gettimeofday(&noticeMsgTime, 0);\r
        }\r
        if (pico_inp_mode != 0) {\r
@@ -428,8 +428,8 @@ static void RunEventsPico(unsigned int events, unsigned int gp2x_keys)
                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
+               PicoPicohw.pen_pos[0] = 0x03c + pico_pen_x;\r
+               PicoPicohw.pen_pos[1] = pico_inp_mode == 1 ? (0x2f8 + pico_pen_y) : (0x1fc + pico_pen_y);\r
        }\r
 }\r
 \r