diff --git a/CHANGELOG.md b/CHANGELOG.md index 232563988..918fa9d5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix issue where empty project message would be positioned incorrectly if World view was scrolled or zoomed - Fix issue where World view minimum size wasn't taking into account navigator sidebar or debugger pane causing unnecessary scroll bars - Fix issue where Math Expression editor would incorrectly show spellcheck errors in function names +- Fix issue building game when Super GB Mode was enabled before setting Color Mode to "Color Only" ## [4.0.0-beta2] diff --git a/src/lib/compiler/makeBuild.ts b/src/lib/compiler/makeBuild.ts index 920b7f5cf..330793af7 100755 --- a/src/lib/compiler/makeBuild.ts +++ b/src/lib/compiler/makeBuild.ts @@ -37,6 +37,7 @@ const makeBuild = async ({ const env = Object.create(process.env); const { settings } = data; const colorEnabled = settings.colorMode !== "mono"; + const sgbEnabled = settings.sgbEnabled && settings.colorMode !== "color"; const targetPlatform = buildType === "pocket" ? "pocket" : "gb"; const buildToolsPath = await ensureBuildTools(tmpPath); @@ -56,7 +57,7 @@ const makeBuild = async ({ if (colorEnabled) { env.COLOR = true; } - if (settings.sgbEnabled && settings.colorMode !== "color") { + if (sgbEnabled) { env.SGB = true; } if (settings.batterylessEnabled) { @@ -84,7 +85,7 @@ const makeBuild = async ({ // Compile Source Files const makeCommands = await getBuildCommands(buildRoot, { colorEnabled, - sgb: settings.sgbEnabled, + sgb: sgbEnabled, musicDriver: settings.musicDriver, batteryless: settings.batterylessEnabled, debug, @@ -164,7 +165,7 @@ const makeBuild = async ({ data.name || "GBStudio", settings.cartType, colorEnabled, - settings.sgbEnabled, + sgbEnabled, settings.musicDriver, debug, targetPlatform diff --git a/src/main.ts b/src/main.ts index 9811c7f08..54ba68d55 100755 --- a/src/main.ts +++ b/src/main.ts @@ -1202,7 +1202,8 @@ ipcMain.handle( const projectRoot = Path.dirname(projectPath); const outputRoot = Path.normalize(`${getTmp()}/${buildUUID}`); const colorMode = project.settings.colorMode; - const sgbEnabled = project.settings.sgbEnabled; + const sgbEnabled = + project.settings.sgbEnabled && project.settings.colorMode !== "color"; const debuggerEnabled = options.debugEnabled || project.settings.debuggerEnabled;