Update inputDriver.py
This commit is contained in:
parent
2f173182e8
commit
3e8a53aa56
@ -15,15 +15,11 @@ class inputDriver():
|
||||
self._isInitialized = True
|
||||
def shutdown(self):
|
||||
if self._initialized:
|
||||
self.releaseDevices()
|
||||
self.removeAllDevices()
|
||||
self._isInitialized = False
|
||||
def getInputEvent(self):
|
||||
time.sleep(0.05)
|
||||
time.sleep(0.1)
|
||||
return None
|
||||
def handleInputEvent(self, event):
|
||||
time.sleep(0.05)
|
||||
if not self._initialized:
|
||||
return
|
||||
def writeEventBuffer(self):
|
||||
if not self._initialized:
|
||||
return
|
||||
@ -31,7 +27,7 @@ class inputDriver():
|
||||
if not self._initialized:
|
||||
return
|
||||
del self.env['input']['eventBuffer'][:]
|
||||
def updateInputDevices(self, force = False, init = False):
|
||||
def updateInputDevices(self, newDevices = None, init = False)
|
||||
if not self._initialized:
|
||||
return
|
||||
def getLedState(self, led = 0):
|
||||
@ -47,10 +43,17 @@ class inputDriver():
|
||||
def ungrabAllDevices(self):
|
||||
if not self._initialized:
|
||||
return
|
||||
def hasIDevices(self):
|
||||
if not self._initialized:
|
||||
return False
|
||||
return False
|
||||
def removeAllDevices(self):
|
||||
if not self._initialized:
|
||||
return
|
||||
def __del__(self):
|
||||
if not self._initialized:
|
||||
return
|
||||
self.removeAllDevices()
|
||||
try:
|
||||
self.removeAllDevices()
|
||||
except:
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user