mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-09-14 13:56:48 +08:00
Properly detect texture sizes so effects using smaller mask textures are properly applied
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
This commit is contained in:
parent
4e3254e843
commit
70d815c183
4
main.cpp
4
main.cpp
@ -386,6 +386,10 @@ int main (int argc, char* argv[])
|
||||
WallpaperEngine::Render::CWallpaper::fromWallpaper (project->getWallpaper (), containers, context)
|
||||
);
|
||||
|
||||
// update maximum FPS if it's a video
|
||||
if (context->getWallpaper ()->is <WallpaperEngine::Render::CVideo> () == true)
|
||||
maximumFPS = context->getWallpaper ()->as <WallpaperEngine::Render::CVideo> ()->getFPS ();
|
||||
|
||||
// TODO: FIGURE OUT THE REQUIRED INPUT MODE, AS SOME WALLPAPERS USE THINGS LIKE MOUSE POSITION
|
||||
// glfwSetInputMode (window, GLFW_STICKY_KEYS, GL_TRUE);
|
||||
|
||||
|
@ -22,9 +22,13 @@ CTexture::CTexture (void* fileData)
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: DETERMINE IF TEXTURES CAN HAVE 0 IMAGES
|
||||
// get first image size
|
||||
std::vector<TextureMipmap*>::const_iterator element = this->m_header->images.find (0)->second.begin ();
|
||||
|
||||
// set the texture resolution
|
||||
this->m_resolution = {
|
||||
this->m_header->textureWidth, this->m_header->textureHeight,
|
||||
(*element)->width, (*element)->height,
|
||||
this->m_header->width, this->m_header->height
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user