From 8a6d3173bd4b00a62a0336adbce546e7680a0fe7 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 15 Dec 2018 15:20:27 +0100 Subject: [PATCH] more guards for CAP_SHOT/CAP_FILES --- config.cpp | 6 +++++- control.cpp | 2 ++ screenshot.cpp | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/config.cpp b/config.cpp index a569d352..9a988f99 100644 --- a/config.cpp +++ b/config.cpp @@ -318,6 +318,7 @@ void initConfig() { addsaver(crystal::compass_probability, "compass-probability"); addsaver(crystal::view_coordinates, "crystal-coordinates"); + #if CAP_SHOT addsaver(shot::shotx, "shotx"); addsaver(shot::shoty, "shoty"); addsaver(shot::make_svg, "shotsvg"); @@ -325,6 +326,7 @@ void initConfig() { addsaver(shot::gamma, "shotgamma"); addsaver(shot::caption, "shotcaption"); addsaver(shot::fade, "shotfade"); + #endif #if CAP_TEXTURE addsaver(texture::texture_aura, "texture-aura", false); @@ -1870,8 +1872,10 @@ unordered_map params = { {"spiralx", conformal::spiral_x}, {"spiraly", conformal::spiral_y}, {"cprob", crystal::compass_probability}, + #if CAP_SHOT {"gamma", shot::gamma}, - {"fade", shot::fade} + {"fade", shot::fade}, + #endif }; } diff --git a/control.cpp b/control.cpp index f3d14f34..7a656f4a 100644 --- a/control.cpp +++ b/control.cpp @@ -327,7 +327,9 @@ void handleKeyNormal(int sym, int uni) { uni = sym = 0; } + #if CAP_SHOT if(uni == 'A') { pushScreen(shot::menu); uni = sym = 0; } + #endif if(DEFAULTNOR(sym)) handlePanning(sym, uni); diff --git a/screenshot.cpp b/screenshot.cpp index d081a86f..39033b22 100644 --- a/screenshot.cpp +++ b/screenshot.cpp @@ -656,7 +656,7 @@ void rollback() { } } -#if CAP_FILES +#if CAP_FILES && CAP_SHOT string animfile = "animation-%04d.png"; bool record_animation() { @@ -896,7 +896,7 @@ void show() { dialog::addBoolItem(XLAT("history mode"), (conformal::on || conformal::includeHistory), 'h'); dialog::add_action([] () { pushScreen(conformal::history_menu); }); - #if CAP_SHOT + #if CAP_FILES && CAP_SHOT dialog::addItem(XLAT("shot settings"), 's'); dialog::add_action([] () { pushScreen(shot::menu); });