Skip to content

Commit

Permalink
Added platform support for NVIDIA SHIELD. Fixes #9.
Browse files Browse the repository at this point in the history
  • Loading branch information
gibbed committed Oct 31, 2017
1 parent 7f36895 commit a334c91
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions projects/Gibbed.Borderlands2.FileFormats/PlatformHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public static Endian GetEndian(this Platform platform)
{
case Platform.PC:
case Platform.PSVita:
case Platform.Shield:
{
return Endian.Little;
}
Expand All @@ -60,6 +61,7 @@ public static CompressionScheme GetCompressionScheme(this Platform platform)

case Platform.PS3:
case Platform.PSVita:
case Platform.Shield:
{
return CompressionScheme.Zlib;
}
Expand Down
3 changes: 2 additions & 1 deletion projects/Gibbed.Borderlands2.FileFormats/SaveFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ private static bool IsSupportedPlatform(Platform platform)
{
return platform == Platform.PC ||
platform == Platform.X360 ||
platform == Platform.PS3 || platform == Platform.PSVita;
platform == Platform.PS3 || platform == Platform.PSVita ||
platform == Platform.Shield;
}

public void Serialize(Stream output)
Expand Down
1 change: 1 addition & 0 deletions projects/Gibbed.Borderlands2.GameInfo/Platform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public enum Platform
X360,
PS3,
PSVita,
Shield,
// ReSharper restore InconsistentNaming
}
}
7 changes: 5 additions & 2 deletions projects/Gibbed.Borderlands2.SaveEdit/SaveLoad.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ public IEnumerable<IResult> OpenFile(Action<string> fileNameAction, Action<Platf
.AddFilter("sav", this._FilterIndex == 3)
.WithDescription("PS3 Save Files")
.AddFilter("sav", this._FilterIndex == 4)
.WithDescription("PSVita Save Files"))
.WithDescription("PSVita Save Files")
.AddFilter("sav", this._FilterIndex == 5)
.WithDescription("NVIDIA SHIELD Save Files"))
.WithFileDo(s => fileName = s)
.WithFilterIndexDo(i => filterIndex = i);

Expand All @@ -98,10 +100,11 @@ public IEnumerable<IResult> OpenFile(Action<string> fileNameAction, Action<Platf
Platform.X360,
Platform.PS3,
Platform.PSVita,
Platform.Shield,
};

fileNameAction(fileName);
platformAction(filterIndex < 1 || filterIndex > 4
platformAction(filterIndex < 1 || filterIndex > 5
? Platform.PC
: platforms[filterIndex]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public GeneralViewModel()
new PlatformDisplay("360", Platform.X360),
new PlatformDisplay("PS3", Platform.PS3),
new PlatformDisplay("PSVita", Platform.PSVita),
new PlatformDisplay("NVIDIA SHIELD", Platform.Shield),
};
}

Expand Down

2 comments on commit a334c91

@Shmorp
Copy link

@Shmorp Shmorp commented on a334c91 Nov 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey sorry this has nothing to do with this specific post but im just really confunsed how to download and load up gibbed from this website. Can u explain how or link a video tutorial? When i looked it up it looked a lot esaier from the old website but im not too computer savvy. Thanks!

@gibbed
Copy link
Owner Author

@gibbed gibbed commented on a334c91 Nov 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.