From 8b24b1243bdea2145661d2a675e5784d62716eab Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Thu, 12 Mar 2020 11:14:04 +0800 Subject: [PATCH] bugfixing: Bad checking `pci_accel_driver` in FBCON engine --- src/newgal/fbcon/fbvideo.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/newgal/fbcon/fbvideo.c b/src/newgal/fbcon/fbvideo.c index a05fa60b..2c7ae69e 100644 --- a/src/newgal/fbcon/fbvideo.c +++ b/src/newgal/fbcon/fbvideo.c @@ -707,7 +707,8 @@ static GAL_Surface *FB_SetVideoMode(_THIS, GAL_Surface *current, } #ifdef _MGHAVE_PCIACCESS - if (pci_accel_driver) /* Init accelerated hardware via pciaccess */ + /* BUGFIXING (VM 2020-03-12): merged from 5.0.0 */ + if (pci_accel_driver > 0) /* Init accelerated hardware via pciaccess */ FB_InitPCIAccelDriver (this, current); #endif @@ -1196,7 +1197,8 @@ static void FB_VideoQuit(_THIS) } #ifdef _MGHAVE_PCIACCESS - if (pci_accel_driver) { + /* BUGFIXING (VM 2020-03-12): merged from 5.0.0 */ + if (pci_accel_driver > 0) { FB_CleanupPCIAccelDriver (this); pci_accel_driver = 0; }