I think we should throw out touch input when it is out of bounds of the touchscreen, instead of clamping it. what do other people think?
This commit is contained in:
parent
c6c4871020
commit
b8b16c02df
|
@ -1947,9 +1947,12 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||||
translateXY(x,y);
|
translateXY(x,y);
|
||||||
else
|
else
|
||||||
y-=192;
|
y-=192;
|
||||||
if(x<0) x = 0; else if(x>255) x = 255;
|
//zero 21-01-2009 - if the touch is entirely out of bounds,
|
||||||
if(y<0) y = 0; else if(y>192) y = 192;
|
//I think we should throw it out instead of clamping it
|
||||||
NDS_setTouchPos(x, y);
|
//if(x<0) x = 0; else if(x>255) x = 255;
|
||||||
|
//if(y<0) y = 0; else if(y>192) y = 192;
|
||||||
|
if(x>=0 && x<=255 && y>=0 && y<=192)
|
||||||
|
NDS_setTouchPos(x, y);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
NDS_releaseTouch();
|
NDS_releaseTouch();
|
||||||
|
|
Loading…
Reference in New Issue