ref: d91383ee4057a2fc6fc2fb80144abb34273a6d7f
parent: 9d01d090c48c74a29b4ef67e0cd204772a2193c3
author: Simon Howard <[email protected]>
date: Sat Oct 25 10:58:31 EDT 2014
Remove 1280x1000 scaling. We already have 1280x960, which is the correct aspect ratio. This means that when running at 1080p the windowboxing borders will be slightly thicker, but if we're already showing borders anyway, it's better to at least use the correct aspect ratio. This fixes #460. Thanks to Doom_user for asking about this on Doomworld: http://www.doomworld.com/vb/post/1316735
--- a/src/i_scale.c
+++ b/src/i_scale.c
@@ -1384,69 +1384,12 @@
false,
};
-#define DRAW_PIXEL5 \
- *dest++ = *dest2++ = *dest3++ = *dest4++ = *dest5++ = c
-
-static inline void WriteSquashedLine5x(byte *dest, byte *src)
-{
- int x;
- int c;
- byte *dest2, *dest3, *dest4, *dest5;
-
- dest2 = dest + dest_pitch;
- dest3 = dest + dest_pitch * 2;
- dest4 = dest + dest_pitch * 3;
- dest5 = dest + dest_pitch * 4;
-
- for (x=0; x<SCREENWIDTH; ++x)
- {
- // Draw in blocks of 5
-
- // 100% pixel 0 x4
-
- c = *src++;
- DRAW_PIXEL5;
- DRAW_PIXEL5;
- DRAW_PIXEL5;
- DRAW_PIXEL5;
- }
-}
-
-//
-// 5x squashed (1280x1000)
-//
-
-static boolean I_Squash5x(int x1, int y1, int x2, int y2)
-{
- byte *bufp, *screenp;
- int y;
-
- // Only works with full screen update
-
- if (x1 != 0 || y1 != 0 || x2 != SCREENWIDTH || y2 != SCREENHEIGHT)
- {
- return false;
- }
-
- bufp = src_buffer;
- screenp = (byte *) dest_buffer;
-
- for (y=0; y<SCREENHEIGHT; ++y)
- {
- WriteSquashedLine5x(screenp, bufp);
-
- screenp += dest_pitch * 5;
- bufp += SCREENWIDTH;
- }
-
- return true;
-}
-
-screen_mode_t mode_squash_5x = {
- SCREENWIDTH_4_3 * 5, SCREENHEIGHT * 5,
- I_InitStretchTables,
- I_Squash5x,
- false,
-};
-
+// We used to have mode_squash_5x here as well, but it got removed.
+// 5x squashing gives 1280x1000, which is very close to the 4x stretched
+// 1280x960. The difference is that 1280x1000 is the wrong aspect ratio.
+// It was ultimately decided that it was better to use the right aspect
+// ratio and have slightly larger borders than to have slightly smaller
+// windowboxing borders. It also means that the aspect ratio is correct
+// when running at 1280x1024. See bug #460 for more details, or this
+// post: http://www.doomworld.com/vb/post/1316735
--- a/src/i_scale.h
+++ b/src/i_scale.h
@@ -47,7 +47,7 @@
extern screen_mode_t mode_squash_2x;
extern screen_mode_t mode_squash_3x;
extern screen_mode_t mode_squash_4x;
-extern screen_mode_t mode_squash_5x;
+// we don't do 5x.
#endif /* #ifndef __I_SCALE__ */
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -122,7 +122,6 @@
&mode_squash_2x,
&mode_squash_3x,
&mode_squash_4x,
- &mode_squash_5x,
};
// SDL video driver name
--- a/src/setup/display.c
+++ b/src/setup/display.c
@@ -80,7 +80,6 @@
{ 960, 720 },
{ 1024, 800 },
{ 1280, 960 },
- { 1280, 1000 },
{ 1600, 1200 },
{ 0, 0},
};