From 7495659fc0cfbe441319bb161410f973a3cbbb30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C5=A0imek?= Date: Fri, 20 May 2022 15:37:05 -0700 Subject: [PATCH] Fix interface bar position when using custom resolution (#2) See #3 --- src/interface.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/interface.c b/src/interface.c index d928351..850c6c3 100644 --- a/src/interface.c +++ b/src/interface.c @@ -351,7 +351,10 @@ int interfaceInit() gInterfaceBarInitialized = 1; - gInterfaceBarWindow = windowCreate(0, 379, 640, 100, _colorTable[0], WINDOW_HIDDEN); + int xPos = (_scr_size.right - 640) / 2; + int yPos = _scr_size.bottom - 99; + + gInterfaceBarWindow = windowCreate(xPos, yPos, 640, 100, _colorTable[0], WINDOW_HIDDEN); if (gInterfaceBarWindow == -1) { goto err; }