mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-02-06 10:21:57 +08:00
fix a bug in Shadow NEWGAL engine: SetVideoMode may return another surface, e.g., when using double bufffering of fbcon engine.
This commit is contained in:
@@ -309,11 +309,13 @@ static int RealEngine_GetInfo (RealFBInfo * realfb_info)
|
||||
0, 0, real_vformat.BitsPerPixel, real_vformat.Rmask,
|
||||
real_vformat.Gmask, real_vformat.Bmask, real_vformat.Amask);
|
||||
|
||||
if (real_device->screen == NULL)
|
||||
_ERR_PRINTF ("NEWGAL>SHADOW: can't create screen of real engine.\n");
|
||||
|
||||
real_device->SetVideoMode(realfb_info->real_device,
|
||||
/* VW: SetVideoMode may return a new surface */
|
||||
real_device->screen = real_device->SetVideoMode(realfb_info->real_device,
|
||||
real_device->screen, w, h, depth, GAL_HWPALETTE);
|
||||
if (real_device->screen == NULL) {
|
||||
_ERR_PRINTF ("NEWGAL>SHADOW: can't create screen of real engine.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
realfb_info->height = real_device->screen->h;
|
||||
realfb_info->width = real_device->screen->w;
|
||||
|
||||
Reference in New Issue
Block a user