From 6a278dc81041f8d4be1ef71f71db212534e7a1ff Mon Sep 17 00:00:00 2001 From: Matt Thorson Date: Sun, 17 May 2020 19:45:26 -0700 Subject: [PATCH] Game.ContentRoot --- src/Core/Game.bf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Core/Game.bf b/src/Core/Game.bf index 182bcac..239f2e0 100644 --- a/src/Core/Game.bf +++ b/src/Core/Game.bf @@ -20,6 +20,7 @@ namespace Strawberry public readonly int Width; public readonly int Height; public readonly int WindowScale; + public readonly String ContentRoot; private Scene scene; private Scene switchToScene; @@ -44,9 +45,14 @@ namespace Strawberry Width = width; Height = height; WindowScale = windowScale; - screenRect = SDL.Rect(0, 0, width * windowScale, height * windowScale); +#if DEBUG + ContentRoot = "../../../src/Content/"; +#else + ContentRoot = "Content/"; +#endif + String exePath = scope .(); Environment.GetExecutableFilePath(exePath); String exeDir = scope .();