- limit minimum screen size to 640x400.

The current menu system simply does not work that well with 320x200, rendering the game hard to use at that tiny screen size. This is a clear case where the work required to keep it operational stands in no relation to the benefit.
This commit is contained in:
Christoph Oelckers 2019-03-31 09:13:22 +02:00
parent 2dc12aef71
commit ab16d3cd72
6 changed files with 17 additions and 17 deletions

View file

@ -91,8 +91,8 @@ private:
int GetTitleBarHeight() const; int GetTitleBarHeight() const;
static const int MINIMUM_WIDTH = 320; static const int MINIMUM_WIDTH = 640;
static const int MINIMUM_HEIGHT = 200; static const int MINIMUM_HEIGHT = 400;
}; };
#endif // COCOA_GL_SYSFB_H_INCLUDED #endif // COCOA_GL_SYSFB_H_INCLUDED

View file

@ -47,8 +47,8 @@ protected:
void UpdateColors (); void UpdateColors ();
static const int MIN_WIDTH = 320; static const int MIN_WIDTH = 640;
static const int MIN_HEIGHT = 200; static const int MIN_HEIGHT = 400;
}; };
#endif // __POSIX_SDL_GL_SYSFB_H__ #endif // __POSIX_SDL_GL_SYSFB_H__

View file

@ -32,16 +32,16 @@
extern bool setsizeneeded; extern bool setsizeneeded;
EXTERN_CVAR(Int, vid_aspect) EXTERN_CVAR(Int, vid_aspect)
CUSTOM_CVAR(Int, vid_scale_customwidth, 320, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) CUSTOM_CVAR(Int, vid_scale_customwidth, 640, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
{ {
if (self < 320) if (self < 640)
self = 320; self = 640;
setsizeneeded = true; setsizeneeded = true;
} }
CUSTOM_CVAR(Int, vid_scale_customheight, 200, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) CUSTOM_CVAR(Int, vid_scale_customheight, 400, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
{ {
if (self < 200) if (self < 400)
self = 200; self = 400;
setsizeneeded = true; setsizeneeded = true;
} }
CVAR(Bool, vid_scale_customlinear, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) CVAR(Bool, vid_scale_customlinear, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
@ -66,7 +66,7 @@ namespace
// isValid, isLinear, GetScaledWidth(), GetScaledHeight(), isScaled43, isCustom // isValid, isLinear, GetScaledWidth(), GetScaledHeight(), isScaled43, isCustom
{ true, false, [](uint32_t Width)->uint32_t { return Width; }, [](uint32_t Height)->uint32_t { return Height; }, false, false }, // 0 - Native { true, false, [](uint32_t Width)->uint32_t { return Width; }, [](uint32_t Height)->uint32_t { return Height; }, false, false }, // 0 - Native
{ true, true, [](uint32_t Width)->uint32_t { return Width; }, [](uint32_t Height)->uint32_t { return Height; }, false, false }, // 1 - Native (Linear) { true, true, [](uint32_t Width)->uint32_t { return Width; }, [](uint32_t Height)->uint32_t { return Height; }, false, false }, // 1 - Native (Linear)
{ true, false, [](uint32_t Width)->uint32_t { return 320; }, [](uint32_t Height)->uint32_t { return 200; }, true, false }, // 2 - 320x200 { true, false, [](uint32_t Width)->uint32_t { return 640; }, [](uint32_t Height)->uint32_t { return 400; }, true, false }, // 2 - formerly 320x200
{ true, false, [](uint32_t Width)->uint32_t { return 640; }, [](uint32_t Height)->uint32_t { return 400; }, true, false }, // 3 - 640x400 { true, false, [](uint32_t Width)->uint32_t { return 640; }, [](uint32_t Height)->uint32_t { return 400; }, true, false }, // 3 - 640x400
{ true, true, [](uint32_t Width)->uint32_t { return 1280; }, [](uint32_t Height)->uint32_t { return 800; }, true, false }, // 4 - 1280x800 { true, true, [](uint32_t Width)->uint32_t { return 1280; }, [](uint32_t Height)->uint32_t { return 800; }, true, false }, // 4 - 1280x800
{ true, true, [](uint32_t Width)->uint32_t { return vid_scale_customwidth; }, [](uint32_t Height)->uint32_t { return vid_scale_customheight; }, true, true }, // 5 - Custom { true, true, [](uint32_t Width)->uint32_t { return vid_scale_customwidth; }, [](uint32_t Height)->uint32_t { return vid_scale_customheight; }, true, true }, // 5 - Custom
@ -90,7 +90,8 @@ CUSTOM_CVAR(Float, vid_scalefactor, 1.0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR
CUSTOM_CVAR(Int, vid_scalemode, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) CUSTOM_CVAR(Int, vid_scalemode, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
{ {
setsizeneeded = true; setsizeneeded = true;
if (isOutOfBounds(self)) if (self == 2) self = 3; // block 320x200 setting.
else if (isOutOfBounds(self))
self = 0; self = 0;
} }

View file

@ -210,8 +210,8 @@ void DFrameBuffer::Update()
int initialHeight = GetClientHeight(); int initialHeight = GetClientHeight();
int clientWidth = ViewportScaledWidth(initialWidth, initialHeight); int clientWidth = ViewportScaledWidth(initialWidth, initialHeight);
int clientHeight = ViewportScaledHeight(initialWidth, initialHeight); int clientHeight = ViewportScaledHeight(initialWidth, initialHeight);
if (clientWidth < 320) clientWidth = 320; if (clientWidth < 640) clientWidth = 640;
if (clientHeight < 200) clientHeight = 200; if (clientHeight < 400) clientHeight = 400;
if (clientWidth > 0 && clientHeight > 0 && (GetWidth() != clientWidth || GetHeight() != clientHeight)) if (clientWidth > 0 && clientHeight > 0 && (GetWidth() != clientWidth || GetHeight() != clientHeight))
{ {
SetVirtualSize(clientWidth, clientHeight); SetVirtualSize(clientWidth, clientHeight);

View file

@ -525,8 +525,8 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
} }
else else
{ {
mmi->ptMinTrackSize.x = 320; mmi->ptMinTrackSize.x = 640;
mmi->ptMinTrackSize.y = 200; mmi->ptMinTrackSize.y = 400;
} }
return 0; return 0;
} }

View file

@ -2132,7 +2132,6 @@ OptionValue ScaleModes
{ {
0, "$OPTVAL_SCALENEAREST" 0, "$OPTVAL_SCALENEAREST"
1, "$OPTVAL_SCALELINEAR" 1, "$OPTVAL_SCALELINEAR"
2, "320x200"
3, "640x400" 3, "640x400"
4, "1280x800" 4, "1280x800"
5, "$OPTVAL_CUSTOM" 5, "$OPTVAL_CUSTOM"