Knights of the Old Republic Misaligned Window

I’ve found that using SpecialK with Knights of the Old Republic is very necessary to smoothing out the framerate, even without the frame rate limiter. SpecialK can get the game into a bordered or borderless window which is much smoother than the game’s dodgy full screen implementation. The problem is that SpecialK can’t align the windows correctly when going borderless fullscreen. Either the game is bordered with some of the desktop visible around it (window resolution being reported at something like 1920x1061 rather than the 1920x1080 we want) or the game is borderless fullscreen with a black or pink border at the top, and a misaligned mouse cursor in game.

Note that I’m using an edited .exe which is essential for widescreen support, and it’s probably the hacked in widescreen which is causing these issues. Still would appreciate any help.

EDIT: Fixed the black box by deleting the entire specialk documents folder.

Now I have this black box and it won’t go away even if I delete the ini file…

Game is using a old version of OpenGL I believe, wonder if there’s a problem here with SpecialK if you’re using either SpecialK32.dll as OpenGL.dll in the game folder or running it via SKIF/SKIM.

Don’t think the newer builds touch OpenGL at all either so using the experimental versions won’t help much at all.

Setting a exception for the game in SpecialK if using SKIF might be the best without having to fully unload the injection and exit SKIF to not have SpecialK affect the game in any way.

There’s a few window overrides but I don’t know how well they would work, games 4:3 I presume and then the widescreen mod allows 16:9 support but it’s been years since I played the game myself and dabbled with compatibility and fan patches so I can’t say much or offer much help besides some general advice there. :slight_smile:

Well I don’t really want to unload SpecialK because like I said, it’s the only thing I’ve found to get a non exclusive fullscreen going which has far superior frame pacing to the game’s normal full screen. I just need the bordered full screen to actually be full screen.

Yeah I’m thinking Borderless Full Screen might work for that overriding windowed mode into borderless assuming scaling isn’t off which would make it pointless but then even with the OpenGL API SpecialK’s framerate limiter and other features might still be effective here for smoothness. :slight_smile:

KOTOR 2 but I am hoping the first game has similar settings.

For SpecialK the window borders can be taken off with this and then centering will try to keep the window centered.

[Window.System]
Borderless=true
Center=true
Fullscreen=false

Fullscreen to true might also work with borderless enabled to make it full-screen borderless.

I had a number of issues getting another game to accept this though it either cut off a few pixels at the bottom roughly where the task bar or start menu would be and then that squished the aspect ratio ever so slightly and going above 1920x1080 upscaled instead which looks terrible on a higher display monitor.

Had to give up and use windowed mode for that in the end.

Pretty sure the DXGI overrides don’t apply for OpenGL and trying to force a specific resolution with the window options could also end up affecting how it scales.

OverrideRes=0x0
(IE 1920x1080)

Making a custom resolution might be one method too but support for this can be a bit poor for some games or game engines and how this is handled.

For that box I wonder if that’s the SpecialK UI or OSD and how that draws under OpenGL now with the current versions, it should be supported I don’t believe that’s changed with ImGUI or CEGUI as not much has changed with OpenGL with the focus on D3D11 and supporting D3D12 but it looks like a SpecialK UI element failing to render correctly.

EDIT: I am on a AMD GPU as well so these and other old OGL titles have a variety of compatibility problems I think it’s working fairly well for NVIDIA but I am not 100% on SpecialK and the older 1.x versions of OpenGL should run but Kaldaien or someone more knowledgeable on this subject will have to give a more definitive answer on that than what I can provide.

Instructions in the comments of that post don’t work unfortunately. Gives me the same result as with specialk, looks like this:

I googled and seen a bunch of people say borderless with this game is just impossible, it might be possible with the sequel since that eventually had official widescreen support patched in. I’ve gotten it to a place where the microstutters aren’t especially noticeable so it’s ok I guess.

1 Like

Was hoping the two games wouldn’t be too dissimilar but I guess if so then Obsidian managed to include a few updates and other technical additions if this is something the sequel can handle or handle better at least since it looks incorrect in the first game or causes this border on the window from trying to override both the resolution limits and having a windowed borderless mode active.

That’s probably the EULA confirmation screen trying to display itself at a resolution < 720p. I’d just set ShowEULA=false in SK’s INI file, or do something about the really low resolution befoe injecting SK :slight_smile:

Using OverrideRes=1920x1080 should solve all of your problems.

If only it were so simple!
Just gives me the pink bar and misaligned mouse as in the image above.
Interestingly the size of the pink bar seems a little randomized each boot :face_with_monocle:
Game ini has Fullscreen = 0
I’ve attached SpecialK ini and logs.

CEGUI.log (65.7 KB) CEGUI.log (66.4 KB) crash.log (2.7 KB) dxgi_budget.log (705 Bytes) game_output.log (37.8 KB) modules.log (16.6 KB) SpecialK.log (14.6 KB) steam_api.log (122 Bytes) crash.log (169 Bytes) dxgi_budget.log (705 Bytes) game_output.log (47.3 KB) modules.log (16.4 KB) SpecialK.log (16.6 KB) steam_api.log (122 Bytes) SpecialK.ini (4.2 KB)

That’s some weird stuff going on in game_output.log.

That usually only happens when ReShade is present, but perhaps RTSS is causing it?

Also,

D:\Downloads\SpecialK (1)\PlugIns\ThirdParty\Steamworks\steam_api.dll
C:\Users*****\Documents\My Mods\SpecialK\Drivers\Dbghelp\dbghelp_sk32.dll
C:\Games\SpecialK (3)\SpecialK32.dll

You’ve got a million different copies of SK on your system :slight_smile:

Interesting, is it saying all of those are active at once? I did download it a few times to try and reset things before I realised settings are kept in the documents folder. Lol. Why do they show up in the logs? Is there something I should change? I’ll delete the folders in download.

I realise there is a second group of logs which are from the crash folder, you can ignore those. In a minute I’ll get new logs which might make more sense…

RTSS is in the tray because I also use MSI Afterburner, but I have it set to no application detection at the moment. So probably not RTSS?

Attached logs should be less weird…

I quit MSI Afterburner and RTSS but still seem to have same error in game_output.log.

CEGUI.log (65.7 KB) crash.log (165 Bytes) dxgi_budget.log (705 Bytes) game_output.log (47.3 KB) modules.log (15.9 KB) SpecialK.log (16.9 KB) steam_api.log (114 Bytes)
SpecialK.ini (4.2 KB)

Well well well… Don’t know why I didn’t try this before but RTSS with the game in exclusive fullscreen gives pretty much perfect framepacing to my eyes.

1 Like