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