mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
some ts support, currently for Pico only
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@531 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
091facb8fe
commit
85a4b5a4a2
4 changed files with 81 additions and 5 deletions
|
@ -436,13 +436,16 @@ static void emu_msg_tray_open(void)
|
|||
|
||||
static void RunEventsPico(unsigned int events, unsigned int gp2x_keys)
|
||||
{
|
||||
int ret, px, py;
|
||||
static int pdown_frames = 0;
|
||||
|
||||
emu_RunEventsPico(events);
|
||||
|
||||
if (pico_inp_mode != 0)
|
||||
{
|
||||
PicoPad[0] &= ~0x0f; // release UDLR
|
||||
if (gp2x_keys & GP2X_UP) { pico_pen_y--; if (pico_pen_y < 0) pico_pen_y = 0; }
|
||||
if (gp2x_keys & GP2X_DOWN) { pico_pen_y++; if (pico_pen_y > 239-PICO_PEN_ADJUST_Y) pico_pen_y = 239-PICO_PEN_ADJUST_Y; }
|
||||
if (gp2x_keys & GP2X_UP) { pico_pen_y--; if (pico_pen_y < 8) pico_pen_y = 8; }
|
||||
if (gp2x_keys & GP2X_DOWN) { pico_pen_y++; if (pico_pen_y > 224-PICO_PEN_ADJUST_Y) pico_pen_y = 224-PICO_PEN_ADJUST_Y; }
|
||||
if (gp2x_keys & GP2X_LEFT) { pico_pen_x--; if (pico_pen_x < 0) pico_pen_x = 0; }
|
||||
if (gp2x_keys & GP2X_RIGHT) {
|
||||
int lim = (Pico.video.reg[12]&1) ? 319 : 255;
|
||||
|
@ -455,6 +458,29 @@ static void RunEventsPico(unsigned int events, unsigned int gp2x_keys)
|
|||
PicoPicohw.pen_pos[0] += 0x3c;
|
||||
PicoPicohw.pen_pos[1] = pico_inp_mode == 1 ? (0x2f8 + pico_pen_y) : (0x1fc + pico_pen_y);
|
||||
}
|
||||
|
||||
// for F200
|
||||
ret = gp2x_touchpad_read(&px, &py);
|
||||
if (ret >= 0) {
|
||||
if (ret > 5000) {
|
||||
if (pdown_frames++ > 5)
|
||||
PicoPad[0] |= 0x20;
|
||||
|
||||
pico_pen_x = px;
|
||||
pico_pen_y = py;
|
||||
if (!(Pico.video.reg[12]&1)) {
|
||||
pico_pen_x -= 32;
|
||||
if (pico_pen_x < 0) pico_pen_x = 0;
|
||||
if (pico_pen_x > 248) pico_pen_x = 248;
|
||||
}
|
||||
if (pico_pen_y > 224) pico_pen_y = 224;
|
||||
}
|
||||
else
|
||||
pdown_frames= 0;
|
||||
|
||||
//if (ret == 0)
|
||||
// PicoPicohw.pen_pos[0] = PicoPicohw.pen_pos[1] = 0x8000;
|
||||
}
|
||||
}
|
||||
|
||||
static void update_volume(int has_changed, int is_up)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue