SDL icon indicating copy to clipboard operation
SDL copied to clipboard

[patch] Add SDL_RecreateWindow() to the API

Open SDLBugzilla opened this issue 4 years ago • 1 comments
trafficstars

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 2.0.9 Reported for operating system, platform: All, All

Comments on the original bug report:

On 2019-01-09 14:39:17 +0000, David Lönnhager wrote:

Created attachment 3560 Add SDL_RecreateWindow() to the API

Hello

I'd like to expose the function SDL_RecreateWindow() to users of SDL. The reason is to make it possible to recreate windows with certain flags (manually), eg SDL_WINDOW_OPENGL.

Cf. https://github.com/pygame/pygame/issues/712

On 2020-12-12 18:38:38 +0000, Rene Dudfield wrote:

Any chance of exposing SDL_RecreateWindow?

On 2020-12-13 03:28:59 +0000, Sam Lantinga wrote:

Possibly, let's look at it post-2.0.14 release.

SDLBugzilla avatar Feb 11 '21 01:02 SDLBugzilla

This is a no for SDL2 at this point, and I'm inclined to say no for SDL3, too.

icculus avatar May 25 '23 00:05 icculus

This is a no for SDL2 at this point, and I'm inclined to say no for SDL3, too.

Why? For me, this will be very useful, because I create my window with SDL_CreateWindowFrom and I can't change flags after. The problem is by default a window use hardware acceleration, and I don't want of this. So this method is my last chance... or SDL_CreateWindowFrom need to be modified to accept new flags.

ZetaMap avatar Jun 29 '24 13:06 ZetaMap

When using SDL_CreateWindowFrom(), you can just destroy the window and then call it again.

slouken avatar Jun 29 '24 17:06 slouken

yes but this function doesn't to allow to provide new flags

ZetaMap avatar Jun 30 '24 12:06 ZetaMap

Ah, good point. What you want is SDL_CreateWindowWithProperties() in SDL3.

slouken avatar Jun 30 '24 15:06 slouken

mmm probably, but it's in SDL3 which hasn't been released yet (I think). There is no function to changes flags of a window in SDL2?

ZetaMap avatar Jul 01 '24 18:07 ZetaMap

No, there isn’t, but we’re working towards an SDL3 release and you’re welcome to grab the current source from GitHub and see if it meets your needs.

slouken avatar Jul 01 '24 18:07 slouken

ok, thanks

ZetaMap avatar Jul 04 '24 19:07 ZetaMap