Mercurial > hg > haptic-xypad
changeset 1:46671fc7d649 tip
fixed "window" message bug and brought the message outside the haptic device monitor
author | Fiore Martin <f.martin@qmul.ac.uk> |
---|---|
date | Fri, 13 Mar 2015 13:02:16 +0000 |
parents | 011caca7515a |
children | |
files | native/OpenHaptics/XYPad/XYPad.sdf native/OpenHaptics/XYPad/XYPad.v12.suo native/OpenHaptics/XYPad/uk_ac_qmul_eecs_depic_jhapticgui_HapticDevice.cpp src/uk/ac/qmul/eecs/depic/jhapticgui/examples/XYPad.dll |
diffstat | 4 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/native/OpenHaptics/XYPad/uk_ac_qmul_eecs_depic_jhapticgui_HapticDevice.cpp Fri Feb 13 14:44:20 2015 +0000 +++ b/native/OpenHaptics/XYPad/uk_ac_qmul_eecs_depic_jhapticgui_HapticDevice.cpp Fri Mar 13 13:02:16 2015 +0000 @@ -177,12 +177,6 @@ } - static bool once = false; - if (!once){ - once = true; - send(Message("window.display", "", 0)); - } - /* check if there is a message ready for the java thread */ bool messageReady = (env->GetBooleanField(*thisObj,messageReadyFieldID) == JNI_TRUE); if(messageReady){ @@ -213,6 +207,12 @@ /* release the lock. HapticScene methods from now on can execute commands without deadlock risk */ MonitorExit(thisObj); + static bool once = false; + if (!once){ + once = true; + send(Message("window", "", 0)); + } + unsigned int messageUpdate = 0; if(messageReady) messageUpdate = scene->processMessage(message);