diff --git a/es-app/src/VolumeControl.cpp b/es-app/src/VolumeControl.cpp index 334987664..b072130a5 100644 --- a/es-app/src/VolumeControl.cpp +++ b/es-app/src/VolumeControl.cpp @@ -21,7 +21,7 @@ VolumeControl::VolumeControl() #if defined (__APPLE__) #error TODO: Not implemented for MacOS yet!!! #elif defined(__linux__) - , mixerIndex(0), mixerHandle(nullptr), mixerElem(nullptr), mixerSelemId(nullptr) + , mixerIndex(0), mixerHandle(nullptr), mixerElem(nullptr), mixerSelemId(nullptr) #elif defined(WIN32) || defined(_WIN32) , mixerHandle(nullptr), endpointVolume(nullptr) #endif @@ -32,7 +32,15 @@ VolumeControl::VolumeControl() originalVolume = getVolume(); } -VolumeControl::VolumeControl(const VolumeControl & right) +VolumeControl::VolumeControl(const VolumeControl & right): + originalVolume(0), internalVolume(0) +#if defined (__APPLE__) + #error TODO: Not implemented for MacOS yet!!! +#elif defined(__linux__) + , mixerIndex(0), mixerHandle(nullptr), mixerElem(nullptr), mixerSelemId(nullptr) +#elif defined(WIN32) || defined(_WIN32) + , mixerHandle(nullptr), endpointVolume(nullptr) +#endif { sInstance = right.sInstance; } diff --git a/es-core/src/Window.cpp b/es-core/src/Window.cpp index 4101df0df..97684dc91 100644 --- a/es-core/src/Window.cpp +++ b/es-core/src/Window.cpp @@ -335,8 +335,8 @@ void Window::setHelpPrompts(const std::vector& prompts, const HelpSt // yes, it has! // can we combine? (dpad only) - if((it->first == "up/down" && addPrompts.at(mappedTo->second).first == "left/right") || - (it->first == "left/right" && addPrompts.at(mappedTo->second).first == "up/down")) + if((strcmp(it->first, "up/down") == 0 && strcmp(addPrompts.at(mappedTo->second).first, "left/right")) || + (strcmp(it->first, "left/right") == 0 && strcmp(addPrompts.at(mappedTo->second).first, "up/down"))) { // yes! addPrompts.at(mappedTo->second).first = "up/down/left/right"; diff --git a/es-core/src/animations/LambdaAnimation.h b/es-core/src/animations/LambdaAnimation.h index 35e1f958a..afc7d8439 100644 --- a/es-core/src/animations/LambdaAnimation.h +++ b/es-core/src/animations/LambdaAnimation.h @@ -8,6 +8,8 @@ class LambdaAnimation : public Animation public: LambdaAnimation(const std::function& func, int duration) : mFunction(func), mDuration(duration) {} + virtual ~LambdaAnimation() = default; + int getDuration() const override { return mDuration; } void apply(float t) override diff --git a/es-core/src/components/ComponentGrid.cpp b/es-core/src/components/ComponentGrid.cpp index 89dd157cc..e35d9a572 100644 --- a/es-core/src/components/ComponentGrid.cpp +++ b/es-core/src/components/ComponentGrid.cpp @@ -430,15 +430,15 @@ std::vector ComponentGrid::getHelpPrompts() bool canScrollHoriz = mGridSize.x() > 1; for(auto it = prompts.begin(); it != prompts.end(); it++) { - if(it->first == "up/down/left/right") + if(strcmp(it->first, "up/down/left/right") == 0) { canScrollHoriz = false; canScrollVert = false; break; - }else if(it->first == "up/down") + }else if(strcmp(it->first, "up/down") == 0) { canScrollVert = false; - }else if(it->first == "left/right") + }else if(strcmp(it->first, "left/right") == 0) { canScrollHoriz = false; } diff --git a/es-core/src/components/ComponentList.cpp b/es-core/src/components/ComponentList.cpp index 9abd1ef8c..4c6ae96c7 100644 --- a/es-core/src/components/ComponentList.cpp +++ b/es-core/src/components/ComponentList.cpp @@ -319,7 +319,7 @@ std::vector ComponentList::getHelpPrompts() bool addMovePrompt = true; for(auto it = prompts.begin(); it != prompts.end(); it++) { - if(it->first == "up/down" || it->first == "up/down/left/right") + if(strcmp(it->first, "up/down") == 0 || strcmp(it->first, "up/down/left/right") == 0) { addMovePrompt = false; break; diff --git a/es-core/src/guis/GuiInputConfig.cpp b/es-core/src/guis/GuiInputConfig.cpp index e83e468fe..337c2ba7e 100644 --- a/es-core/src/guis/GuiInputConfig.cpp +++ b/es-core/src/guis/GuiInputConfig.cpp @@ -396,7 +396,7 @@ bool GuiInputConfig::assign(Input input, int inputId) // if this input is mapped to something other than "nothing" or the current row, error // (if it's the same as what it was before, allow it) - if(mTargetConfig->getMappedTo(input).size() > 0 && !mTargetConfig->isMappedTo(inputName[inputId], input) && inputName[inputId] != "HotKeyEnable") + if(mTargetConfig->getMappedTo(input).size() > 0 && !mTargetConfig->isMappedTo(inputName[inputId], input) && strcmp(inputName[inputId], "HotKeyEnable") != 0) { error(mMappings.at(inputId), "Already mapped!"); return false;