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

Just because we're *compiled* with graphics support doesn't mean

we support them in the current mode.

Fixes issue 175
parent 2ef6784d
No related branches found
No related tags found
1 merge request!488Overhaul LZH code
Pipeline #7487 passed
......@@ -15870,6 +15870,7 @@ size_t
parse_rip(BYTE *origbuf, unsigned blen, unsigned maxlen)
{
#ifdef HAS_VSTAT
if (cio_api.options & CONIO_OPT_SET_PIXEL) {
unsigned pos = 0;
size_t rip_start = maxlen + 1;
bool copy = false;
......@@ -16161,6 +16162,7 @@ parse_rip(BYTE *origbuf, unsigned blen, unsigned maxlen)
}
if (rip.text_disabled)
return ansi_only(origbuf, blen);
}
#endif
return blen;
}
......@@ -16169,6 +16171,7 @@ void
suspend_rip(bool suspend)
{
#ifdef HAS_VSTAT
if (cio_api.options & CONIO_OPT_SET_PIXEL) {
if (suspend) {
if (rip.enabled)
rip_suspended = true;
......@@ -16177,6 +16180,7 @@ suspend_rip(bool suspend)
if (rip.enabled)
rip_suspended = false;
}
}
#endif
}
 
......@@ -16184,6 +16188,7 @@ void
init_rip(struct bbslist *bbs)
{
#ifdef HAS_VSTAT
if (cio_api.options & CONIO_OPT_SET_PIXEL) {
FREE_AND_NULL(rip.xmap);
FREE_AND_NULL(rip.ymap);
FREE_AND_NULL(rip.xunmap);
......@@ -16246,6 +16251,7 @@ init_rip(struct bbslist *bbs)
set_ega_palette();
normal_palette();
}
}
#endif
}
 
......@@ -16253,7 +16259,7 @@ int
rip_kbhit(void)
{
#ifdef HAS_VSTAT
if (rip.enabled)
if (rip.enabled && cio_api.options & CONIO_OPT_SET_PIXEL)
if (ripbuf)
return 1;
#endif
......@@ -16264,6 +16270,7 @@ int
rip_getch(void)
{
#ifdef HAS_VSTAT
if (cio_api.options & CONIO_OPT_SET_PIXEL) {
int ch;
struct mouse_event mevent;
int oldhold = hold_update;
......@@ -16438,7 +16445,8 @@ rip_getch(void)
normal_palette();
hold_update = oldhold;
return ch;
#else
}
#endif
int ch;
 
ch = getch();
......@@ -16448,5 +16456,4 @@ rip_getch(void)
ch = 0xe0;
}
return ch;
#endif
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment