From 088f3a6315b5b2cdfae40905e58f0142b656584a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C5=A0imek?= <jsimek.cz@gmail.com>
Date: Sat, 21 May 2022 03:39:01 -0700
Subject: [PATCH] Fix credits position

---
 src/credits.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/credits.c b/src/credits.c
index ae95166..b12ab37 100644
--- a/src/credits.c
+++ b/src/credits.c
@@ -66,7 +66,9 @@ void creditsOpen(const char* filePath, int backgroundFid, bool useReversedStyle)
                 mouseShowCursor();
             }
 
-            int window = windowCreate(0, 0, CREDITS_WINDOW_WIDTH, CREDITS_WINDOW_HEIGHT, _colorTable[0], 20);
+            int creditsWindowX = (screenGetWidth() - CREDITS_WINDOW_WIDTH) / 2;
+            int creditsWindowY = (screenGetHeight() - CREDITS_WINDOW_HEIGHT) / 2;
+            int window = windowCreate(creditsWindowX, creditsWindowY, CREDITS_WINDOW_WIDTH, CREDITS_WINDOW_HEIGHT, _colorTable[0], 20);
             soundContinueAll();
             if (window != -1) {
                 unsigned char* windowBuffer = windowGetBuffer(window);