bbSystemWait()

Archives Forums/BlitzMax Bug Reports/bbSystemWait()

Stu_ovine(Posted 2009) [#1]
Ive just got around to updating my MAx to the latest SVN. I now have a problem with getchar() and waitkey().

Im getting an "Unhandled Memory Exception Error" after pressing a key.

I've traced it to the bbSystemWait() in system.win32.bmx

Strict


Framework brl.GLMax2D
Import maxgui.Win32MaxGUI
SetGraphicsDriver GLMax2DDriver()

	Local X:Int = ClientWidth(Desktop()) / 2 - 200 / 2
	Local Y:Int = ClientHeight(Desktop()) / 2 - 200 / 2
	Local Window:tgadget = CreateWindow("TEST", X, Y, 200, 200, Null, WINDOW_TITLEBAR | WINDOW_CLIENTCOORDS)
	Local BCanvas:tgadget     = CreateCanvas(ClientWidth(Window)/2-200/2, ClientHeight(Window)/2-200/2, 200, 200, Window)
	Local TG_Canvas:TGraphics = CanvasGraphics(BCanvas)
	SetGraphics TG_Canvas
	ShowGadget Window
	ActivateGadget BCanvas
	
	EnablePolledInput()
				
WaitKey()


Is there something im missing ?


marksibly(Posted 2009) [#2]
Hi,

Ok, I think it's related to maxgui. Also, it's only the 'enter' key that's crashing it for me!

I got it working by SVN updating MaxGUI, and changing the maxgui import to...

Import maxgui.Win32MaxGUIEx

(Win32MaxGUIEx is the need fangled maxgui).

This at least stops it crashing for me.


Stu_ovine(Posted 2009) [#3]
Thanks