mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-25 00:05:16 +00:00
Now the value of orig_cursor is used for curs_set(1). No more guessing
the size. :-) To Do: Test, in the strangest video modes I can find.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
RCSID("$Id: pdcgetsc.c,v 1.24 2006/07/15 15:38:24 wmcbrine Exp $");
|
||||
RCSID("$Id: pdcgetsc.c,v 1.25 2006/07/23 23:42:23 wmcbrine Exp $");
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
@@ -143,11 +143,7 @@ int PDC_get_columns(void)
|
||||
PDC_get_cursor_mode() - Get the cursor start and stop scan lines.
|
||||
|
||||
PDCurses Description:
|
||||
Gets the cursor type to begin in scan line startrow and end in
|
||||
scan line endrow. Both values should be 0-31.
|
||||
|
||||
PDCurses Return Value:
|
||||
This function returns OK on success and ERR on error.
|
||||
Gets the cursor size.
|
||||
|
||||
Portability:
|
||||
PDCurses int PDC_get_cursor_mode(void);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include "pdcdos.h"
|
||||
|
||||
RCSID("$Id: pdcsetsc.c,v 1.21 2006/07/23 19:10:32 wmcbrine Exp $");
|
||||
RCSID("$Id: pdcsetsc.c,v 1.22 2006/07/23 23:42:23 wmcbrine Exp $");
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
@@ -194,7 +194,7 @@ int PDC_set_scrn_mode(int new_mode)
|
||||
|
||||
int PDC_curs_set(int visibility)
|
||||
{
|
||||
int ret_vis, start = 6, end = 7;
|
||||
int ret_vis, start, end = 7;
|
||||
|
||||
PDC_LOG(("PDC_curs_set() - called: visibility=%d\n", visibility));
|
||||
|
||||
@@ -208,20 +208,11 @@ int PDC_curs_set(int visibility)
|
||||
end = 0; /* was 32 */
|
||||
break;
|
||||
case 2: /* highly visible */
|
||||
#if 0
|
||||
start = 2; /* almost full-height block */
|
||||
end = SP->font-1;
|
||||
#else
|
||||
start = 0; /* full-height block */
|
||||
#endif
|
||||
break;
|
||||
default: /* normal visibility */
|
||||
/* start = 6, end = 7 */
|
||||
#if 0
|
||||
start = SP->font - 2;
|
||||
end = SP->font-1;
|
||||
#endif
|
||||
break;
|
||||
start = (SP->orig_cursor >> 8) & 0xff;
|
||||
end = SP->orig_cursor & 0xff;
|
||||
}
|
||||
|
||||
/* if scrnmode is not set, some BIOSes hang */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <curses.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
RCSID("$Id: pdcgetsc.c,v 1.23 2006/07/15 15:38:24 wmcbrine Exp $");
|
||||
RCSID("$Id: pdcgetsc.c,v 1.24 2006/07/23 23:42:23 wmcbrine Exp $");
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
@@ -154,12 +154,7 @@ int PDC_get_columns(void)
|
||||
PDC_get_cursor_mode() - Get the cursor start and stop scan lines.
|
||||
|
||||
PDCurses Description:
|
||||
Gets the cursor type to begin in scan line startrow and end in
|
||||
scan line endrow. Both values should be in the range 0 through
|
||||
31.
|
||||
|
||||
PDCurses Return Value:
|
||||
This function returns OK on success and ERR on error.
|
||||
Gets the cursor size.
|
||||
|
||||
Portability:
|
||||
PDCurses int PDC_get_cursor_mode(void);
|
||||
@@ -181,8 +176,6 @@ int PDC_get_cursor_mode(void)
|
||||
#else
|
||||
VioGetCurType (&cursorInfo, 0);
|
||||
|
||||
/* I am not sure about this JGB */
|
||||
|
||||
return (cursorInfo.yStart << 8) | cursorInfo.cEnd;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <curses.h>
|
||||
#include <string.h>
|
||||
|
||||
RCSID("$Id: pdcsetsc.c,v 1.23 2006/07/23 19:10:32 wmcbrine Exp $");
|
||||
RCSID("$Id: pdcsetsc.c,v 1.24 2006/07/23 23:42:23 wmcbrine Exp $");
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
@@ -144,8 +144,8 @@ int PDC_curs_set(int visibility)
|
||||
break;
|
||||
|
||||
default: /* normal visibility */
|
||||
start = SP->font - (SP->font / 4);
|
||||
end = SP->font - 1;
|
||||
start = (SP->orig_cursor >> 8) & 0xff;
|
||||
end = SP->orig_cursor & 0xff;
|
||||
}
|
||||
|
||||
#ifdef EMXVIDEO
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#define INCLUDE_WINDOWS_H
|
||||
#include <curses.h>
|
||||
|
||||
RCSID("$Id: pdcgetsc.c,v 1.19 2006/07/15 15:38:24 wmcbrine Exp $");
|
||||
RCSID("$Id: pdcgetsc.c,v 1.20 2006/07/23 23:42:23 wmcbrine Exp $");
|
||||
|
||||
extern HANDLE hConOut, hConIn;
|
||||
extern CONSOLE_SCREEN_BUFFER_INFO scr;
|
||||
@@ -92,12 +92,7 @@ int PDC_get_attribute(void)
|
||||
PDC_get_cursor_mode() - Get the cursor start and stop scan lines.
|
||||
|
||||
PDCurses Description:
|
||||
Gets the cursor type to begin in scan line startrow and end in
|
||||
scan line endrow. Both values should be in the range 0 through
|
||||
31.
|
||||
|
||||
PDCurses Return Value:
|
||||
This function returns OK on success and ERR on error.
|
||||
Gets the cursor size.
|
||||
|
||||
Portability:
|
||||
PDCurses int PDC_get_cursor_mode(void);
|
||||
@@ -112,9 +107,7 @@ int PDC_get_cursor_mode(void)
|
||||
|
||||
GetConsoleCursorInfo(hConOut, &ci);
|
||||
|
||||
/* size is between 1 and 100, so convert it */
|
||||
|
||||
return ci.dwSize * 32 / 100 - 1;
|
||||
return ci.dwSize;
|
||||
}
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#define INCLUDE_WINDOWS_H
|
||||
#include <curses.h>
|
||||
|
||||
RCSID("$Id: pdcsetsc.c,v 1.22 2006/07/23 16:51:14 wmcbrine Exp $");
|
||||
RCSID("$Id: pdcsetsc.c,v 1.23 2006/07/23 23:42:23 wmcbrine Exp $");
|
||||
|
||||
extern HANDLE hConOut;
|
||||
|
||||
@@ -77,7 +77,7 @@ int PDC_curs_set(int visibility)
|
||||
break;
|
||||
default: /* normal visibility */
|
||||
cci.bVisible = TRUE;
|
||||
cci.dwSize = 25;
|
||||
cci.dwSize = SP->orig_cursor;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user