From b85d84c9ddb9d501e571c404e0c89985afb8235d Mon Sep 17 00:00:00 2001 From: Marianne Gagnon Date: Thu, 23 Mar 2017 21:02:16 -0400 Subject: [PATCH] Remove outdated Apple-specific code --- src/states_screens/dialogs/debug_slider.cpp | 6 ------ src/states_screens/dialogs/debug_slider.hpp | 4 ---- src/utils/debug.cpp | 4 ---- 3 files changed, 14 deletions(-) diff --git a/src/states_screens/dialogs/debug_slider.cpp b/src/states_screens/dialogs/debug_slider.cpp index 464977cb3..23dd0da74 100644 --- a/src/states_screens/dialogs/debug_slider.cpp +++ b/src/states_screens/dialogs/debug_slider.cpp @@ -39,7 +39,6 @@ DebugSliderDialog::DebugSliderDialog() : ModalDialog(0.85f, 0.25f, MODAL_DIALOG_ loadFromFile("debug_slider.stkgui"); } -#if !defined(__APPLE__) void DebugSliderDialog::setSliderHook(std::string id, unsigned min, unsigned max, std::function G, std::function S) { getWidget(id.c_str())->setValue(G()); @@ -47,7 +46,6 @@ void DebugSliderDialog::setSliderHook(std::string id, unsigned min, unsigned max getWidget(id.c_str())->setMax(max); Setters[id] = S; } -#endif // ------------------------------------------------------------------------------------------------------ @@ -66,7 +64,6 @@ void DebugSliderDialog::onEnterPressedInternal() GUIEngine::EventPropagation DebugSliderDialog::processEvent(const std::string& eventSource) { -#if !defined(__APPLE__) if (Setters.find(eventSource) == Setters.end()) return GUIEngine::EVENT_LET; @@ -74,9 +71,6 @@ GUIEngine::EventPropagation DebugSliderDialog::processEvent(const std::string& e Log::info("DebugSlider", "Value for <%s> : %i", eventSource.c_str(), value); Setters[eventSource](value); return GUIEngine::EVENT_BLOCK; -#else - return GUIEngine::EVENT_LET; -#endif } // ------------------------------------------------------------------------------------------------------ diff --git a/src/states_screens/dialogs/debug_slider.hpp b/src/states_screens/dialogs/debug_slider.hpp index 8e0768db6..36b5dba84 100644 --- a/src/states_screens/dialogs/debug_slider.hpp +++ b/src/states_screens/dialogs/debug_slider.hpp @@ -33,17 +33,13 @@ class DebugSliderDialog : public GUIEngine::ModalDialog private: std::string m_id; -#if !defined(__APPLE__) std::map >Setters; -#endif public: DebugSliderDialog(); ~DebugSliderDialog() {}; -#if !defined(__APPLE__) void setSliderHook(std::string id, unsigned min, unsigned max, std::function G, std::function S); -#endif void changeLabel(std::string id, std::string new_label); virtual void onEnterPressedInternal() OVERRIDE; diff --git a/src/utils/debug.cpp b/src/utils/debug.cpp index 4d8c2d873..2c0826139 100644 --- a/src/utils/debug.cpp +++ b/src/utils/debug.cpp @@ -543,7 +543,6 @@ bool handleContextMenuAction(s32 cmd_id) break; case DEBUG_VISUAL_VALUES: { -#if !defined(__APPLE__) DebugSliderDialog *dsd = new DebugSliderDialog(); dsd->setSliderHook("red_slider", 0, 255, [](){ return int(irr_driver->getAmbientLight().r * 255.f); }, @@ -578,12 +577,10 @@ bool handleContextMenuAction(s32 cmd_id) [](){ return int(irr_driver->getSSAOSigma() * 10.f); }, [](int v){irr_driver->setSSAOSigma(v / 10.f); } ); -#endif } break; case DEBUG_ADJUST_LIGHTS: { -#if !defined(__APPLE__) // Some sliders use multipliers because the spinner widget // only supports integers DebugSliderDialog *dsd = new DebugSliderDialog(); @@ -637,7 +634,6 @@ bool handleContextMenuAction(s32 cmd_id) [](int v){ findNearestLight()->setRadius(float(v)); } ); dsd->changeLabel("SSAO Sigma", "[None]"); -#endif break; } case DEBUG_SCRIPT_CONSOLE: