mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Small optimization when opening the menu.
This commit is contained in:
parent
14e1b800fa
commit
c136f87a9f
|
@ -128,6 +128,10 @@ bool Window::init()
|
|||
mBackgroundOverlay->setResize(static_cast<float>(Renderer::getScreenWidth()),
|
||||
static_cast<float>(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<TextureResource> mPostprocessedBackground;
|
||||
mPostprocessedBackground = TextureResource::get("");
|
||||
unsigned char* processedTexture =
|
||||
new unsigned char[Renderer::getScreenWidth() * Renderer::getScreenHeight() * 4];
|
||||
|
||||
|
|
|
@ -167,6 +167,10 @@ private:
|
|||
|
||||
std::queue<std::pair<std::string, int>> mInfoPopupQueue;
|
||||
|
||||
#if defined(USE_OPENGL_21)
|
||||
std::shared_ptr<TextureResource> mPostprocessedBackground;
|
||||
#endif
|
||||
|
||||
std::string mListScrollText;
|
||||
std::shared_ptr<Font> mListScrollFont;
|
||||
unsigned char mListScrollOpacity;
|
||||
|
|
Loading…
Reference in a new issue