Fullscreen KEYS not working

BlitzMax Forums/BlitzMax Programming/Fullscreen KEYS not working

col(Posted 2011) [#1]
Hi all
I'm not sure if I've killed my install of BMax or not, but could some kind souls try this code please to see if you can exit the app.

superstrict
'Framework SRS.MAX3D

SetGraphicsDriver GLGraphicsDriver()

Local g:TGraphics = CreateGraphics(800,600,32,60,GRAPHICS_BACKBUFFER)
SetGraphics g

While Not KeyDown(KEY_ESCAPE)
	If KeyDown(KEY_SPACE)	GLDrawText "BMAX" , 0 , 0
	Flip
Wend

CloseGraphics g


[edit] basically I have a prob of the keys not working during fullscreen, works ok in windowed mode.

ESCAPE should exit
SPACE should show a message in the top left

thanks all

Last edited 2011


GfK(Posted 2011) [#2]
When you create a graphics object in this way you need to call EnablePolledInput() afterwards.


col(Posted 2011) [#3]
ahh, thankyou

phew :0)


col(Posted 2011) [#4]
Does that mean ANY fullscreen creation will require EnablePolledInput() ?


GfK(Posted 2011) [#5]
Yep... but its done automatically if you just use Graphics() instead of CreateGraphics().


col(Posted 2011) [#6]
i see
thanks again

im glad i didnt break it :o) hehe