mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Count frames the pointer has been held.
This commit is contained in:
parent
def79c0180
commit
ab96a3fc70
2 changed files with 7 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue