Skip to content
Snippets Groups Projects
Commit 0dc37aae authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

We need to set the palette before calling uifcini32()

The palette is used to construct the blank screen buffer using
vmem cells, so the background would be in screwy colours when
connecting for modes that don't use the CGA 16-colour palette.
parent d9c5f963
No related branches found
No related tags found
No related merge requests found
Pipeline #7023 passed
......@@ -63,14 +63,15 @@ init_uifc(bool scrn, bool bottom)
orig_y = wherey();
setvideoflags(orig_vidflags & (CIOLIB_VIDEO_NOBLINK | CIOLIB_VIDEO_BGBRIGHT));
uifc.chars = NULL;
get_modepalette(orig_palette);
set_modepalette(palettes[COLOUR_PALETTE]);
if ((i = uifcini32(&uifc)) != 0) {
set_modepalette(orig_palette);
fprintf(stderr, "uifc library init returned error %d\n", i);
return -1;
}
bottomfunc = uifc.bottomline;
uifc_initialized = UIFC_INIT;
get_modepalette(orig_palette);
set_modepalette(palettes[COLOUR_PALETTE]);
if ((cio_api.options & (CONIO_OPT_EXTENDED_PALETTE | CONIO_OPT_PALETTE_SETTING))
== (CONIO_OPT_EXTENDED_PALETTE | CONIO_OPT_PALETTE_SETTING)) {
uifc.bclr = BLUE;
......
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