mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-13 01:26:50 -04:00
DS: Fix can't move camera
This commit is contained in:
parent
f4ada2aa51
commit
88d43a8420
@ -90,23 +90,23 @@ static void HandleButtons(int mods) {
|
||||
static void ProcessTouchInput(int mods) {
|
||||
touchPosition pos;
|
||||
touchRead(&pos);
|
||||
touchActive = mods & KEY_TOUCH;
|
||||
|
||||
if (touchActive) {
|
||||
Pointer_SetPosition(0, pos.px, pos.py);
|
||||
}
|
||||
// Set starting position for camera movement
|
||||
if (mods & KEY_TOUCH) {
|
||||
if (!touchActive && (mods & KEY_TOUCH)) {
|
||||
touchBegX = pos.px;
|
||||
touchBegY = pos.py;
|
||||
}
|
||||
|
||||
touchActive = mods & KEY_TOUCH;
|
||||
if (touchActive) {
|
||||
Pointer_SetPosition(0, pos.px, pos.py);
|
||||
}
|
||||
}
|
||||
|
||||
void Window_ProcessEvents(double delta) {
|
||||
scanKeys();
|
||||
|
||||
int keys = keysDown() | keysHeld();
|
||||
Platform_Log1("KEYS: %h", &keys);
|
||||
HandleButtons(keys);
|
||||
|
||||
Input_SetNonRepeatable(CCMOUSE_L, keys & KEY_TOUCH);
|
||||
@ -123,9 +123,6 @@ void Window_UpdateRawMouse(void) {
|
||||
touchPosition touch;
|
||||
touchRead(&touch);
|
||||
|
||||
int DX = touch.px - touchBegX;
|
||||
int DY = touch.py - touchBegY;
|
||||
Platform_Log2("DELTA: %i, %i", &DX, &DY);
|
||||
Event_RaiseRawMove(&PointerEvents.RawMoved,
|
||||
touch.px - touchBegX, touch.py - touchBegY);
|
||||
touchBegX = touch.px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user