diff options
| author | Mel <mel@rnrd.eu> | 2026-09-03 05:01:46 +0200 |
|---|---|---|
| committer | Mel <mel@rnrd.eu> | 2026-09-03 05:01:46 +0200 |
| commit | 1952628825ee526e4ae32170266f8eaa323a0e16 (patch) | |
| tree | 55cf4ff13a2d647723f5b7ca0f60a2e8562b61da /src/GFX/Window.cpp | |
| parent | 3af28453019a98b26f5c08ed49a6df633b36addb (diff) | |
| download | meowcraft-1952628825ee526e4ae32170266f8eaa323a0e16.tar.zst meowcraft-1952628825ee526e4ae32170266f8eaa323a0e16.zip | |
Support larger framebuffers of HiDPI displays
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'src/GFX/Window.cpp')
| -rw-r--r-- | src/GFX/Window.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/GFX/Window.cpp b/src/GFX/Window.cpp index 75e7613..7d0f5b3 100644 --- a/src/GFX/Window.cpp +++ b/src/GFX/Window.cpp @@ -58,6 +58,10 @@ void Window::on_size_change(void (callback)(GLFWwindow*, I32, I32)) const { glfwSetFramebufferSizeCallback(m_window, callback); } +void Window::framebuffer_size(I32& width, I32& height) const { + glfwGetFramebufferSize(m_window, &width, &height); +} + void Window::attach() const { glfwMakeContextCurrent(m_window); } |
