From 6290f18742b4b368932cc64ac07a29d491f19cb8 Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 11 Jun 2020 16:42:54 -0300 Subject: [PATCH] Fix Screenshot command compilation when ENABLE_STEAM is undefined --- src/app/commands/screenshot.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/commands/screenshot.cpp b/src/app/commands/screenshot.cpp index 2af92ce97..d8bbcbe11 100644 --- a/src/app/commands/screenshot.cpp +++ b/src/app/commands/screenshot.cpp @@ -116,8 +116,8 @@ void ScreenshotCommand::onExecute(Context* ctx) if (params().srgb()) cmd::convert_color_profile(spr, gfx::ColorSpace::MakeSRGB()); - if (params().steam()) { #ifdef ENABLE_STEAM + if (params().steam()) { if (auto steamAPI = steam::SteamAPI::instance()) { // Get image again (cmd::convert_color_profile() might have changed it) img = cel->image(); @@ -141,8 +141,8 @@ void ScreenshotCommand::onExecute(Context* ctx) if (steamAPI->writeScreenshot(&rgbBuffer[0], rgbBuffer.size(), w*scale, h*scale)) return; } -#endif } +#endif if (params().save()) { save_document(ctx, doc.get()); @@ -156,9 +156,12 @@ void ScreenshotCommand::onExecute(Context* ctx) std::string ScreenshotCommand::onGetFriendlyName() const { std::string name; +#ifdef ENABLE_STEAM if (params().steam()) name = Strings::commands_Screenshot_Steam(); - else if (params().save()) + else +#endif + if (params().save()) name = Strings::commands_Screenshot_Save(); else name = Strings::commands_Screenshot_Open();