mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-18 04:19:55 +01:00
Fix a memory leak in projectm when using the non-FBO fallback on Windows Vista. Fixes issue #846
This commit is contained in:
parent
317e957c64
commit
c268f60339
3
3rdparty/libprojectm/Renderer/FBO.cpp
vendored
3
3rdparty/libprojectm/Renderer/FBO.cpp
vendored
@ -189,6 +189,9 @@ RenderTarget::RenderTarget(int texsize, int width, int height) : useFBO(false) {
|
||||
int origtexsize = this->texsize;
|
||||
this->texsize = nearestPower2( mindim, SCALE_MINIFY );
|
||||
|
||||
if (origtexsize == texsize)
|
||||
return;
|
||||
|
||||
/* Create the texture that will be bound to the render this */
|
||||
/*
|
||||
|
||||
|
17
3rdparty/libprojectm/patches/07-fix-fbo-fallback-memory-leak.patch
vendored
Normal file
17
3rdparty/libprojectm/patches/07-fix-fbo-fallback-memory-leak.patch
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
Index: Renderer/FBO.cpp
|
||||
===================================================================
|
||||
--- Renderer/FBO.cpp (revision 2090)
|
||||
+++ Renderer/FBO.cpp (working copy)
|
||||
@@ -187,8 +187,11 @@
|
||||
{
|
||||
int mindim = width < height ? width : height;
|
||||
int origtexsize = this->texsize;
|
||||
- this->texsize = nearestPower2( mindim, SCALE_MINIFY );
|
||||
+ this->texsize = nearestPower2( mindim, SCALE_MINIFY );
|
||||
|
||||
+ if (origtexsize == texsize)
|
||||
+ return;
|
||||
+
|
||||
/* Create the texture that will be bound to the render this */
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user