diff --git a/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_GdiPlus.cs b/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_GdiPlus.cs index 4ca67074c1..5f8a9adf51 100644 --- a/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_GdiPlus.cs +++ b/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_GdiPlus.cs @@ -163,8 +163,8 @@ namespace BizHawk.Client.EmuHawk public Texture2d LoadTexture(Stream stream) { - using (var bmp = new BitmapBuffer(stream, new BitmapLoadOptions())) - return (this as IGL).LoadTexture(bmp); + using var bmp = new BitmapBuffer(stream, new BitmapLoadOptions()); + return (this as IGL).LoadTexture(bmp); } public Texture2d CreateTexture(int width, int height) diff --git a/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_SlimDX9.cs b/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_SlimDX9.cs index 0265989e16..87aaaaa511 100644 --- a/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_SlimDX9.cs +++ b/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_SlimDX9.cs @@ -685,14 +685,14 @@ namespace BizHawk.Client.EmuHawk public Texture2d LoadTexture(sd.Bitmap bitmap) { - using (var bmp = new BitmapBuffer(bitmap, new BitmapLoadOptions())) - return (this as IGL).LoadTexture(bmp); + using var bmp = new BitmapBuffer(bitmap, new BitmapLoadOptions()); + return (this as IGL).LoadTexture(bmp); } public Texture2d LoadTexture(Stream stream) { - using (var bmp = new BitmapBuffer(stream, new BitmapLoadOptions())) - return (this as IGL).LoadTexture(bmp); + using var bmp = new BitmapBuffer(stream, new BitmapLoadOptions()); + return (this as IGL).LoadTexture(bmp); } public Texture2d CreateTexture(int width, int height) @@ -984,9 +984,5 @@ namespace BizHawk.Client.EmuHawk { dev.EndScene(); } - - - } //class IGL_SlimDX - } diff --git a/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_TK.cs b/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_TK.cs index 661ea836f3..190ff8fe11 100644 --- a/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_TK.cs +++ b/BizHawk.Client.EmuHawk/GraphicsImplementations/IGL_TK.cs @@ -481,14 +481,14 @@ namespace BizHawk.Client.EmuHawk public Texture2d LoadTexture(sd.Bitmap bitmap) { - using (var bmp = new BitmapBuffer(bitmap, new BitmapLoadOptions())) - return (this as IGL).LoadTexture(bmp); + using var bmp = new BitmapBuffer(bitmap, new BitmapLoadOptions()); + return (this as IGL).LoadTexture(bmp); } public Texture2d LoadTexture(Stream stream) { - using(var bmp = new BitmapBuffer(stream,new BitmapLoadOptions())) - return (this as IGL).LoadTexture(bmp); + using var bmp = new BitmapBuffer(stream,new BitmapLoadOptions()); + return (this as IGL).LoadTexture(bmp); } public Texture2d CreateTexture(int width, int height) @@ -601,8 +601,8 @@ namespace BizHawk.Client.EmuHawk public Texture2d LoadTexture(string path) { - using (var fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read)) - return (this as IGL).LoadTexture(fs); + using var fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read); + return (this as IGL).LoadTexture(fs); } public Matrix4 CreateGuiProjectionMatrix(int w, int h)