Fullscreen Startup Focus Resolution Problem
by Chris Labombard · in Torque Game Builder · 02/14/2011 (6:49 am) · 1 replies
I am experiencing an odd problem with TGB (1.7.5) on 1 particular machine.
My game is set to start in fullscreen mode. I do not want the fullscreen, window, fullscreen flicker on start up so I removed all calls to setscreenmode and togglefullscreen etc. in initializeCanvas. Instead I set all the prefs variables correctly using getDesktopResolution() and allow the createCanvas call to initialize it correctly on the first try.
This works perfectly for all of my test machines (10 machines with almost every OS and CPU with random old vid cards)
There is 1 machine where this does not work. It is an old P3 1.2GHz with 256mb ram. An Intel 82810 (I think) integrated vid. card. XP Home SP3.
The game starts up using D3D because OpenGL is not available. The game flickers once and loads like normal except when you try and move the mouse it does not allow you to move it everywhere on screen. it's as if the windows explorer window under it has the focus and the mouse can only move inside the bounds of that window.
Also, when you move the mouse along the bottom of the screen you can see the tabs in the taskbar and the start button flicker slightly. You still get mouse events and can click as long as what you're clicking isnt too far to the side. if you alt-tab off of the window and then back in it works fine.
I've come to find that the fullscreen resolution is actually 1 rez below the desktop resolution, so the engine must be failing to initialize it at desktop resolution and knocking it down a rez which causes the flicker as it changes vid. resolution and somehow the focus problem.
Does anyone have any idea how I can fix this or where to look? has anyone experienced this before?
Thanks,
Chris
My game is set to start in fullscreen mode. I do not want the fullscreen, window, fullscreen flicker on start up so I removed all calls to setscreenmode and togglefullscreen etc. in initializeCanvas. Instead I set all the prefs variables correctly using getDesktopResolution() and allow the createCanvas call to initialize it correctly on the first try.
This works perfectly for all of my test machines (10 machines with almost every OS and CPU with random old vid cards)
There is 1 machine where this does not work. It is an old P3 1.2GHz with 256mb ram. An Intel 82810 (I think) integrated vid. card. XP Home SP3.
The game starts up using D3D because OpenGL is not available. The game flickers once and loads like normal except when you try and move the mouse it does not allow you to move it everywhere on screen. it's as if the windows explorer window under it has the focus and the mouse can only move inside the bounds of that window.
Also, when you move the mouse along the bottom of the screen you can see the tabs in the taskbar and the start button flicker slightly. You still get mouse events and can click as long as what you're clicking isnt too far to the side. if you alt-tab off of the window and then back in it works fine.
I've come to find that the fullscreen resolution is actually 1 rez below the desktop resolution, so the engine must be failing to initialize it at desktop resolution and knocking it down a rez which causes the flicker as it changes vid. resolution and somehow the focus problem.
Does anyone have any idea how I can fix this or where to look? has anyone experienced this before?
Thanks,
Chris
About the author
I have been a professional game programmer for over 5 years now. I've worked on virtually every platform, dozens of games and released a few of my own games, including 2 iPhone titles and a title waiting release on Big Fish Games.
Torque Owner Chris Labombard
Premium Preferred
What I think may be happening is the D3D setScreenMode is not finding the resolution in the mResolutionList. It is obviously a supported resolution since that is my desktop resolution. It may be because I'm running 24-bits per pixel instead of 16 or 32 which the rez list doesn't pick up.
You'd think it would be in the list since earlier in initializeCanvas it explicitly adds the desktop resolution to the list.