From 175ae1963ce139897a510c6958d2d65e3aa420b9 Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Wed, 22 Feb 2012 17:22:47 +0100 Subject: [PATCH] add screenshots folder if not exists --- Vocaluxe/Lib/Draw/CDirect3D.cs | 2 ++ Vocaluxe/Lib/Draw/CDrawWinForm.cs | 2 ++ Vocaluxe/Lib/Draw/COpenGL.cs | 2 ++ 3 files changed, 6 insertions(+) diff --git a/Vocaluxe/Lib/Draw/CDirect3D.cs b/Vocaluxe/Lib/Draw/CDirect3D.cs index d685857d..0715d792 100644 --- a/Vocaluxe/Lib/Draw/CDirect3D.cs +++ b/Vocaluxe/Lib/Draw/CDirect3D.cs @@ -461,6 +461,8 @@ namespace Vocaluxe.Lib.Draw { string file = "Screenshot_"; string path = Path.Combine(Environment.CurrentDirectory, CSettings.sFolderScreenshots); + if (!Directory.Exists(path)) + Directory.CreateDirectory(path); int i = 0; while (File.Exists(Path.Combine(path, file + i.ToString("00000") + ".bmp"))) diff --git a/Vocaluxe/Lib/Draw/CDrawWinForm.cs b/Vocaluxe/Lib/Draw/CDrawWinForm.cs index 6e71cca8..6b64e1fc 100644 --- a/Vocaluxe/Lib/Draw/CDrawWinForm.cs +++ b/Vocaluxe/Lib/Draw/CDrawWinForm.cs @@ -300,6 +300,8 @@ namespace Vocaluxe.Lib.Draw { string file = "Screenshot_"; string path = Path.Combine(Environment.CurrentDirectory, CSettings.sFolderScreenshots); + if (!Directory.Exists(path)) + Directory.CreateDirectory(path); int i = 0; while (File.Exists(Path.Combine(path, file + i.ToString("00000") + ".png"))) diff --git a/Vocaluxe/Lib/Draw/COpenGL.cs b/Vocaluxe/Lib/Draw/COpenGL.cs index 5be7ac4d..88f8cb18 100644 --- a/Vocaluxe/Lib/Draw/COpenGL.cs +++ b/Vocaluxe/Lib/Draw/COpenGL.cs @@ -556,6 +556,8 @@ namespace Vocaluxe.Lib.Draw { string file = "Screenshot_"; string path = Path.Combine(Environment.CurrentDirectory, CSettings.sFolderScreenshots); + if (!Directory.Exists(path)) + Directory.CreateDirectory(path); int i = 0; while (File.Exists(Path.Combine(path, file + i.ToString("00000") + ".bmp")))