Alex.
Retired
- Joined
- Aug 24, 2005
- Messages
- 4,616
It turns out the crashing problem was entirely because of improper sound frequencies, yet another thing that slipped my mind :unsure:
The touchscreen works great, but I only managed to get readings from it from the SDL mouse event:
(SDL_GP2X_MouseType() returns 2)
CODE
mouseTap = 0;
switch(event.type) {
case SDL_MOUSEBUTTONDOWN:
switch(event.button.button) {
case SDL_BUTTON_LEFT:
mouseTap = 1;
mouseX = event.button.x;
mouseY = event.button.y;
break;
}
break;
}
if(mouseTap) {
// screen was tapped at (mouseX, mouseY)
}
The way I read input is poll all SDL events at the beginning of each program loop. Does SDL_GP2X_Touchpad() use SDL events? If it does, then perhaps it has nothing left to work with by the time I call it. I got a bit confused though because SDL_gp2x.h says the following about it: "Get (semi-)raw touchpad position (not SDL position)", so I assumed it did not use SDL.
I apologize if I'm talking about the obvious here, this is new (and interesting) to me Thank you once again for your fantastic work Paeryn!
The touchscreen works great, but I only managed to get readings from it from the SDL mouse event:
(SDL_GP2X_MouseType() returns 2)
CODE
mouseTap = 0;
switch(event.type) {
case SDL_MOUSEBUTTONDOWN:
switch(event.button.button) {
case SDL_BUTTON_LEFT:
mouseTap = 1;
mouseX = event.button.x;
mouseY = event.button.y;
break;
}
break;
}
if(mouseTap) {
// screen was tapped at (mouseX, mouseY)
}
The way I read input is poll all SDL events at the beginning of each program loop. Does SDL_GP2X_Touchpad() use SDL events? If it does, then perhaps it has nothing left to work with by the time I call it. I got a bit confused though because SDL_gp2x.h says the following about it: "Get (semi-)raw touchpad position (not SDL position)", so I assumed it did not use SDL.
I apologize if I'm talking about the obvious here, this is new (and interesting) to me Thank you once again for your fantastic work Paeryn!