1
0
Fork 0

Merge branch 'svn/trunk' r4326

This commit is contained in:
Patryk Obara 2020-02-15 17:38:56 +01:00
commit 6099ab60f3
3 changed files with 63 additions and 26 deletions

View file

@ -247,7 +247,7 @@ void JOYSTICK_Button(Bitu which,Bitu num,bool pressed) {
}
void JOYSTICK_Move_X(Bitu which,float x) {
if(which > 2) return;
if (which > 1) return;
if (stick[which].xpos == x) return;
stick[which].xpos = x;
stick[which].transformed = false;
@ -256,7 +256,7 @@ void JOYSTICK_Move_X(Bitu which,float x) {
}
void JOYSTICK_Move_Y(Bitu which,float y) {
if(which > 2) return;
if (which > 1) return;
if (stick[which].ypos == y) return;
stick[which].ypos = y;
stick[which].transformed = false;

View file

@ -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 );