summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 05ae9da..1eb439b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -197,5 +197,8 @@ main([[maybe_unused]] int argc, [[maybe_unused]] char **argv)
static void
framebuffer_size_callback([[maybe_unused]] GLFWwindow *window, int w, int h)
{
- glViewport(0, 0, w, h);
+ if (w < h)
+ glViewport(0, 0, w, w);
+ else
+ glViewport(0, 0, h, h);
}