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

Attempt to re-enable palette setting on Win32

This was disabled due to mingw32 limitations, and we use mingw64 now
parent 185d201e
No related branches found
No related tags found
No related merge requests found
Pipeline #6893 passed
......@@ -632,9 +632,8 @@ void win32_textmode(int mode)
HANDLE h;
COORD sz;
SMALL_RECT rc;
#if 0
CONSOLE_SCREEN_BUFFER_INFOEX bi;
#endif
int i;
modeidx = find_vmode(mode);
if (modeidx == -1)
......@@ -668,16 +667,14 @@ void win32_textmode(int mode)
cio_textinfo.wintop=1;
cio_textinfo.winright=cio_textinfo.screenwidth;
cio_textinfo.winbottom=cio_textinfo.screenheight;
#if 0
if (GetConsoleScreenBufferInfoEx(GetStdHandle(STD_OUTPUT_HANDLE), &bi)) {
for (i = 0; i < 16; i++) {
bi.ColorTable[] = RGB(dac_default[palettes[vparams[modeidx]][i]].red, dac_default[palettes[vparams[modeidx].palette][i]].green, dac_default[palettes[vparams[modeidx]][i]].blue);
bi.ColorTable[i] = RGB(dac_default[palettes[vparams[modeidx].palette][i]].red, dac_default[palettes[vparams[modeidx].palette][i]].green, dac_default[palettes[vparams[modeidx].palette][i]].blue);
}
if (SetConsoleScreenBufferInfoEx(GetStdHandle(STD_OUTPUT_HANDLE), &bi)) {
cio_api.options |= CONIO_OPT_PALETTE_SETTING;
}
}
#endif
}
int win32_gettext(int left, int top, int right, int bottom, void* buf)
......@@ -911,7 +908,6 @@ int win32_getvideoflags(void)
int win32_setpalette(uint32_t entry, uint16_t r, uint16_t g, uint16_t b)
{
#if 0
CONSOLE_SCREEN_BUFFER_INFOEX bi;
if (entry > 15)
......@@ -923,7 +919,6 @@ int win32_setpalette(uint32_t entry, uint16_t r, uint16_t g, uint16_t b)
bi.ColorTable[entry] = RGB(r >> 8, g >> 8, b >> 8);
if (!SetConsoleScreenBufferInfoEx(GetStdHandle(STD_OUTPUT_HANDLE), &bi))
return 0;
#endif
return 1;
}
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