diff options
author | hap <happppp@users.noreply.github.com> | 2020-06-26 15:33:38 +0200 |
---|---|---|
committer | hap <happppp@users.noreply.github.com> | 2020-06-26 15:33:53 +0200 |
commit | 057458b168346b4d80a588ad278e650577def079 (patch) | |
tree | bc03650b9038e6edeb5498326da248a3addda0b9 /src/osd | |
parent | 8a0531799d4d5a32ea5c0850d3f9e78d2e9e5ff0 (diff) |
windows: reduce minimum window height (nw)
Diffstat (limited to 'src/osd')
-rw-r--r-- | src/osd/eminline.h | 2 | ||||
-rw-r--r-- | src/osd/windows/window.cpp | 21 |
2 files changed, 12 insertions, 11 deletions
diff --git a/src/osd/eminline.h b/src/osd/eminline.h index eb8ffaa9748..c217124bd3e 100644 --- a/src/osd/eminline.h +++ b/src/osd/eminline.h @@ -370,7 +370,7 @@ inline unsigned population_count_32(uint32_t val) static_assert(sizeof(val) == sizeof(unsigned), "expected 32-bit unsigned int"); return unsigned(__builtin_popcount(static_cast<unsigned>(val))); #else - // optimal Hamming weight assuing fast 32*32->32 + // optimal Hamming weight assuming fast 32*32->32 constexpr uint32_t m1(0x55555555); constexpr uint32_t m2(0x33333333); constexpr uint32_t m4(0x0f0f0f0f); diff --git a/src/osd/windows/window.cpp b/src/osd/windows/window.cpp index d3c9dd5b9a9..8e6d3665e82 100644 --- a/src/osd/windows/window.cpp +++ b/src/osd/windows/window.cpp @@ -72,7 +72,8 @@ using namespace Windows::UI::Core; #define FULLSCREEN_STYLE_EX WS_EX_TOPMOST // minimum window dimension -#define MIN_WINDOW_DIM 200 +#define MIN_WINDOW_DIMX 200 +#define MIN_WINDOW_DIMY 50 // custom window messages #define WM_USER_REDRAW (WM_USER + 2) @@ -1294,8 +1295,8 @@ LRESULT CALLBACK win_window_info::video_window_proc(HWND wnd, UINT message, WPAR case WM_GETMINMAXINFO: { auto *minmax = (MINMAXINFO *)lparam; - minmax->ptMinTrackSize.x = MIN_WINDOW_DIM; - minmax->ptMinTrackSize.y = MIN_WINDOW_DIM; + minmax->ptMinTrackSize.x = MIN_WINDOW_DIMX; + minmax->ptMinTrackSize.y = MIN_WINDOW_DIMY; break; } @@ -1521,8 +1522,8 @@ osd_rect win_window_info::constrain_to_aspect_ratio(const osd_rect &rect, int ad } // clamp against the absolute minimum - propwidth = std::max(propwidth, MIN_WINDOW_DIM); - propheight = std::max(propheight, MIN_WINDOW_DIM); + propwidth = std::max(propwidth, MIN_WINDOW_DIMX); + propheight = std::max(propheight, MIN_WINDOW_DIMY); // clamp against the minimum width and height propwidth = std::max(propwidth, minwidth); @@ -1584,10 +1585,10 @@ osd_dim win_window_info::get_min_bounds(int constrain) m_target->compute_minimum_size(minwidth, minheight); // expand to our minimum dimensions - if (minwidth < MIN_WINDOW_DIM) - minwidth = MIN_WINDOW_DIM; - if (minheight < MIN_WINDOW_DIM) - minheight = MIN_WINDOW_DIM; + if (minwidth < MIN_WINDOW_DIMX) + minwidth = MIN_WINDOW_DIMX; + if (minheight < MIN_WINDOW_DIMY) + minheight = MIN_WINDOW_DIMY; // account for extra window stuff minwidth += wnd_extra_width(); @@ -1848,7 +1849,7 @@ void win_window_info::set_fullscreen(int fullscreen) // otherwise, set a small size and maximize from there else { - SetWindowPos(platform_window(), HWND_TOP, 0, 0, MIN_WINDOW_DIM, MIN_WINDOW_DIM, SWP_NOZORDER); + SetWindowPos(platform_window(), HWND_TOP, 0, 0, MIN_WINDOW_DIMX, MIN_WINDOW_DIMY, SWP_NOZORDER); maximize_window(); } } |