Jump to content

[KSP 1.4.5, 1.4.3, 1.2.2, 1.2.1, 1.2, 1.1.x, 1.0.x, 0.90 windows] true / exclusive fullscreen, shadowplay and gsync solution


Recommended Posts

Related issues:

http://forum.kerbalspaceprogram.com/threads/104708-Anyone-else-having-issues-that-seem-to-be-related-to-full-screen-%28shadowplay-gsynch%29

http://forum.kerbalspaceprogram.com/threads/103535-After-update-shadowplay-does-not-record-the-game-anymore-%28still-works-on-0-25%29

Since 0.90 KSP on windows does not use true (exclusive) fullscreen mode due to changes in unity. This causes screen tearing issues without aero (win7) and some loss of performance.

I have found a way to enable true exclusive fullscreen mode again by modifying the file KSP_Data\mainData (KSP_x64_Data\mainData for 64 bit and KSP_x64_Data\globalgamemanagers since 1.2)  .

Distribution of this file is not permitted, so you have to do this modification yourself with a hex editor or use my patcher below:

  1. Back up your KSP_Data\mainData
  2. For KSP 1.0.5, 1.0.4, 1.0.3, 1.0.2, 1.0.1, 1.0.0: change byte at offset 109C from 1 to 0.
    For KSP 0.90: change byte at offset 1098 from 1 to 0.
    For KSP 1.1.0, 1.1.1 change byte at offset 4044 from 1 to 0. For 64bit the mainData file is in KSP_x64_Data, not KSP_Data.
    For KSP 1.1.2, 1.1.3 change byte at offset 3f24 from 1 to 0. For 64bit the mainData file is in KSP_x64_Data, not KSP_Data.
    For KSP 1.2, 1.2.1, 1.2.2 change byte at offset 10e0 from 1 to 0 in file globalgamemanagers. For 64bit the globalgamemanagers file is in KSP_x64_Data, not KSP_Data.
    For KSP 1.4.3, 1.4.5 change byte at offset 1180 from 1 to 0 in file globalgamemanagers. For 64bit the globalgamemanagers file is in KSP_x64_Data, not KSP_Data.
    I gave the offsets (address of byte to change in the file) in hexadecimal..

NOTE: only do this if you know what true/exclusive fullscreen mode is. This may cause issues when using alt-tab.
Since KSP 1.1.0 I can not alt-tab back into the game on Windows 7 if it's patched to exclusive fullscreen mode. It seems alt-tab works again since 1.1.1.
1.2.2 on Win7: minor glitch in main menu: menu text becomes hidden after alt-tabbing and back. Did not try playing actual game.

KSP will not run in the background after the modification.

*** The patcher ***

If you can not use a hex editor you can use the patcher I made.

Download ksp-fullscreenfix.exe from GitHub: https://github.com/jazzkutya/ksp-fullscreenfix/releases/latest * updated for 1.4.5 *

Copy ksp-fullscreenfix.exe to top folder of your KSP installation (not into GameData), and run it from there.

Also see the README on GitHub: https://github.com/jazzkutya/ksp-fullscreenfix

The patcher supports KSP 0.90.0, 1.0.0, 1.0.2, 1.0.4, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.2.0, 1.2.1, 1.2.2, 1.4.3, 1.4.5

LICENSES

The patcher is released under the same license as perl 5 itself. Quote:

Quote
Copyright 2015-2016 by Karoly Segesdi <jazzkutya at gmail>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

https://github.com/jazzkutya/ksp-fullscreenfix/blob/master/LICENSE

The patcher includes binary code from Perl 5 and Par-Packer.

Par-Packer and Perl license permit this (quote from Par-Packer documentation):

Quote
Copyright 2002-2009 by Audrey Tang <[email protected]>.

Neither this program nor the associated parl program impose any licensing restrictions on files generated by their execution, in accordance with the 8th article of the Artistic License:

"Aggregation of this Package with a commercial distribution is

always permitted provided that the use of this Package is embedded;

that is, when no overt attempt is made to make this Package's

interfaces visible to the end user of the commercial distribution.

Such use shall not be construed as a distribution of this Package." Therefore, you are absolutely free to place any license on the resulting executable, as long as the packed 3rd-party libraries are also available under the Artistic License.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Edited by jazzkutya
updated for KSP 1.4.5
Link to comment
Share on other sites

Hi jazzkutya, and welcome to the forums!

Redistributing modified files outside of those stored in the GameData folder is not permitted, I'm afraid. Thankfully, it looks like your fix is simple enough that just about anyone could do it.

I know some people have lamented the loss of true fullscreen mode, both for performance reasons and because it interferes with some recording software. Well done and thanks for sharing.

Link to comment
Share on other sites

You have no idea how much that fix helps me.

You deserve all the reps.

It works flawlessly, and it also fixes the shadowplay recording issue for laptops (already tested).

You should add to the OP that it fixes the shadowplay problem, I am sure it will be important for a lot of people.

Thanks for sharing this fix.

Edit: by the way, I will be able to help a lot of people due to this fix :)

Edited by tetryds
Link to comment
Share on other sites

  • 2 weeks later...
Hi, I have the same problem - but I'm not sure what you mean by the 1098h - (no h in haxadecimal?) I'm trying to utilise NotePad++ as my hexeditor. Can you please point me in the right direction?

Peace.

h means dec.

Use a decimal editor, you will have the numbers grouped, and an indicator number on the side.

Find 1090, then count from the left to right.

first is zero, second is one, the eight is the one that you want, it should be a "01" (close to it, on the same line, there is a 02, for faster spotting).

Replace it with a "00", and save the file, then run the game.

Link to comment
Share on other sites

h means dec... Find 1090, then count from the left to right... first is zero, second is one, the eight is the one that you want, it should be a "01"...Replace it with a "00", and save the file, then run the game.

Awesome, that was very helpful! However, Shadowplay is still not recording. It does come up with the frame rate, but no recording icon. It doesn't save any recording nor seem to use the temp folder either.

Does anyone have a solution?

Edited by theJesuit
Added a question
Link to comment
Share on other sites

Awesome, that was very helpful! However, Shadowplay is still not recording. It does come up with the frame rate, but no recording icon. It doesn't save any recording nor seem to use the temp folder either.

Does anyone have a solution?

Make sure that on the settings you turn on Fullscreen mode.

Also, only change that with the game closed.

It's strange, did you verify if you have real fullscreen now?

You can record other games using shadowplay, right?

Oh, and the value may be on a different place for every KSP version.

Link to comment
Share on other sites

Thanks tetryds,

Yes, I'm in fullscreen (how can you tell if it is real or not?), and I was changing settings with the launcher AND with the hex edit - not in the game, oh and through the NVIDIA optimisation tool.

But I don' play other games! Ultimately I upgraded my laptop end of last year. My previous one struggled with frame rate somewhat, which wasn't conducive when I was doing tests on making a cinematic. I hadn't gone back to OBS because of the frame rate issue and since I had the option of Shadowplay it seemed like a good idea to use it! I've now given up on it and OBS is working sweet anyways. Doing very well. Thank God for the fancy pants laptop!

Peace.

Link to comment
Share on other sites

Thanks tetryds,

Yes, I'm in fullscreen (how can you tell if it is real or not?), and I was changing settings with the launcher AND with the hex edit - not in the game, oh and through the NVIDIA optimisation tool.

But I don' play other games! Ultimately I upgraded my laptop end of last year. My previous one struggled with frame rate somewhat, which wasn't conducive when I was doing tests on making a cinematic. I hadn't gone back to OBS because of the frame rate issue and since I had the option of Shadowplay it seemed like a good idea to use it! I've now given up on it and OBS is working sweet anyways. Doing very well. Thank God for the fancy pants laptop!

Peace.

Nonono, you cannot try to force fullscreen by any other means, it's not going to work, and probably going to reset/ignore your manual input on the Hex.

You can tell it's fullscreen or not if shadowplay manages to record the game (don't set it to OpenGL, btw.).

Another way to notice if it's true fullscreen is opening a skype call, if the skype window shows up on the top of the game, it's not true fullscreen.

You can also alt+tab and try to notice if the game was frozen and blinks, which it does on true fullscreen.

On true fullscreen, the game will never run on the background, that is the exact problem this unity wacky workaround was made for.

Changing the Hex value is not a hack or anything, it's just changing a setting that you are unable to change from inside of the game.

I have already tried forcing fullscreen by any other possible means, but this is the only way which actually worked.

I don't understand why you can't toggle the fullscreen on, even if you are not going to use shadowplay it's very good to do that, it improves framerate a LOT, and fixes a lot of discomforts.

Link to comment
Share on other sites

I just tried the Skype before I had work away from the laptop. Windows 8 bundled skype wouldnt work anyhow so havent downloaded desktop version.

However I do remember the 'blink' from my old laptop. This certainly doesn't do that, and it may have been KSP.25. I've checked the hex editor and still showing up the corrected info. Still no go.

Link to comment
Share on other sites

I just tried the Skype before I had work away from the laptop. Windows 8 bundled skype wouldnt work anyhow so havent downloaded desktop version.

However I do remember the 'blink' from my old laptop. This certainly doesn't do that, and it may have been KSP.25. I've checked the hex editor and still showing up the corrected info. Still no go.

Hi theJesuit,

KSP version is very important. Please check what version you are using and report it here.

If you are using 0.25 i may help you sometime but we have to conduct a (preferably chat only, no voice) session on skype. But since i am very rarely on skype we should meet in steam chat first (assuming you are also on steam).

So first report the KSP version, then we will see about a possible help chat session.

Win8 may have something to do with this, i don't know, i never use and don't want to use 8. Tetryds, what version of windows are you using?

Link to comment
Share on other sites

I am also having the same problem as Krakenfour, I am in Windows 8.1 on a laptop and have KSP 1.0 in Steam. I have tried the original solution, changing 000109C to a 0 from 1. I launched and there was no change (No 'blink' when alt-tabbing and ShadowPlay doesn't work) I made sure that all my in-game settings were correct, full screen ticked and background processing off. My ShadowPlay FPS counter comes up but when I hit the hotkey but no recording indicator showed up.

This is the unaltered file:

8

This is the change I made, the 1 to the 0 at 109C:

8

Link to comment
Share on other sites

I am also having the same problem as Krakenfour, I am in Windows 8.1 on a laptop and have KSP 1.0 in Steam. I have tried the original solution, changing 000109C to a 0 from 1. I launched and there was no change (No 'blink' when alt-tabbing and ShadowPlay doesn't work) I made sure that all my in-game settings were correct, full screen ticked and background processing off. My ShadowPlay FPS counter comes up but when I hit the hotkey but no recording indicator showed up.

This is the unaltered file:

http://tinypic.com/r/2cqohed/8

This is the change I made, the 1 to the 0 at 109C:

http://tinypic.com/r/k1rk8n/8

You don't change anything from 00 to 01, you only change one 01 to 00.

If 109C is not 01 then you should not switch it, and should look for a 02 00 00 00 01 nearby, then change that 01 to a 00 (if it's not 109C it's 1098).

Link to comment
Share on other sites

Here's a screenshot of the 109C hexadecimal position:

As you can see, it is already 00.

Ingame settings have Fullscreen ON and Background processing OFF.

This is strange. KSP 1.0 should have a mainData file of size 91520 bytes and the setting on 109C and 0.90 has a mainData file of size 74904 byes and the setting on 1098.

Link to comment
Share on other sites

Everyone having problems editing the file with a hex editor, look at the first post. I have updated it with a patcher I made that does the same as the hexediting i have described in the first post.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...