From cf48084ceaf5428034df733fb8388f03b93c2090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Strohh=C3=A4cker?= Date: Sat, 8 Mar 2008 22:05:05 +0000 Subject: [PATCH] correct mouse maximal y-value for non-standard font heights in text mode (fixes mouse in lba2 installer) Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3117 --- include/mouse.h | 18 +++++++++++------- src/ints/mouse.cpp | 11 ++++++++--- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/include/mouse.h b/include/mouse.h index f0467fe1..ccc38a05 100644 --- a/include/mouse.h +++ b/include/mouse.h @@ -16,16 +16,20 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: mouse.h,v 1.13 2007-01-08 19:45:37 qbix79 Exp $ */ - -#ifndef DOSBOX_MOUSE_H -#define DOSBOX_MOUSE_H - +/* $Id: mouse.h,v 1.14 2008-03-08 22:04:44 c2woody Exp $ */ + + +#ifndef DOSBOX_MOUSE_H +#define DOSBOX_MOUSE_H + + void Mouse_ShowCursor(void); void Mouse_HideCursor(void); -bool Mouse_SetPS2State(bool use); -void Mouse_ChangePS2Callback(Bit16u pseg, Bit16u pofs); +bool Mouse_SetPS2State(bool use); + +void Mouse_ChangePS2Callback(Bit16u pseg, Bit16u pofs); + void Mouse_CursorMoved(float xrel,float yrel,float x,float y,bool emulate); void Mouse_CursorSet(float x,float y); diff --git a/src/ints/mouse.cpp b/src/ints/mouse.cpp index 5b1fe4ba..664663b2 100644 --- a/src/ints/mouse.cpp +++ b/src/ints/mouse.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2007 The DOSBox Team + * Copyright (C) 2002-2008 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: mouse.cpp,v 1.71 2007-11-05 21:46:26 c2woody Exp $ */ +/* $Id: mouse.cpp,v 1.72 2008-03-08 22:05:05 c2woody Exp $ */ #include #include @@ -537,7 +537,12 @@ void Mouse_NewVideoMode(void) { case 0x00: case 0x01: case 0x02: - case 0x03: + case 0x03: { + Bitu rows=real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS); + if ((rows==0) || (rows>250)) rows=25-1; + mouse.max_y=8*(rows+1)-1; + break; + } case 0x04: case 0x05: case 0x06: