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 1436 - SDL_CreateWindow() with SDL_WINDOWPOS_CENTERED has no effect
Summary: SDL_CreateWindow() with SDL_WINDOWPOS_CENTERED has no effect
Status: RESOLVED WORKSFORME
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: iPhone/iPod touch iOS (All)
: P2 minor
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.0
Depends on:
Blocks:
 
Reported: 2012-02-29 22:31 UTC by brad
Modified: 2013-07-31 20:16 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description brad 2012-02-29 22:31:56 UTC
we recently upgraded our game to USE SDL 2.0 without the old compatibility layer. Previously creating an 800x600 display would center the view, but after upgrading to 2.0 and using SDL_CreateWindow() with SDL_WINDOWPOS_CENTERED the view is in the upper left corner. it is'nt just SDL_WINDOWPOS_CENTERED that doesn't work either, because nothing we pass has any effect on the x,y position.
Comment 1 Ryan C. Gordon 2013-07-12 22:15:40 UTC
(Sorry if you get a lot of copies of this email, we're touching dozens of bug reports right now.)

Tagging a bunch of bugs as target-2.0.0, Priority 2.

This means we're in the final stretch for an official SDL 2.0.0 release! These are the bugs we really want to fix before shipping if humanly possible.

That being said, we don't promise to fix them because of this tag, we just want to make sure we don't forget to deal with them before we bless a final 2.0.0 release, and generally be organized about what we're aiming to ship.

Hopefully you'll hear more about this bug soon. If you have more information (including "this got fixed at some point, nevermind"), we would love to have you come add more information to the bug report when you have a moment.

Thanks!
--ryan.
Comment 2 Sam Lantinga 2013-07-13 02:34:51 UTC
iOS windows cover the entire view and position is meaningless with them.  Is the Platform and OS correct on this bug?
Comment 3 Ryan C. Gordon 2013-07-31 20:16:21 UTC
(In reply to comment #2)
> iOS windows cover the entire view and position is meaningless with them.  Is
> the Platform and OS correct on this bug?

I wonder if this predated the retina support, so we're positioning the window at (0,0) and asking for the screen size without scaling, so it looks like we shoved it in the corner incorrectly?

Alternately, we were doing the right thing and they set the viewport to 800x600, causing this effect, because SDL 1.2 would center a view in the display.

I'm closing this bug. If this is still a problem in SDL, feel free to reopen the bug.

--ryan.