mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
Fix resizing on windows. (nw)
This commit is contained in:
parent
50d7d0f8ad
commit
218c388088
@ -1472,17 +1472,17 @@ osd_rect sdl_window_info::constrain_to_aspect_ratio(const osd_rect &rect, int ad
|
||||
break;
|
||||
|
||||
case WMSZ_BOTTOMLEFT:
|
||||
ret = rect.move_by(-adjwidth, 0).resize(rect.width(), rect.height() + adjheight);
|
||||
ret = rect.move_by(-adjwidth, 0).resize(rect.width() + adjwidth, rect.height() + adjheight);
|
||||
break;
|
||||
|
||||
case WMSZ_LEFT:
|
||||
case WMSZ_TOPLEFT:
|
||||
case WMSZ_TOP:
|
||||
ret = rect.move_by(-adjwidth, -adjheight);
|
||||
ret = rect.move_by(-adjwidth, -adjheight).resize(rect.width() + adjwidth, rect.height() + adjheight);
|
||||
break;
|
||||
|
||||
case WMSZ_TOPRIGHT:
|
||||
ret = rect.move_by(0, -adjheight).resize(rect.width() + adjwidth, rect.height());
|
||||
ret = rect.move_by(0, -adjheight).resize(rect.width() + adjwidth, rect.height() + adjheight);
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
@ -1499,6 +1499,8 @@ osd_dim sdl_window_info::get_min_bounds(int constrain)
|
||||
{
|
||||
INT32 minwidth, minheight;
|
||||
|
||||
//assert(GetCurrentThreadId() == window_threadid);
|
||||
|
||||
// get the minimum target size
|
||||
m_target->compute_minimum_size(minwidth, minheight);
|
||||
|
||||
@ -1548,9 +1550,11 @@ osd_dim sdl_window_info::get_min_bounds(int constrain)
|
||||
|
||||
osd_dim sdl_window_info::get_max_bounds(int constrain)
|
||||
{
|
||||
// compute the maximum client area
|
||||
//assert(GetCurrentThreadId() == window_threadid);
|
||||
|
||||
osd_rect maximum = m_monitor->position_size();
|
||||
// compute the maximum client area
|
||||
// m_monitor->refresh();
|
||||
osd_rect maximum = m_monitor->usuable_position_size();
|
||||
|
||||
// clamp to the window's max
|
||||
int tempw = maximum.width();
|
||||
|
@ -1605,17 +1605,17 @@ osd_rect win_window_info::constrain_to_aspect_ratio(const osd_rect &rect, int ad
|
||||
break;
|
||||
|
||||
case WMSZ_BOTTOMLEFT:
|
||||
ret = rect.move_by(-adjwidth, 0).resize(rect.width(), rect.height() + adjheight);
|
||||
ret = rect.move_by(-adjwidth, 0).resize(rect.width() + adjwidth, rect.height() + adjheight);
|
||||
break;
|
||||
|
||||
case WMSZ_LEFT:
|
||||
case WMSZ_TOPLEFT:
|
||||
case WMSZ_TOP:
|
||||
ret = rect.move_by(-adjwidth, -adjheight);
|
||||
ret = rect.move_by(-adjwidth, -adjheight).resize(rect.width() + adjwidth, rect.height() + adjheight);
|
||||
break;
|
||||
|
||||
case WMSZ_TOPRIGHT:
|
||||
ret = rect.move_by(0, -adjheight).resize(rect.width() + adjwidth, rect.height());
|
||||
ret = rect.move_by(0, -adjheight).resize(rect.width() + adjwidth, rect.height() + adjheight);
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
@ -1632,7 +1632,7 @@ osd_dim win_window_info::get_min_bounds(int constrain)
|
||||
{
|
||||
INT32 minwidth, minheight;
|
||||
|
||||
assert(GetCurrentThreadId() == window_threadid);
|
||||
//assert(GetCurrentThreadId() == window_threadid);
|
||||
|
||||
// get the minimum target size
|
||||
m_target->compute_minimum_size(minwidth, minheight);
|
||||
@ -1683,7 +1683,7 @@ osd_dim win_window_info::get_min_bounds(int constrain)
|
||||
|
||||
osd_dim win_window_info::get_max_bounds(int constrain)
|
||||
{
|
||||
assert(GetCurrentThreadId() == window_threadid);
|
||||
//assert(GetCurrentThreadId() == window_threadid);
|
||||
|
||||
// compute the maximum client area
|
||||
m_monitor->refresh();
|
||||
|
Loading…
Reference in New Issue
Block a user