Open nolekev1214 opened 8 years ago
So I looked into this and it's a pretty silly bug. I think Nucleus writes ResX & ResY to WillowEngine.ini as it launches each instance but this isn't reliable & they all get the first instance's res. Easy fix: put ResX & ResY in the command arguments instead. I'm too lazy to make a commit. ¯(ツ)/¯
In Borderlands2.js, comment out these lines
//new Nucleus.IniSaveInfo("SystemSettings", "ResX", Context.Width),
//new Nucleus.IniSaveInfo("SystemSettings", "ResY", Context.Height),
I cleaned up the arguments line & added res:
Context.StartArguments = "-windowed ResX=" + Context.Width + " ResY=" + Context.Height + " -AlwaysFocus -nostartupmovies -SaveDataId=" + Context.Options["saveid" + Context.PlayerId];
if (Context.IsKeyboardPlayer)
Context.StartArguments += " -NoController";
I did what you said and put the context.set... after the controller if statement and nothing changed. Any Idea?
I don't quite understand the instructions.
I edited the first two lines, nothing changed. Then I copied the lines you posted below, and still the same.
could somone please elaborate on what she ment by
I cleaned up the arguments line & added res:
Context.StartArguments = "-windowed ResX=" + Context.Width + " ResY=" + Context.Height + " -AlwaysFocus -nostartupmovies -SaveDataId=" + Context.Options["saveid" + Context.PlayerId];
if (Context.IsKeyboardPlayer)
Context.StartArguments += " -NoController";
What was implied but perhaps unclear to some is that she meant for us to comment out the arguments lines and use the "cleaned up" lines provided:
// if (Context.IsKeyboardPlayer) {
// Handler.StartPlayTick(1, function () {
// Handler.CenterCursor();
// });
// Context.StartArguments = "-windowed -AlwaysFocus -NoController -nostartupmovies -SaveDataId=" + Context.Options[playerStr];
// }
// else {
// Context.StartArguments = "-windowed -AlwaysFocus -nostartupmovies -SaveDataId=" + Context.Options[playerStr];
// }
Context.StartArguments = "-windowed ResX=" + Context.Width + " ResY=" + Context.Height + " -AlwaysFocus -nostartupmovies -SaveDataId=" + Context.Options["saveid" + Context.PlayerId];
if (Context.IsKeyboardPlayer)
Context.StartArguments += " -NoController";
EDIT: It worked great for me, thanks Aetha! EDIT 2: Just kidding, the code didn't keep the save files for me. I ended up just pasting the relevant part in like this:
if (Context.IsKeyboardPlayer) {
Handler.StartPlayTick(1, function () {
Handler.CenterCursor();
});
Context.StartArguments = "-windowed ResX=" + Context.Width + " ResY=" + Context.Height + " -windowed -AlwaysFocus -NoController -nostartupmovies -SaveDataId=" + Context.Options[playerStr];
}
else {
Context.StartArguments = "-windowed ResX=" + Context.Width + " ResY=" + Context.Height + " -windowed -AlwaysFocus -nostartupmovies -SaveDataId=" + Context.Options[playerStr];
}
When setting two players to monitors of different resolutions. The resolution of the primary monitor is used causing the secondary screen to have a cut off image. Game = Borderlands 2