# HG changeset patch # User Mitchell Kember # Date 1354236258 18000 # Node ID f3ba33d5d2b15087dd8c3c4cb4fd4a4d1d6c582f # Parent b10219ef05d35ab6ca1438603d9f6e0cc20405fe Google Code-in: Hide "video record" keybind option Removes the recording keybinding option using preprocessor conditions when it is unavailable. This includes when Hedgewars is being built either with the recording feature explicitly disabled or when FFMPEG/LibAV were not found. https://google-melange.appspot.com/gci/task/view/google/gci2012/7948213 diff -r b10219ef05d3 -r f3ba33d5d2b1 QTfrontend/CMakeLists.txt --- a/QTfrontend/CMakeLists.txt Thu Nov 29 14:48:38 2012 -0500 +++ b/QTfrontend/CMakeLists.txt Thu Nov 29 19:44:18 2012 -0500 @@ -20,6 +20,9 @@ find_package(SDL_net REQUIRED) #network frontlib if(NOT NOVIDEOREC) find_package(FFMPEG) + if(${FFMPEG_FOUND}) + add_definitions(-DUSE_VIDEO_RECORDING) + endif() endif() include_directories(.) diff -r b10219ef05d3 -r f3ba33d5d2b1 QTfrontend/binds.cpp --- a/QTfrontend/binds.cpp Thu Nov 29 14:48:38 2012 -0500 +++ b/QTfrontend/binds.cpp Thu Nov 29 19:44:18 2012 -0500 @@ -66,5 +66,7 @@ {"fullscr", "f12", QT_TRANSLATE_NOOP("binds", "change mode"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Toggle fullscreen mode:")}, {"capture", "c", QT_TRANSLATE_NOOP("binds", "capture"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Take a screenshot:")}, {"rotmask", "delete", QT_TRANSLATE_NOOP("binds", "hedgehogs\ninfo"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Toggle labels above hedgehogs:")}, +#ifdef USE_VIDEO_RECORDING {"record", "r", QT_TRANSLATE_NOOP("binds", "record"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Record video:")} +#endif }; diff -r b10219ef05d3 -r f3ba33d5d2b1 QTfrontend/binds.h --- a/QTfrontend/binds.h Thu Nov 29 14:48:38 2012 -0500 +++ b/QTfrontend/binds.h Thu Nov 29 19:44:18 2012 -0500 @@ -21,7 +21,11 @@ #include +#ifdef USE_VIDEO_RECORDING #define BINDS_NUMBER 46 +#else +#define BINDS_NUMBER 45 +#endif struct BindAction {