bjorn98009_91 wrote:If the routine never reports too large values, then it should be good. If you have a multi-monitor setup and it fails to detect the total resolution and only take the resolution of the primary monitor it should still be good.
I may do a little stub installer that does nothing but call this just so others can test it. Anyway, here's what I'm doing now:
Code: Select all
hwnd := GetDesktopWindow;
hDC := GetDC(hWnd);
xres := GetDeviceCaps(hDC, HORZRES);
yres := GetDeviceCaps(hDC, VERTRES);
bitdepth := GetDeviceCaps(hDC, BITSPIXEL);
ReleaseDC(hWnd, hDC);
The big thing is that I figured out how to do OS API calls from the installer script, and that's what these are. It's pulling the dimensions and bitdepth of the current desktop window into xres, yres, and bitdepth so it can write those to deusex.ini. Basically, the current resolution of the desktop window becomes the settings for Deus Ex. I don't know if that pulls the total resolution or just one monitor, but all I know is that it's working here.
Reading a little more documentation reveals that this pulls from the "primary monitor", which may be sufficient. Hard to test these things without having this stuff here.
Hanfling wrote:I would suggest simply using the highest resolution which the renderer suggest. This could be added to the testrendev stuff.
You lost me. Is this code for Deus Ex itself or something I can use in an external installer? As many may have figured out, I've been trying to do a lot of work through the installer script to eliminate some of the manual labor in "modernizing" Deus Ex. The main thing is renderer installation, but I'm trying to think of other things that would be useful so things can be made easier and "nicer" out of the box.
That said, I haven't researched the renderer files much - if I can find the right functions, I can always load up the proper file and call those to get this information.