Finding Available Resolutions
by Bruno · in Torque Game Builder · 03/17/2006 (7:55 am) · 1 replies
Hi.,
I'm using the code below to find the available resolutions in my machine.
Either in OGL or D3D it's not outputting all the resolutions available, but only some of them..
Is there a way to get all the list of all of them ?
thanks,
Bruno
I'm using the code below to find the available resolutions in my machine.
Either in OGL or D3D it's not outputting all the resolutions available, but only some of them..
Is there a way to get all the list of all of them ?
%this.clear();
%resList = getResolutionList( %device );
%resCount = getFieldCount( %resList );
%deskRes = getDesktopResolution();
%count = 0;
for ( %i = 0; %i < %resCount; %i++ )
{
%res = getWords( getField( %resList, %i ), 0, 1 );
if ( !%fullScreen )
{
if ( firstWord( %res ) >= firstWord( %deskRes ) )
continue;
if ( getWord( %res, 1 ) >= getWord( %deskRes, 1 ) )
continue;
}
// Only add to list if it isn't there already:
if ( %this.findText( %res ) == -1 )
{
%this.add( %res, %count );
%count++;
}
}thanks,
Bruno
About the author
Torque Owner Philip Mansfield
Default Studio Name
I've just tested a bare T2D, and it lists all of my graphic modes, HOWEVER, the list is different between window and fullscreen mode.
Some modes can only be run full screen. Maybe that's why you have some of your resolution options missing.