[Beta 2 Bug] Fullscreen Toggle Freezes Web Plugin
by Jason Parker · in Torque 3D Professional · 06/04/2009 (5:14 pm) · 5 replies
Attempting to switch to fullscreen when using the web plugin freezes T3D and then crashes Firefox if you try to browse away from the page or close Firefox.
Windows XP Pro Service Pack 3 (32bit)
Firefox 3.0.10
Core 2 Duo 2.53ghz
Nvidia GeForce 9800 GT 512 MB Driver version 180.48
2 GB of DDR2
Occurs with:
New Project with only source code changes being fixes posted on this forum.
PhysX.
FPS Genre Kit.
I have not tested with IE as I cannot compile the ActiveX plugin.
This problem also existed in Beta 1, but I didn't think anything of it at the time.
Windows XP Pro Service Pack 3 (32bit)
Firefox 3.0.10
Core 2 Duo 2.53ghz
Nvidia GeForce 9800 GT 512 MB Driver version 180.48
2 GB of DDR2
Occurs with:
New Project with only source code changes being fixes posted on this forum.
PhysX.
FPS Genre Kit.
I have not tested with IE as I cannot compile the ActiveX plugin.
This problem also existed in Beta 1, but I didn't think anything of it at the time.
About the author
Recent Threads
#2
An oldie, but still a valid issue. Essentially, full screen should not be an option under web deployment. I believe by 1.1 Beta 3 that full screen was disallowed, but there was still an issue with the Options dialog doing some weird things that would cause your Torque window on the web page to shrink. Here are the fixes that are now in 1.1 Final (use 1.1 Beta 3 as your base):
In core/scripts/gui/optionsDlg.cs, in OptionsDlg::onWake(%this) change this:
to this:
Next in OptionsDlg::applyGraphics( %this, %testNeedApply ) change this line directly under the // Gather the new video mode comment:
to this:
A few lines under that, we have this:
Change it to read as:
That should be it.
- Dave
02/17/2011 (2:30 pm)
Greetings!An oldie, but still a valid issue. Essentially, full screen should not be an option under web deployment. I believe by 1.1 Beta 3 that full screen was disallowed, but there was still an issue with the Options dialog doing some weird things that would cause your Torque window on the web page to shrink. Here are the fixes that are now in 1.1 Final (use 1.1 Beta 3 as your base):
In core/scripts/gui/optionsDlg.cs, in OptionsDlg::onWake(%this) change this:
%this-->OptGraphicsFullscreenToggle.setStateOn( Canvas.isFullScreen() );
to this:
if ( isFunction("getWebDeployment") && getWebDeployment() )
{
// Cannot enable full screen under web deployment
%this-->OptGraphicsFullscreenToggle.setStateOn( false );
%this-->OptGraphicsFullscreenToggle.setVisible( false );
}
else
{
%this-->OptGraphicsFullscreenToggle.setStateOn( Canvas.isFullScreen() );
}Next in OptionsDlg::applyGraphics( %this, %testNeedApply ) change this line directly under the // Gather the new video mode comment:
%newRes = getWords( Canvas.getMode( %this-->OptGraphicsResolutionMenu.getSelected() ), $WORD::RES_X, $WORD::RES_Y );
to this:
if ( isFunction("getWebDeployment") && getWebDeployment() )
{
// Under web deployment, we use the custom resolution rather than a Canvas
// defined one.
%newRes = %this-->OptGraphicsResolutionMenu.getText();
}
else
{
%newRes = getWords( Canvas.getMode( %this-->OptGraphicsResolutionMenu.getSelected() ), $WORD::RES_X, $WORD::RES_Y );
}A few lines under that, we have this:
// If we're in windowed mode switch the fullscreen check
// if the resolution is bigger than the desktop.
if ( %newFullScreen $= "false" )
{
%deskRes = getDesktopResolution();
%deskResX = getWord(%deskRes, $WORD::RES_X);
%deskResY = getWord(%deskRes, $WORD::RES_Y);
if ( getWord( %newRes, $WORD::RES_X ) > %deskResX ||
getWord( %newRes, $WORD::RES_Y ) > %deskResY )
{
%newFullScreen = "true";
%this-->OptGraphicsFullscreenToggle.setStateOn( true );
}
}Change it to read as:
// Under web deployment we can't be full screen.
if ( isFunction("getWebDeployment") && getWebDeployment() )
{
%newFullScreen = false;
}
else if ( %newFullScreen $= "false" )
{
// If we're in windowed mode switch the fullscreen check
// if the resolution is bigger than the desktop.
%deskRes = getDesktopResolution();
%deskResX = getWord(%deskRes, $WORD::RES_X);
%deskResY = getWord(%deskRes, $WORD::RES_Y);
if ( getWord( %newRes, $WORD::RES_X ) > %deskResX ||
getWord( %newRes, $WORD::RES_Y ) > %deskResY )
{
%newFullScreen = "true";
%this-->OptGraphicsFullscreenToggle.setStateOn( true );
}
}That should be it.
- Dave
#3
There are a variety of reasons to embed your client in a web page even if the players end up treating it like a regular app by always using it fullscreen. Primary for me is community integration, which I could instead do by adding webkit. Each has its own strengths.
02/28/2011 (10:04 pm)
I rather disagree that Fullscreen should not be allowed under web deployment providing that it works. To use Legions as an example, I just couldn't play that game effectively in the web page. I always jumped to fullscreen once I match started.There are a variety of reasons to embed your client in a web page even if the players end up treating it like a regular app by always using it fullscreen. Primary for me is community integration, which I could instead do by adding webkit. Each has its own strengths.
#4
The changes above just make sure that the Options dialog matches what the source code is doing. The source doesn't allow full screen, and attempting to otherwise do so (from script) caused Torque's display to mess up.
Now having said that, allowing full screen with a web deployed game sounds like a good idea if the game and web page are designed for it. I'm not sure why the full screen mode was removed for a web deployed T3D game. A strong possibility is across-the-board browser compatibility and testing for it, but that's just a guess on my part.
- Dave
03/07/2011 (1:18 pm)
Hey Jason.The changes above just make sure that the Options dialog matches what the source code is doing. The source doesn't allow full screen, and attempting to otherwise do so (from script) caused Torque's display to mess up.
Now having said that, allowing full screen with a web deployed game sounds like a good idea if the game and web page are designed for it. I'm not sure why the full screen mode was removed for a web deployed T3D game. A strong possibility is across-the-board browser compatibility and testing for it, but that's just a guess on my part.
- Dave
#5
03/09/2011 (4:38 am)
I didn't have problems with FS in plugin mode (after removing the getWebDeployment limiters), but to avoid problems with the OS misreporting invalid resolutions, I limited it to using whatever resolution the desktop is using and not trying to switch.
Associate Scott Burns
GG Alumni