This commit is contained in:
Wengier
2021-06-19 03:51:10 -04:00
parent a6445532d5
commit c927f9574e
2 changed files with 9 additions and 5 deletions

View File

@@ -7312,12 +7312,15 @@ void SetIMPosition() {
uint8_t x, y;
uint8_t page = IS_PC98_ARCH?0:real_readb(BIOSMEM_SEG,BIOSMEM_CURRENT_PAGE);
INT10_GetCursorPos(&y, &x, page);
int nrows=25;
int nrows=25, ncols=80;
if (IS_PC98_ARCH)
nrows=real_readb(0x60,0x113) & 0x01 ? 25 : 20;
else
else {
nrows=(IS_EGAVGA_ARCH?real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS):24)+1;
ncols=real_readw(BIOSMEM_SEG,BIOSMEM_NB_COLS);
}
if (y>=nrows-1) y=nrows-8;
if (x>=ncols-4) x=ncols-4;
if ((im_x != x || im_y != y) && GetTicks() - last_ticks > 100) {
last_ticks = GetTicks();
@@ -7327,12 +7330,13 @@ void SetIMPosition() {
y++;
#endif
uint8_t height = IS_PC98_ARCH?16:real_readb(BIOSMEM_SEG, BIOSMEM_CHAR_HEIGHT);
uint8_t width = CurMode && DOSV_CheckCJKVideoMode() ? CurMode->cwidth : (height / 2);
#if defined(USE_TTF)
if (ttf.inUse)
SDL_SetIMPosition((x+1) * ttf.pointsize / 2, (y+1) * ttf.pointsize);
else
#endif
SDL_SetIMPosition((x+1) * height / 2, (y+1) * height - (DOSV_CheckCJKVideoMode()?2:0));
SDL_SetIMPosition((x+1) * width, (y+1) * height - (DOSV_CheckCJKVideoMode()?2:0));
}
}
#endif

View File

@@ -3963,7 +3963,7 @@ static void VGA_VerticalTimer(Bitu /*val*/) {
(*draw).skipped = 1;
dbw=dex=false;
} else if (dbcs_sbcs && col<ttf.cols-1 && isDBCSLB((*draw).chr, lead) && (*(vidmem+2) & 0xFF) >= 0x40) {
bool boxdefault = (!autoboxdraw || col>=ttf.cols-2) && !bd[col];
bool boxdefault = (!autoboxdraw || col>=ttf.cols-3) && !bd[col];
if (!boxdefault && col<ttf.cols-3) {
if (CheckBoxDrawing((uint8_t)((*draw).chr), (uint8_t)*(vidmem+2), (uint8_t)*(vidmem+4), (uint8_t)*(vidmem+6)))
bd[col]=bd[col+1]=bd[col+2]=bd[col+3]=true;
@@ -4022,7 +4022,7 @@ static void VGA_VerticalTimer(Bitu /*val*/) {
(*draw).skipped = 1;
dbw=dex=false;
} else if (dbcs_sbcs && col<ttf.cols-1 && isDBCSLB((*draw).chr, lead) && (*(vidmem+1) & 0xFF) >= 0x40) {
bool boxdefault = (!autoboxdraw || col>=ttf.cols-2) && !bd[col];
bool boxdefault = (!autoboxdraw || col>=ttf.cols-3) && !bd[col];
if (!boxdefault && col<ttf.cols-3) {
if (CheckBoxDrawing((uint8_t)((*draw).chr), (uint8_t)*(vidmem+1), (uint8_t)*(vidmem+2), (uint8_t)*(vidmem+3)))
bd[col]=bd[col+1]=bd[col+2]=bd[col+3]=true;