summaryrefslogtreecommitdiffstats
path: root/src/emu/render.cpp
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2015-11-17 19:37:56 +0100
committer ImJezze <jezze@gmx.net>2015-11-17 19:37:56 +0100
commit8be53c28f0266af433076a6f5c1f1fa0abc70867 (patch)
tree5167ec845cdb853dddcbbafd84749308d3888095 /src/emu/render.cpp
parent5200f15ace282ad246bd38af900472db353ba241 (diff)
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
Diffstat (limited to 'src/emu/render.cpp')
-rw-r--r--src/emu/render.cpp14
1 files changed, 13 insertions, 1 deletions
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)