mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-01-31 10:32:30 +00:00
Count frames the pointer has been held.
This commit is contained in:
parent
def79c0180
commit
ab96a3fc70
@ -36,6 +36,10 @@ void UIUpdateMouse(int i, float x, float y, bool down) {
|
||||
} else {
|
||||
uistate.mousepressed[i] = 0;
|
||||
}
|
||||
if (uistate.mousedown[i])
|
||||
uistate.mouseframesdown[i]++;
|
||||
else
|
||||
uistate.mouseframesdown[i] = 0;
|
||||
|
||||
uistate.mousex[i] = x;
|
||||
uistate.mousey[i] = y;
|
||||
|
5
ui/ui.h
5
ui/ui.h
@ -81,8 +81,9 @@ private:
|
||||
struct UIState {
|
||||
int mousex[MAX_POINTERS];
|
||||
int mousey[MAX_POINTERS];
|
||||
int mousedown[MAX_POINTERS];
|
||||
int mousepressed[MAX_POINTERS];
|
||||
bool mousedown[MAX_POINTERS];
|
||||
bool mousepressed[MAX_POINTERS];
|
||||
short mouseframesdown[MAX_POINTERS];
|
||||
|
||||
int mouseStartX[MAX_POINTERS];
|
||||
int mouseStartY[MAX_POINTERS];
|
||||
|
Loading…
x
Reference in New Issue
Block a user