PolledInput tweak

BlitzMax Forums/BlitzMax Module Tweaks/PolledInput tweak

klepto2(Posted 2005) [#1]
Like posted in the Bug forum, this tweaks stop the limitation of the GetChar() command.

1. Change (begins line : 71):
If CharPut > 255 Then
		charqueue = Charqueue[..CharPut+1]
EndIf


2.Change (Replace the Flushkeys() Function):
Function FlushKeys()
	PollSystem
	charGet=0
	charPut=0
	charqueue = New Int[256]
	For Local i=0 Until 256
		keyStates[i]=0
		keyHits[i]=0
	Next
End Function


3. Change Line 174, which should be : Local n=charQueue[charGet & 255]
to Local n=charQueue[charGet]

4. Rebuild Module

Would be nice, if this could make its way to the official module.