Skip to content
Snippets Groups Projects
Commit a147cfc9 authored by deuce's avatar deuce
Browse files

Allow the pixel array to be NULL in restorescreen().

This allows modifying a savescreen() rather than needing to vmem_gettext()
stuff, but also change things without hacking up the pixels array yourself.
parent 60e40400
No related branches found
No related tags found
No related merge requests found
......@@ -1883,7 +1883,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_restorescreen(struct ciolib_screen *scrn)
ciolib_textcolor(scrn->text_info.attribute);
ciolib_window(scrn->text_info.winleft, scrn->text_info.wintop, scrn->text_info.winright, scrn->text_info.winbottom);
vmode = find_vmode(scrn->text_info.currmode);
if (vmode != -1)
if (vmode != -1 && scrn->pixels != NULL)
ciolib_setpixels(0, 0, vparams[vmode].charwidth * vparams[vmode].cols - 1, vparams[vmode].charheight * vparams[vmode].rows - 1, 0, 0, scrn->pixels, NULL);
for (i=0; i<5; i++)
ciolib_setfont(scrn->fonts[i], FALSE, i);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment