diff --git a/es-core/src/Window.cpp b/es-core/src/Window.cpp index 39c419136..68edeee2a 100644 --- a/es-core/src/Window.cpp +++ b/es-core/src/Window.cpp @@ -128,6 +128,10 @@ bool Window::init() mBackgroundOverlay->setResize(static_cast(Renderer::getScreenWidth()), static_cast(Renderer::getScreenHeight())); +#if defined(USE_OPENGL_21) + mPostprocessedBackground = TextureResource::get(""); +#endif + mListScrollFont = Font::get(FONT_SIZE_LARGE); // Update our help because font sizes probably changed. @@ -143,6 +147,10 @@ void Window::deinit() for (auto it = mGuiStack.cbegin(); it != mGuiStack.cend(); it++) (*it)->onHide(); +#if defined(USE_OPENGL_21) + mPostprocessedBackground.reset(); +#endif + InputManager::getInstance()->deinit(); ResourceManager::getInstance()->unloadAll(); #if defined(BUILD_VLC_PLAYER) @@ -429,9 +437,6 @@ void Window::render() #if (CLOCK_BACKGROUND_CREATION) const auto backgroundStartTime = std::chrono::system_clock::now(); #endif - - std::shared_ptr mPostprocessedBackground; - mPostprocessedBackground = TextureResource::get(""); unsigned char* processedTexture = new unsigned char[Renderer::getScreenWidth() * Renderer::getScreenHeight() * 4]; diff --git a/es-core/src/Window.h b/es-core/src/Window.h index d02ac3f31..a1c73d84e 100644 --- a/es-core/src/Window.h +++ b/es-core/src/Window.h @@ -167,6 +167,10 @@ private: std::queue> mInfoPopupQueue; +#if defined(USE_OPENGL_21) + std::shared_ptr mPostprocessedBackground; +#endif + std::string mListScrollText; std::shared_ptr mListScrollFont; unsigned char mListScrollOpacity;