From a281c422ffdc8c123098ccd26cc3f0fe0654ef9d Mon Sep 17 00:00:00 2001 From: couriersud Date: Sun, 24 Nov 2019 17:07:09 +0100 Subject: [PATCH] bgfx: Fix edge case around B/C/G settings. [Couriersud] If e.g. kidniki is started with default gamma (1.0), changing gamma with slider doesn't work. Setting to a gamma <> 1 and restarting MAME will apply the gamma. This commit fixes this. --- src/osd/modules/render/drawbgfx.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osd/modules/render/drawbgfx.cpp b/src/osd/modules/render/drawbgfx.cpp index cfcb3d687ca..54b113ac146 100644 --- a/src/osd/modules/render/drawbgfx.cpp +++ b/src/osd/modules/render/drawbgfx.cpp @@ -1200,7 +1200,8 @@ uint32_t renderer_bgfx::get_texture_hash(render_primitive *prim) } return hash; #else - return (reinterpret_cast(prim->texture.base)) & 0xffffffff; + //return (reinterpret_cast(prim->texture.base)) & 0xffffffff; + return (reinterpret_cast(prim->texture.base) ^ reinterpret_cast(prim->texture.palette)) & 0xffffffff; #endif }