1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-19 14:25:16 +03:00

Merge pull request #4284 from iNavFlight/agh_fix_max7456_screen_size

Check the correct bit in VM0 to detect screen size
This commit is contained in:
Alberto García Hierro 2019-01-28 19:45:57 +00:00 committed by GitHub
commit 9f90c1a3db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;