summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2019-06-17 17:46:43 +0200
committer hap <happppp@users.noreply.github.com>2019-06-17 17:47:07 +0200
commit3764b8626bce3c634f88f98c28ee3fee11b893ee (patch)
treed32aae097d90d1ab5a6e82a83a3b4111db5b08a0
parent5d9eb240fd739fa460ee29ec5f6b7d0fefcb6c94 (diff)
d3d: this fixes alt-tab crash (nw)
-rw-r--r--src/devices/video/pwm.h6
-rw-r--r--src/osd/modules/render/drawd3d.cpp6
2 files changed, 9 insertions, 3 deletions
diff --git a/src/devices/video/pwm.h b/src/devices/video/pwm.h
index 62ea71b5c8b..8c3eedb3473 100644
--- a/src/devices/video/pwm.h
+++ b/src/devices/video/pwm.h
@@ -49,8 +49,10 @@ public:
void write_row(offs_t offset, u64 data) { m_rowdata[offset] = data; m_rowsel |= u64(1) << offset; }
void clear_row(offs_t offset, u64 data = 0) { m_rowdata[offset] = 0; m_rowsel &= ~(u64(1) << offset); }
- double element_bri(u8 y, u8 x) { return m_bri[y][x]; }
- bool element_on(u8 y, u8 x) { return (m_bri[y][x] > m_levels[m_level_min]); }
+ // directly handle element current brightness
+ double read_element_bri(u8 y, u8 x) { return m_bri[y][x]; }
+ void write_element_bri(u8 y, u8 x, double b) { m_bri[y][x] = b; }
+ bool element_on(u8 y, u8 x) { return (read_element_bri(y, x) > m_levels[m_level_min]); }
bool row_on(u8 y) { return element_on(y, m_width); }
protected:
diff --git a/src/osd/modules/render/drawd3d.cpp b/src/osd/modules/render/drawd3d.cpp
index e5dd8547c9b..dceac6ef412 100644
--- a/src/osd/modules/render/drawd3d.cpp
+++ b/src/osd/modules/render/drawd3d.cpp
@@ -177,7 +177,11 @@ render_primitive_list *renderer_d3d9::get_primitives()
if (win == nullptr)
return nullptr;
- GetClientRectExceptMenu(std::static_pointer_cast<win_window_info>(win)->platform_window(), &client, win->fullscreen());
+ HWND hWnd = std::static_pointer_cast<win_window_info>(win)->platform_window();
+ if (IsIconic(hWnd))
+ return nullptr;
+
+ GetClientRectExceptMenu(hWnd, &client, win->fullscreen());
if (rect_width(&client) > 0 && rect_height(&client) > 0)
{
win->target()->set_bounds(rect_width(&client), rect_height(&client), win->pixel_aspect());