Some fixes for start without config.xml, also fixes #77

This commit is contained in:
Florian Küpper committed 2015-12-06 11:42:07 +01:00
1 parent 9281cd1d35
commit c25157946e
2 files changed
+6 -2

No files matched your search

+5 -1
View File
@@ -324,11 +324,15 @@ namespace Vocaluxe.Base
else
Config = xml.DeserializeString<SConfig>("<root />");
if (Config.Game.SongFolder.Length > 0)
if (Config.Game.SongFolder.Length > 0 && Config.Game.SongFolder[0] != "")
{
SongFolders.Clear();
SongFolders.AddRange(Config.Game.SongFolder);
}
else
{
Config.Game.SongFolder = SongFolders.ToArray();
}
if ((Config.Game.ScoreAnimationTime > 0 && Config.Game.ScoreAnimationTime < 1) || Config.Game.ScoreAnimationTime < 0)
Config.Game.ScoreAnimationTime = 1;
+1 -1
View File
@@ -246,7 +246,7 @@ namespace Vocaluxe.Base
private static void _CreateFolder(string path)
{
if (!Directory.Exists(path))
if (path != "" && !Directory.Exists(path))
{
try
{