summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2019-11-24 03:46:04 +0100
committer couriersud <couriersud@gmx.org>2019-11-24 03:46:04 +0100
commit1a7b1f2f7df59ff2f1f445f27b3094f4efa567e8 (patch)
tree631e92b687763dc46a11f0edf63f37b26aef5fd3
parent453f7b488f417b76dec2fa3f7f3ffb4e7b9ab07b (diff)
Opengl render driver: fix bug preventing adjustment of ... [Couriersud]
gamma, brightness and contrast. Starting MAME with defaults, i.e. gamma == 1.0, no rgb palette will be allocated. If gamma than is changed, a new palette will be allocated. But the texture will not be updated because the palette is not checked. This fix will check for palette changes. Note: if the palette is changed inplace, i.e. without reallocation, this will fail. The correct fix would be that the texture palette is not only a pointer to rgb_t * but to texture_palette_type. texture_palette_type would hold the pointer, the length and a sequential id which is checked in addition to pointer equality.
-rw-r--r--src/osd/modules/render/drawogl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osd/modules/render/drawogl.cpp b/src/osd/modules/render/drawogl.cpp
index 97acc3d259b..6df278a698f 100644
--- a/src/osd/modules/render/drawogl.cpp
+++ b/src/osd/modules/render/drawogl.cpp
@@ -2460,7 +2460,7 @@ static int compare_texture_primitive(const ogl_texture_info *texture, const rend
texture->texinfo.width == prim->texture.width &&
texture->texinfo.height == prim->texture.height &&
texture->texinfo.rowpixels == prim->texture.rowpixels &&
- /* texture->texinfo.palette == prim->texture.palette && */
+ texture->texinfo.palette == prim->texture.palette &&
((texture->flags ^ prim->flags) & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) == 0)
return 1;
else