@17140@
@13830@
@13245@
@13635@
@13440@
@13245@

Modified by Robert H”hne to be used for RHIDE.

@13245@
@13245@
@14024@

@14317@
@14609@
@14512@
@14498@
@14147@
@16849@

@16745@

@21238@
@19423@
@21232@

#ifdef __DJGPP__
#include <dpmi.h>

#define REGS __dpmi_regs
#define INTR(nr,r) __dpmi_int(nr,&r)

#define AX r.x.ax
#define BX r.x.bx
#define CX r.x.cx
#define DX r.x.dx
#define ES r.x.es

static int mouse_buffer_segment;
static int mouse_buffer_selector;
static int mouse_buffer_size;
static int mouse_buffer_allocated = 0;

@15582@

static void restore_mouse_state()
@23372@
#ifdef __DJGPP__
  REGS r;
  if (mouse_buffer_allocated)
@12966@
    AX = 0x0017;
    BX = mouse_buffer_size;
    ES = mouse_buffer_segment;
    DX = 0;
    INTR(0x33,r);
@12978@
@15582@
@24151@

static void save_mouse_state()
@23372@
#ifdef __DJGPP__
  REGS r;
  if (!mouse_buffer_allocated)
@12966@
    AX = 0x0015;
    INTR(0x33,r);
    mouse_buffer_size = BX;
    mouse_buffer_segment = __dpmi_allocate_dos_memory(
                             (mouse_buffer_size+15)>>4,
                             &mouse_buffer_selector);
    if (mouse_buffer_segment != -1)
      mouse_buffer_allocated = 1;
@12978@
  if (mouse_buffer_allocated)
@12966@
    AX = 0x0016;
    BX = mouse_buffer_size;
    ES = mouse_buffer_segment;
    DX = 0;
    INTR(0x33,r);
@12978@
@15582@
@24151@

#ifdef __DJGPP__
static int my_mouse_buffer_segment;
static int my_mouse_buffer_selector;
static int my_mouse_buffer_size;
static int my_mouse_buffer_allocated = 0;
@15582@

static void restore_my_mouse_state()
@23372@
#ifdef __DJGPP__
  REGS r;
  if (my_mouse_buffer_allocated)
@12966@
    AX = 0x0017;
    BX = my_mouse_buffer_size;
    ES = my_mouse_buffer_segment;
    DX = 0;
    INTR(0x33,r);
@12978@
@15582@
@24151@

static void save_my_mouse_state()
@23372@
#ifdef __DJGPP__
  REGS r;
  if (!my_mouse_buffer_allocated)
@12966@
    AX = 0x0015;
    INTR(0x33,r);
    my_mouse_buffer_size = BX;
    my_mouse_buffer_segment = __dpmi_allocate_dos_memory(
                             (my_mouse_buffer_size+15)>>4,
                             &my_mouse_buffer_selector);
    if (my_mouse_buffer_segment != -1)
      my_mouse_buffer_allocated = 1;
@12978@
  if (my_mouse_buffer_allocated)
@12966@
    AX = 0x0016;
    BX = my_mouse_buffer_size;
    ES = my_mouse_buffer_segment;
    DX = 0;
    INTR(0x33,r);
@12978@
@15582@
@24151@

@21470@
@23372@
  if (1) save_mouse_state();
  TScreen::resume();
  TEventQueue::resume();
  if (0) restore_my_mouse_state();
@24151@

@21471@
@23372@
  if (0) save_my_mouse_state();
  TEventQueue::suspend();
  TScreen::suspend();
  if (1) restore_mouse_state();
@24151@

@21952@
@21934@

@19272@
@06961@
@01362@
@01361@
@01434@
@23372@
@09032@
//    resume();
//    TEventQueue::resume();
@24151@

@19273@
@23372@
@07923@
//    suspend();
@24151@

