Game Development Community

TGB Vista Fix

by Bruno · in Torque Game Builder · 06/10/2009 (11:29 am) · 25 replies

As anyone managed to get TGB games not crashing in Vista(with Aero enabled) , after Ctrl + Alt + Del being pressed ?
I searched the forums, and this problem has been here for over one year, and as you may well know,
Portals will reject games that crash like this on Vista machines, which makes TGB a bad option
for casual game development.
I have a game on standby by the QA team of a portal, and it won't launch without this being fixed.
Anyone has a solution for this ?

thanks,
Bruno
Page«First 1 2 Next»
#21
08/03/2009 (8:52 pm)
I made my code look like post #7. I find it odd that there aren't curly braces around the two statements after the else, but it does seem to work on XP, but not on Vista.

I'm tracked the Vista problem down to the fact that there are TWO calls to this function (virtually back-to-back) with WM_ACTIVATE's wParam set to 0, then immediately set to 1. It crashes right after the second call as it tries to render the GUI.

I guess I'm still looking for help and/or suggestions if anybody has any.
#22
08/03/2009 (9:17 pm)
I did find a fix. I'm not thrilled, but it works!

I commented out the WM_PAINT case. It appears that Vista was forcing a paint after the minimize, and the engine happily complied.

Does anybody know if this code is absolutely necessary? Since Torque renders every frame as fast as possible, do we need an intermediate paint? Will I have problems on another Windows system besides the XP and Vista that I've tested?
#23
08/03/2009 (10:46 pm)
The behavior of the admin screen / screensaver exists on any NT based Windows system, be it 2k, XP Pro, Vista or Win7
#24
08/03/2009 (11:47 pm)
What I mean is, is the WM_PAINT case absolutely necessary? In past work, I know this is used in event-driven applications to limit the number of draw routines called. In the case of Torque, the whole screen is rendered every frame (with exceptions for non-GUI areas).

Since it's been working for me all night with the WM_PAINT call removed, I'm going to stick with it.

I guess, as a request to future T2D work, I'd love a baseline that's stable for all of these "exception" cases. On a scale of 1 to 100, fixing this would be 100, and the next closest thing (maybe folders to organize art) would be a 50.
#25
08/04/2009 (9:00 am)
@William

I double checked my code changes and edited post #7 to match, adding the curly brackets.
Page«First 1 2 Next»