From d6a8dd6edd9d29fc720fa98c480b2f50d257fc32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Garci=CC=81a=20Hierro?= Date: Mon, 28 Jan 2019 12:18:51 +0000 Subject: [PATCH] Check the correct bit in VM0 to detect screen size Check VM0 against VIDEO_MODE_PAL (bit 6 = 1). Previous check was a typo that always returned true. Fixes #4268 --- src/main/drivers/max7456.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/drivers/max7456.c b/src/main/drivers/max7456.c index afc535ba32..24c52cc8b2 100644 --- a/src/main/drivers/max7456.c +++ b/src/main/drivers/max7456.c @@ -290,7 +290,7 @@ uint16_t max7456GetScreenSize(void) // deal with a zero returned from here. // TODO: Inspect all callers, make sure they can handle zero and // change this function to return zero before initialization. - if (state.isInitialized && (state.registers.vm0 & VIDEO_LINES_NTSC)) { + if (state.isInitialized && ((state.registers.vm0 & VIDEO_MODE_PAL) == 0)) { return VIDEO_BUFFER_CHARS_NTSC; } return VIDEO_BUFFER_CHARS_PAL;