mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
d3d: this fixes alt-tab crash (nw)
This commit is contained in:
parent
5d9eb240fd
commit
3764b8626b
@ -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:
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user