diff --git a/Screenshot/ModEntry.cs b/Screenshot/ModEntry.cs index f1c1ed24..cceea564 100644 --- a/Screenshot/ModEntry.cs +++ b/Screenshot/ModEntry.cs @@ -61,12 +61,15 @@ private void Input_ButtonPressed(object sender, StardewModdingAPI.Events.ButtonP if (!Directory.Exists(Config.ScreenshotFolder)) Directory.CreateDirectory(Config.ScreenshotFolder); - Color[] data = new Color[Game1.viewport.Width * Game1.viewport.Height]; + var width = Game1.graphics.GraphicsDevice.PresentationParameters.BackBufferWidth; + var height = Game1.graphics.GraphicsDevice.PresentationParameters.BackBufferHeight; + + Color[] data = new Color[width * height]; Game1.graphics.GraphicsDevice.GetBackBufferData(data); - Texture2D tex = new Texture2D(Game1.graphics.GraphicsDevice, Game1.viewport.Width, Game1.viewport.Height); + Texture2D tex = new Texture2D(Game1.graphics.GraphicsDevice, width, height); tex.SetData(data); Stream stream = File.Create(Path.Combine(Config.ScreenshotFolder, screenshot_name)); - tex.SaveAsPng(stream, tex.Width, tex.Height); + tex.SaveAsPng(stream, width, height); stream.Close(); if(Config.Message.Length > 0) diff --git a/Screenshot/manifest.json b/Screenshot/manifest.json index 0018529e..3fbdc5c1 100644 --- a/Screenshot/manifest.json +++ b/Screenshot/manifest.json @@ -1,7 +1,7 @@ { "Name": "Screenshot", "Author": "aedenthorn", - "Version": "0.1.1", + "Version": "0.2.0", "Description": "Screenshot.", "UniqueID": "aedenthorn.Screenshot", "EntryDll": "Screenshot.dll", diff --git a/_releases/Screenshot 0.2.0.zip b/_releases/Screenshot 0.2.0.zip new file mode 100644 index 00000000..a63f88d3 Binary files /dev/null and b/_releases/Screenshot 0.2.0.zip differ