visualtest/COPYING.txt
author Sam Lantinga
Tue, 20 Oct 2020 11:51:23 -0700
changeset 14181 5e54294cae9e
parent 10737 3406a0f8b041
permissions -rw-r--r--
Fixed bug 5323 - SDL_SetWindowMaximumSize fails if Width or Height is equal to minimum Height or Width

batyastudios

Basicly there is problem and somewhat a solution: https://discourse.libsdl.org/t/setwindowmaximumsize-bug/28267

If you SDL_SetWindowMaximumSize() after SDL_SetWindowMinimumSize() with one of axes have the same value, function will have no effect.

This: (line 2144@SDL_video.c)
if (max_w <= window->min_w || max_h <= window->min_h) {
SDL_SetError("SDL_SetWindowMaximumSize(): Tried to set maximum size smaller than minimum size");
return;
}

May be changed to this:
if (max_w < window->min_w || max_h < window->min_h) {
SDL_SetError("SDL_SetWindowMaximumSize(): Tried to set maximum size smaller than minimum size");
return;
}
     1 Visual and Interactive Test Automation for SDL 2.0
     2 Copyright (C) 2013 Apoorv Upreti <apoorvupreti@gmail.com>
     3 
     4 This software is provided 'as-is', without any express or implied
     5 warranty.  In no event will the authors be held liable for any damages
     6 arising from the use of this software.
     7 
     8 Permission is granted to anyone to use this software for any purpose,
     9 including commercial applications, and to alter it and redistribute it
    10 freely, subject to the following restrictions:
    11 
    12 1. The origin of this software must not be misrepresented; you must not
    13    claim that you wrote the original software. If you use this software
    14    in a product, an acknowledgment in the product documentation would be
    15    appreciated but is not required.
    16 2. Altered source versions must be plainly marked as such, and must not be
    17    misrepresented as being the original software.
    18 3. This notice may not be removed or altered from any source distribution.