diff options
| author | 2014-11-13 20:47:46 +0100 | |
|---|---|---|
| committer | 2014-11-18 13:16:02 +0100 | |
| commit | 963c923d5931dc9d20eb298001282da88e31c31a (patch) | |
| tree | 578bfe27494f4cfd1320592e73b3d0e2b3cf1497 /src | |
| parent | EmuWindow: Add some explicit documentation and set proper minimal client area... (diff) | |
| download | yuzu-963c923d5931dc9d20eb298001282da88e31c31a.tar.gz yuzu-963c923d5931dc9d20eb298001282da88e31c31a.tar.xz yuzu-963c923d5931dc9d20eb298001282da88e31c31a.zip | |
citra GLFW: Ignore minimal window size hints.
GLFW provides no proper support for this, hence we just allow any window size to be used.
Diffstat (limited to 'src')
| -rw-r--r-- | src/citra/emu_window/emu_window_glfw.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp index 9e6f91578..8efb39e2e 100644 --- a/src/citra/emu_window/emu_window_glfw.cpp +++ b/src/citra/emu_window/emu_window_glfw.cpp | |||
| @@ -46,14 +46,8 @@ void EmuWindow_GLFW::OnClientAreaResizeEvent(GLFWwindow* win, int width, int hei | |||
| 46 | _dbg_assert_(GUI, width > 0); | 46 | _dbg_assert_(GUI, width > 0); |
| 47 | _dbg_assert_(GUI, height > 0); | 47 | _dbg_assert_(GUI, height > 0); |
| 48 | 48 | ||
| 49 | // TODO: It's actually more interesting to us what the framebuffer size ends up being. | 49 | // NOTE: GLFW provides no proper way to set a minimal window size. |
| 50 | int adjusted_width = std::max<unsigned>(width, GetEmuWindow(win)->GetActiveConfig().min_client_area_size.first); | 50 | // Hence, we just ignore the corresponding EmuWindow hint. |
| 51 | int adjusted_height = std::max<unsigned>(height, GetEmuWindow(win)->GetActiveConfig().min_client_area_size.second); | ||
| 52 | |||
| 53 | if (adjusted_width != width || adjusted_height != height) { | ||
| 54 | glfwSetWindowSize(win, adjusted_width, adjusted_height); | ||
| 55 | return; | ||
| 56 | } | ||
| 57 | 51 | ||
| 58 | GetEmuWindow(win)->NotifyClientAreaSizeChanged(std::pair<unsigned,unsigned>(width, height)); | 52 | GetEmuWindow(win)->NotifyClientAreaSizeChanged(std::pair<unsigned,unsigned>(width, height)); |
| 59 | } | 53 | } |