- added vid_cropaspect. This cvar turns vid_aspect into a letterboxing function that will crop the unused sides of the screen away, instead of stretching it. Requires one of the non-legacy OpenGL framebuffers to work.
This commit is contained in:
parent
44373b414f
commit
69abf095c9
7 changed files with 26 additions and 9 deletions
|
|
@ -182,8 +182,10 @@ void OpenGLFrameBuffer::Update()
|
|||
Unlock();
|
||||
CheckBench();
|
||||
|
||||
int clientWidth = ViewportScaledWidth(IsFullscreen() ? VideoWidth : GetClientWidth());
|
||||
int clientHeight = ViewportScaledHeight(IsFullscreen() ? VideoHeight : GetClientHeight());
|
||||
int initialWidth = IsFullscreen() ? VideoWidth : GetClientWidth();
|
||||
int initialHeight = IsFullscreen() ? VideoHeight : GetClientHeight();
|
||||
int clientWidth = ViewportScaledWidth(initialWidth, initialHeight);
|
||||
int clientHeight = ViewportScaledHeight(initialWidth, initialHeight);
|
||||
if (clientWidth > 0 && clientHeight > 0 && (Width != clientWidth || Height != clientHeight))
|
||||
{
|
||||
// Do not call Resize here because it's only for software canvases
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue