Upscaled windowed mode?

2

1

Since games still suck at alt-tabbing out of them, especially when playing in fullscreen, I'd like the idea of playing some of them windowed. The problem is, some of the games need to be played in 720p resolution, or they're too slow. 720p would make the game window quite small on my 27" 107dpi screen.

Is there a way to get an arbitrary Direct X (or OpenGL) window upscaled, to strain the GPU as little as possible, while getting a large enough surface area to look at?

PS: I was torn on whether I should post this on gaming or here, and ended up with this one.

Edit: To clarify, I'm not searching for the in-game resolution setting, but rather a method to get a game rendered in 720p resolution being upscaled to something larger - the same amount of resolution, but with more pixels in between. Like an image resize.

Henrik Paul

Posted 2011-12-21T17:11:25.550

Reputation: 550

Change the resolution of the desktop itself temporarily, then the game windows will be bigger? On a res change the video driver will do a full refresh, and the strain on the GPU will be even smaller than an interpolation. I have this favorited as I was interested in anything you found to solution this, because changing res messes with other full res windows of other types. – Psycogeek – 2012-01-01T15:22:35.100

Answers

1

I think you'll find that many DX/OpenGL games will automatically resize when the window is resized. Is this an issue of you just can't resize the windows to fill the screen, but would if you could, or you've tried changing the window size, and it breaks at anything other than 1280x720? If it's the former, I've got an AutoHotKey script for you.

Loop
{
SysGet MonPrim,Monitor
SysGet MonWidth,0
SysGet MonHeight,1
    IfWinActive, Sins of a Solar Empire
    {
        WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
        WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
    }
    IfWinActive, ahk_class Wolf2
    {
        WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
        WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
    }
    IfWinActive, ahk_class CoD4
    {
        WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
        WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
    }
    IfWinActive, ahk_class Skyrim
    {
        WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
        WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
    }
    IfWinActive, ahk_class Valve001
    {
        WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
        WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
    }

    IfWinActive, Need for Speed™ SHIFT
    {
        WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
        WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
    }
    IfWinActive, ahk_class FEAR
    {
        WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
        WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
    }
    IfWinActive, Bioshock
    {
        WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
        WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
    }
    IfWinActive, Torchlight
    {
        WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
        WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
    }
    IfWinActive, Dead Space
    {
        WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
        WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
    }
    IfWinActive, Borderlands
    {
        WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
        WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
    }
    IfWinActive, ahk_class Titan Quest: Immortal Throne
    {
        WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
        WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
    }
    IfWinActive, ahk_class The Witcher
    {
        WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
        WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
    }
    IfWinActive, Unreal Tournament 2004
    {
        WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
        WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
    }
    IfWinActive, Magicka
    {
        WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
        WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
    }
    IfWinActive, ahk_class Afx:00400000:0:00000000:01900011:00000000
    {
        WinSet, Style, -0xCF0000 ; remove the titlebar and border(s)
        WinMove, , , %MonPrimLeft%, %MonPrimTop%, %MonWidth%, %MonHeight% ; move the window to 0,0 and rseize it
    }
    Sleep 1000 ; 1 Second
}
return

This will take any windows that match one of the sections and force it fullscreen without a border, even if the game doesn't support it. Just set the game to windowed mode and it'll take care of the rest. You can use AutoHotKey's Window Spy to find out the window title / window class to add new games to it, I've included all of the games I usually run it with.

You can also change %MonWindth% or %MonHeight% to just numbers for a particular game if you want a different aspect ratio. Most games I've found work well with this script, though how a game reacts to it is entire up to it. The game could automatically scale, the game could just leave black space, it could crash; I've yet to see any of that with the games indicated above, though.

Darth Android

Posted 2011-12-21T17:11:25.550

Reputation: 35 133

1I tried your script, but bound it to activate on a key. On Skyrim specifically, it simply put the game window in the upper left corner, but everything else went black. So it didn't resize the window :(. I clarified my question a bit, btw. – Henrik Paul – 2011-12-21T23:55:50.523