From 139837d408bae73b956d999e515165ab9c9c7a84 Mon Sep 17 00:00:00 2001 From: sonil Date: Mon, 24 Oct 2022 18:55:09 +0800 Subject: [PATCH] fix crash for screen width --- src/interface.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interface.cc b/src/interface.cc index fd941db..4489b66 100644 --- a/src/interface.cc +++ b/src/interface.cc @@ -304,7 +304,7 @@ int CustomInterfaceBarInit() sprintf(path, "art\\intrface\\HR_IFACE_%d.FRM", gInterfaceBarWidth); - if (dbGetFileSize(path, &size) != 0 || ifaceOffset <= 0) { + if (dbGetFileSize(path, &size) != 0 || ifaceOffset <= 0 || screenGetWidth() <= 640) { ifaceOffset = 0; gInterfaceBarWidth = 640; gInterfaceCustomBar = false;