diff options
author | 2018-02-01 01:13:16 +1100 | |
---|---|---|
committer | 2018-02-01 01:13:16 +1100 | |
commit | 73ce78f7b4d4c1ff8ed36f6fef61fc00a2e9135e (patch) | |
tree | 7a50841459d42fee5739652092d6629870f81e3e /docs/release/src/osd/modules/render/drawd3d.cpp | |
parent | 6488544820bbf9bc96bd2f29bbc0a8b7c0b246fa (diff) |
0.193 Release filestag193
Diffstat (limited to 'docs/release/src/osd/modules/render/drawd3d.cpp')
-rw-r--r-- | docs/release/src/osd/modules/render/drawd3d.cpp | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/docs/release/src/osd/modules/render/drawd3d.cpp b/docs/release/src/osd/modules/render/drawd3d.cpp index e886695df12..0558b35cdd8 100644 --- a/docs/release/src/osd/modules/render/drawd3d.cpp +++ b/docs/release/src/osd/modules/render/drawd3d.cpp @@ -762,16 +762,13 @@ void renderer_d3d9::update_presentation_parameters() void renderer_d3d9::update_gamma_ramp() { - if (m_gamma_supported) + if (!m_gamma_supported) { return; } auto win = assert_window(); - // create a standard ramp - D3DGAMMARAMP ramp; - // set the gamma if we need to if (win->fullscreen()) { @@ -782,14 +779,16 @@ void renderer_d3d9::update_gamma_ramp() float gamma = options.full_screen_gamma(); if (brightness != 1.0f || contrast != 1.0f || gamma != 1.0f) { + D3DGAMMARAMP ramp; + for (int i = 0; i < 256; i++) { ramp.red[i] = ramp.green[i] = ramp.blue[i] = apply_brightness_contrast_gamma(i, brightness, contrast, gamma) << 8; } + + m_device->SetGammaRamp(0, 0, &ramp); } } - - m_device->SetGammaRamp(0, 0, &ramp); } @@ -1074,40 +1073,40 @@ bool renderer_d3d9::device_verify_caps() // verify device capabilities if (!(caps.DevCaps & D3DDEVCAPS_CANRENDERAFTERFLIP)) { - osd_printf_error("Direct3D Error: Your graphics card does not support rendering after a page\n"); - osd_printf_error("flip.\n"); + osd_printf_verbose("Direct3D Error: Your graphics card does not support rendering after a page\n"); + osd_printf_verbose("flip.\n"); success = false; } if (!(caps.DevCaps & D3DDEVCAPS_HWRASTERIZATION)) { - osd_printf_error("Direct3D Error: Your graphics card does not support hardware rendering.\n"); + osd_printf_verbose("Direct3D Error: Your graphics card does not support hardware rendering.\n"); success = false; } // verify texture operation capabilities if (!(caps.TextureOpCaps & D3DTEXOPCAPS_MODULATE)) { - osd_printf_error("Direct3D Error: Your graphics card does not support modulate-type blending.\n"); + osd_printf_verbose("Direct3D Error: Your graphics card does not support modulate-type blending.\n"); success = false; } -#if 0 + if (caps.TextureCaps & D3DPTEXTURECAPS_NONPOW2CONDITIONAL) { - osd_printf_error("Direct3D Error: Your graphics card does not fully support non-power-of-two\n"); - osd_printf_error("textures.\n"); + osd_printf_verbose("Direct3D Error: Your graphics card does not fully support non-power-of-two\n"); + osd_printf_verbose("textures.\n"); success = false; } if (caps.TextureCaps & D3DPTEXTURECAPS_POW2) { - osd_printf_error("Direct3D Error: Your graphics card does not support non-power-of-two textures.\n"); + osd_printf_verbose("Direct3D Error: Your graphics card does not support non-power-of-two textures.\n"); success = false; } -#endif + if (caps.TextureCaps & D3DPTEXTURECAPS_SQUAREONLY) { - osd_printf_error("Direct3D Error: Your graphics card does not support non-square textures.\n"); + osd_printf_verbose("Direct3D Error: Your graphics card does not support non-square textures.\n"); success = false; } @@ -1115,16 +1114,16 @@ bool renderer_d3d9::device_verify_caps() result = d3dintf->d3dobj->CheckDeviceFormat(m_adapter, D3DDEVTYPE_HAL, m_pixformat, 0, D3DRTYPE_TEXTURE, D3DFMT_A8R8G8B8); if (FAILED(result)) { - osd_printf_error("Direct3D Error: Your graphics card does not support the A8R8G8B8 texture format.\n"); + osd_printf_verbose("Direct3D Error: Your graphics card does not support the A8R8G8B8 texture format.\n"); success = false; } if (!success) { - osd_printf_error("This feature or features are required to use the Direct3D renderer. Please\n"); - osd_printf_error("select another renderer using the -video option or contact the MAME developers\n"); - osd_printf_error("with information about your system.\n"); - return false; + osd_printf_verbose("This feature or features are required to use the Direct3D renderer. Please\n"); + osd_printf_verbose("select another renderer using the -video option or contact the MAME developers\n"); + osd_printf_verbose("with information about your system.\n"); + //return false; } m_gamma_supported = ((caps.Caps2 & D3DCAPS2_FULLSCREENGAMMA) != 0); @@ -2155,7 +2154,7 @@ void texture_info::compute_size(int texwidth, int texheight) m_xborderpix = 0; m_yborderpix = 0; - bool shaders_enabled = m_renderer->get_shaders()->enabled(); + bool shaders_enabled = m_renderer->get_shaders()->enabled(); bool wrap_texture = (m_flags & PRIMFLAG_TEXWRAP_MASK) == PRIMFLAG_TEXWRAP_MASK; // skip border when shaders are enabled |