From 8be53c28f0266af433076a6f5c1f1fa0abc70867 Mon Sep 17 00:00:00 2001 From: ImJezze Date: Tue, 17 Nov 2015 19:37:56 +0100 Subject: Changed screen adjustment for HLSL - screen adjustment (scale, offset) can now be handled by the respective render API itself (default behavior is as before) - D3D (if HLSL) is activated handles screen adjustment by itself within the shader, which fixes the odd behavior of some effects (e.g. round corners) when screen scale and offset is used --- src/emu/render.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/emu/render.cpp') diff --git a/src/emu/render.cpp b/src/emu/render.cpp index c86b3f914c5..e823f1fb7cf 100644 --- a/src/emu/render.cpp +++ b/src/emu/render.cpp @@ -924,7 +924,9 @@ render_target::render_target(render_manager &manager, const char *layoutfile, UI m_base_view(NULL), m_base_orientation(ROT0), m_maxtexwidth(65536), - m_maxtexheight(65536) + m_maxtexheight(65536), + m_scale_primitives(true), + m_offset_primitives(true) { // determine the base layer configuration based on options m_base_layerconfig.set_backdrops_enabled(manager.machine().options().use_backdrops()); @@ -1659,6 +1661,16 @@ void render_target::add_container_primitives(render_primitive_list &list, const float yoffs = (container_xform.orientation & ORIENTATION_SWAP_XY) ? container.xoffset() : container.yoffset(); if (container_xform.orientation & ORIENTATION_FLIP_X) xoffs = -xoffs; if (container_xform.orientation & ORIENTATION_FLIP_Y) yoffs = -yoffs; + if (!m_scale_primitives) + { + xscale = 1.0f; + yscale = 1.0f; + } + if (!m_offset_primitives) + { + xoffs = 0.0f; + yoffs = 0.0f; + } container_xform.xscale = xform.xscale * xscale; container_xform.yscale = xform.yscale * yscale; if (xform.no_center) -- cgit v1.2.3-70-g09d2