Fix bug 469. Give 640x480 and upwards square pixels and several fixes for high colour modes. (jmarsh)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4324
This commit is contained in:
parent
a2f473cebd
commit
5d7c4f0540
1 changed files with 13 additions and 4 deletions
|
@ -1371,8 +1371,13 @@ void VGA_SetupDrawing(Bitu /*val*/) {
|
|||
// fall-through
|
||||
case M_LIN32:
|
||||
width<<=3;
|
||||
if (vga.crtc.mode_control & 0x8)
|
||||
if (vga.crtc.mode_control & 0x8) {
|
||||
doublewidth = true;
|
||||
if (vga.mode == M_LIN32) {
|
||||
// vesa modes 10f/190/191/192
|
||||
aspect_ratio *= 2.0;
|
||||
}
|
||||
}
|
||||
/* Use HW mouse cursor drawer if enabled */
|
||||
VGA_ActivateHardwareCursor();
|
||||
break;
|
||||
|
@ -1382,6 +1387,10 @@ void VGA_SetupDrawing(Bitu /*val*/) {
|
|||
width<<=2;
|
||||
if ((vga.crtc.mode_control & 0x8) || (svgaCard == SVGA_S3Trio && (vga.s3.pll.cmd & 0x10)))
|
||||
doublewidth = true;
|
||||
else {
|
||||
// vesa modes 165/175
|
||||
aspect_ratio /= 2.0;
|
||||
}
|
||||
/* Use HW mouse cursor drawer if enabled */
|
||||
VGA_ActivateHardwareCursor();
|
||||
break;
|
||||
|
@ -1539,11 +1548,11 @@ void VGA_SetupDrawing(Bitu /*val*/) {
|
|||
vga.changes.frame = 0;
|
||||
vga.changes.writeMask = 1;
|
||||
#endif
|
||||
/*
|
||||
Cheap hack to just make all > 640x480 modes have 4:3 aspect ratio
|
||||
/*
|
||||
Cheap hack to just make all > 640x480 modes have square pixels
|
||||
*/
|
||||
if ( width >= 640 && height >= 480 ) {
|
||||
aspect_ratio = ((float)width / (float)height) * ( 3.0 / 4.0);
|
||||
aspect_ratio = 1.0;//((float)width / (float)height) * ( 3.0 / 4.0);
|
||||
}
|
||||
// LOG_MSG("ht %d vt %d ratio %f", htotal, vtotal, aspect_ratio );
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue