Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Util/Clooper
diff options
context:
space:
mode:
Diffstat (limited to 'Util/Clooper')
-rw-r--r--Util/Clooper/aclient.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/Util/Clooper/aclient.cpp b/Util/Clooper/aclient.cpp
index a01dcc3..861b590 100644
--- a/Util/Clooper/aclient.cpp
+++ b/Util/Clooper/aclient.cpp
@@ -209,6 +209,17 @@ struct EvLoop
{
return (int)rtick % tickMax;
}
+ float getTickf(bool mod)
+ {
+ if (mod)
+ {
+ return fmod(rtick, (MYFLT)tickMax);
+ }
+ else
+ {
+ return rtick;
+ }
+ }
void setNumTicks(int nticks)
{
tickMax = nticks;
@@ -859,13 +870,13 @@ DECL(sc_setTrackpadY) //(float v)
Py_INCREF(Py_None);
return Py_None;
}
-DECL(sc_loop_getTick) // -> int
+DECL(sc_loop_getTick) // -> float
{
if (!PyArg_ParseTuple(args, "" ))
{
return NULL;
}
- return Py_BuildValue("i", sc_tt->loop ? sc_tt->loop->getTick():-1);
+ return Py_BuildValue("f", sc_tt->loop ? sc_tt->loop->getTickf(true):-1.0f);
}
DECL(sc_loop_setNumTicks) //(int nticks)
{