Adding a new resolution to options menu?

A refuge for those migrating from the fallen DXEditing.com and a place for general discussion relating to Deus Ex editing (coding, mapping, etc).
Post Reply
CountD
Mole Person
Posts: 4
Joined: Sun Apr 07, 2013 4:38 pm

Adding a new resolution to options menu?

Post by CountD »

I'm so damn sick of having to quit the game to change the res either by hand or in kentie's exe. Is there a way to add 1080p to in-game options?
AlvinD
HDTP Member
HDTP Member
Posts: 181
Joined: Thu Mar 01, 2007 10:13 pm
Location: Northern Ireland

Re: Adding a new resolution to options menu?

Post by AlvinD »

Explain abit more, why do you have to keep changing it? What system are you using?
User avatar
SilverSpook
MJ12
Posts: 319
Joined: Wed Feb 15, 2012 8:34 am

Re: Adding a new resolution to options menu?

Post by SilverSpook »

Yeah usually the display settings just stay the same for me.
Image
G-Flex
Silhouette
Posts: 621
Joined: Mon Jul 11, 2011 10:16 pm

Re: Adding a new resolution to options menu?

Post by G-Flex »

Is 1920x1080 (or whatever you're looking for exactly) not shown in the in-game resolutions list?

Is the resolutions list showing much at all? How many options are listed, approximately?

What mods, if any, are you running?


A problem might be that the unmodded game's display menu doesn't list more than some number of (possibly 16?) resolutions, leading to problems like this. This is fixed in my mod (Human Renovation), and probably in Shifter and Deus Ex 2.0 as well.

Please note that if you're using kentie's non-scaled GUI option, changing resolution in-game will have undesired effects because the menu/HUD elements won't be aligned properly, and that changing aspect ratio in-game won't update your FOV angle anyway. These problems will be solved in the next version of Human Renovation, but not in the one currently released.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Re: Adding a new resolution to options menu?

Post by Hanfling »

Afaik in vanilla DX available resolutions are queried from the RenderDevice, but maybe list is clipped to a fix number of the smallest resolutions.

/edit

Out of MenuChoice_Resolution.uc

Code: Select all

// ----------------------------------------------------------------------
// GetScreenResolutions()
//
// Called when the user selects a new rendering device.  Looks
// through the list of rendering devices and updates the 
// MenuChoices[] array with the available resolutions.
//
// Does not allow resolutions under 640x480 to be selected.
// ----------------------------------------------------------------------

function GetScreenResolutions()
{
	local int p;
	local int resX;
	local int resWidth;
	local int choiceCount;
	local string ParseString;
	local string Resolutions[16];
	local string AvailableRes;
	local string resString;
	local int resNum;

	CurrentRes   = player.ConsoleCommand("GetCurrentRes");
	AvailableRes = player.ConsoleCommand("GetRes");

	resNum = 0;
	choiceCount = 0;
	ParseString = AvailableRes;

	p = InStr(ParseString, " ");
	resString = Left(ParseString, p);

	while ( ResNum < ArrayCount(Resolutions) ) 
	{
		// Only support resolutions >= 640x480
		resX = InStr(resString,"x");
		resWidth = int(Left(resString, resX));

		if ( resWidth >= 640 )
		{
			enumText[choiceCount] = resString;
			choiceCount++;
		}

		if ( p == -1 ) 
			break;

		ParseString = Right(ParseString, Len(ParseString) - p - 1);
		p = InStr(ParseString, " ");

		if ( p != -1 )
			resString = Left(ParseString, p);
		else
			resString = ParseString;

		ResNum++;
	}
}
Out of UnrealPubSrc224v OpenGLDrv class:

Code: Select all

	UBOOL Exec( const TCHAR* Cmd, FOutputDevice& Ar )
	{
		guard(UOpenGLRenderDevice::Exec);
		if( ParseCommand(&Cmd,TEXT("GetRes")) )
		{
			TArray<FPlane> Relevant;
			INT i;
			for( i=0; i<Modes.Num(); i++ )
				if( Modes(i).Z==Viewport->ColorBytes*8 )
					if
					(	(Modes(i).X!=320 || Modes(i).Y!=200)
					&&	(Modes(i).X!=640 || Modes(i).Y!=400) )
					Relevant.AddUniqueItem(FPlane(Modes(i).X,Modes(i).Y,0,0));
			appQsort( &Relevant(0), Relevant.Num(), sizeof(FPlane), (QSORT_COMPARE)CompareRes );
			FString Str;
			for( i=0; i<Relevant.Num(); i++ )
				Str += FString::Printf( TEXT("%ix%i "), (INT)Relevant(i).X, (INT)Relevant(i).Y );
			Ar.Log( *Str.LeftChop(1) );
			return 1;
		}
		return 0;
		unguard;
	}
Okay relevant code is inside the URenderDevice implementations. One way would be to keep the Driver and derive from OpenGLDrv or D3DDrv, override the exec function. And set this as the RenderDevice. Another way would be to modifiy / ask authors of Drivers to update this function (or maybe they already did).
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
CountD
Mole Person
Posts: 4
Joined: Sun Apr 07, 2013 4:38 pm

Re: Adding a new resolution to options menu?

Post by CountD »

No mods.
Yeah, it's the drivers. F*cking AMD. OpenGL experimental driver has 1080p in it, but the custom finished OpenGL renderer doesn't. Marvelous.
Oh well, I guess I'll stick to Kentie's Deus Exe.
G-Flex
Silhouette
Posts: 621
Joined: Mon Jul 11, 2011 10:16 pm

Re: Adding a new resolution to options menu?

Post by G-Flex »

It's less about the drivers "having" a given resolution and more about the fact that Deus Ex won't bother to list more than 16 of them, leaving you at the mercy of whatever order they're chosen in.
Post Reply