1
0
Fork 0

INT10 tells mouse about resolution change

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@598
This commit is contained in:
Ulf Wohlers 2002-12-22 17:03:29 +00:00
parent 0ee8335de9
commit ebc95ab27e
2 changed files with 12 additions and 3 deletions

View file

@ -20,6 +20,7 @@
#include "mem.h"
#include "inout.h"
#include "int10.h"
#include "mouse.h"
//TODO Maybe also add PCJR Video Modes could be nice :)
//TODO include some credits to bochs/plex86 bios i used for info/tables
@ -409,6 +410,8 @@ void INT10_SetVideoMode(Bit8u mode) {
INT10_SetActivePage(0);
/* Set some interrupt vectors */
RealSetVec(0x43,int10_romarea.font_8_first);
/* Tell mouse resolution change */
Mouse_SetResolution(vga_modes[line].swidth,vga_modes[line].sheight);
};
void INT10_SetGfxControllerToDefault()

View file

@ -388,14 +388,20 @@ static void SetMickeyPixelRate(Bit16s px, Bit16s py)
}
};
static void mouse_reset(void) {
void Mouse_SetResolution(Bit16u width, Bit16u height)
{
mouse.max_x = width-1;
mouse.max_y = height-1;
};
static void mouse_reset(void)
{
WriteMouseIntVector();
real_writed(0,(0x74<<2),CALLBACK_RealPointer(call_int74));
mouse.shown=-1;
mouse.min_x=0;
mouse.max_x=639;
mouse.min_y=0;
mouse.max_y=199;
// Dont set max coordinates here. it is done by SetResolution!
mouse.x=0; // civ wont work otherwise
mouse.y=100;
mouse.events=0;