We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1332 - SDL-1.2: image not stretched in X11 (linux). 1.2.13 was fine.
Summary: SDL-1.2: image not stretched in X11 (linux). 1.2.13 was fine.
Status: RESOLVED INVALID
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 1.2.14
Hardware: x86 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-20 01:19 UTC by Ozkan Sezer
Modified: 2011-12-29 01:53 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ozkan Sezer 2011-11-20 01:19:46 UTC
Received the following bug report:

>>> For me, on linux, the software renderer doesn't "stretch"
>>> its image when in fullscreen. That is, I get an image the
>>> size of the chosen resolution in the center of a black
>>> screen the size of my desktop resolution.
>>
>> Is this with all resolutions or with a specific low res?
>
> Yes, this is with all resolution choosable from the menu.
> 1280x800 matches my desktop resolution, so that one does
> fill the entire screen obviously.

This I reproduced, but only with SDL-1.2 from hg development
tree compiled by me. With SDL-1.2.13 that came with fedora 9
(specifically SDL-1.2.13-3.fc9.i386) doesn't have this problem.

The game in question is hexen2, see uhexen2.sf.net. If you need
more information, please feel free to ask.
Comment 1 Ozkan Sezer 2011-11-20 01:39:20 UTC
To be sure, I compiled plain SDL-1.2.13 and 1.2.14 versions
myself and verified that 1.2.13 does not have this problem but
1.2.14 indeed does.  Therefore this seems like a regression
against 1.2.13.
Comment 2 Ozkan Sezer 2011-11-20 12:55:28 UTC
OK, after pulling out my hair for hours, I nailed the offending code in my
sources: I am (was) doing a qsort() on the list of video modes I get from
SDL_ListModes().  After making a copy and sorting the copy instead of the
original, things work OK (proper stretching) with SDL >= 1.2.14.

Is sorting the original modes list considered harmful?  If it is, why did
it work with SDL <= 1.2.13 and why did it cause this weird side effect with
SDL >= 1.2.14?
Comment 3 Sam Lantinga 2011-12-29 01:53:12 UTC
I'm not sure why the behavior changed, but the list of video modes is definitely supposed to be const.