delay small vertical display end changes a bit to avoid immediate screen resizing
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3094
This commit is contained in:
parent
cb40dff18b
commit
8ee3853d17
3 changed files with 14 additions and 9 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: vga.h,v 1.38 2008-01-12 17:36:48 c2woody Exp $ */
|
||||
/* $Id: vga.h,v 1.39 2008-02-06 18:22:27 c2woody Exp $ */
|
||||
|
||||
#ifndef DOSBOX_VGA_H
|
||||
#define DOSBOX_VGA_H
|
||||
|
@ -385,7 +385,7 @@ typedef struct {
|
|||
void VGA_SetMode(VGAModes mode);
|
||||
void VGA_DetermineMode(void);
|
||||
void VGA_SetupHandlers(void);
|
||||
void VGA_StartResize(void);
|
||||
void VGA_StartResize(Bitu delay=50);
|
||||
void VGA_SetupDrawing(Bitu val);
|
||||
void VGA_CheckScanLength(void);
|
||||
void VGA_ChangedBank(void);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: vga.cpp,v 1.33 2008-01-12 17:37:48 c2woody Exp $ */
|
||||
/* $Id: vga.cpp,v 1.34 2008-02-06 18:23:34 c2woody Exp $ */
|
||||
|
||||
#include "dosbox.h"
|
||||
//#include "setup.h"
|
||||
|
@ -82,11 +82,11 @@ void VGA_DetermineMode(void) {
|
|||
}
|
||||
}
|
||||
|
||||
void VGA_StartResize(void) {
|
||||
void VGA_StartResize(Bitu delay /*=50*/) {
|
||||
if (!vga.draw.resizing) {
|
||||
vga.draw.resizing=true;
|
||||
/* Start a resize after 50 ms */
|
||||
PIC_AddEvent(VGA_SetupDrawing,50);
|
||||
/* Start a resize after delay (default 50 ms) */
|
||||
PIC_AddEvent(VGA_SetupDrawing,(float)delay);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: vga_crtc.cpp,v 1.30 2008-01-09 20:34:51 c2woody Exp $ */
|
||||
/* $Id: vga_crtc.cpp,v 1.31 2008-02-06 18:23:34 c2woody Exp $ */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "dosbox.h"
|
||||
|
@ -226,11 +226,16 @@ void vga_write_p3d5(Bitu port,Bitu val,Bitu iolen) {
|
|||
case 0x12: /* Vertical Display End Register */
|
||||
if (val!=crtc(vertical_display_end)) {
|
||||
if (abs((Bits)val-(Bits)crtc(vertical_display_end))<3) {
|
||||
// delay small vde changes a bit to avoid screen resizing
|
||||
// if they are reverted in a short timeframe
|
||||
PIC_RemoveEvents(VGA_SetupDrawing);
|
||||
vga.draw.resizing=false;
|
||||
crtc(vertical_display_end)=val;
|
||||
VGA_StartResize(150);
|
||||
} else {
|
||||
crtc(vertical_display_end)=val;
|
||||
VGA_StartResize();
|
||||
}
|
||||
crtc(vertical_display_end)=val;
|
||||
VGA_StartResize();
|
||||
}
|
||||
/*
|
||||
0-7 Lower 8 bits of Vertical Display End. The display ends when the line
|
||||
|
|
Loading…
Add table
Reference in a new issue