Suspend event not firing in NG (Windows)

BlitzMax Forums/BlitzMax NG/Suspend event not firing in NG (Windows)

seriouslee(Posted 2015) [#1]
I've tried both polled events and using the event queue. Neither one will catch a suspended program event. I cannot reproduce the error in vanilla BMX.

Using on Windows 10 (64 bit) using TDM-GCC 5.1.0 32 bit

Derron(Posted 2015) [#2]
Just to save a potential upcoming question:

are you using the blitzmax-system-modules (with their event handling) or the ones from the SDL-module ?
"Brl.System" would be the default one, while the second one is not.


Brucey(Posted 2015) [#3]
This works for me :

Framework brl.glmax2d
Import brl.standardio

Graphics 800, 600, 0

While Not KeyDown(key_escape)


	If AppSuspended
		Print "Suspended!"
	End If	


When the app is not active, the text is printed until the app is active again.

seriouslee(Posted 2015) [#4]
Thanks for the replies Brucey and Derron,

I tried your example and that works, and yes I'm using SDL (gl2sdlmax2d). When I switch to glmax2d suspend is caught in my app.

So, how should I use SDL then?


Brucey(Posted 2015) [#5]
I've pushed an update for SDL.

Please let me know if it works okay or not for you.

seriouslee(Posted 2015) [#6]
Works great! You are super awesome Mr. Brucey!!