Skip to content

Fix outdated CSFML 2 calls in mainpage example - #423

Merged
eXpl0it3r merged 1 commit into
SFML:masterfrom
MaximeTre:fix-mainpage-example
Nov 13, 2026
Merged

eXpl0it3r merged 1 commit into
SFML:masterfrom
MaximeTre:fix-mainpage-example

Conversation

@MaximeTre

Copy link
Copy Markdown
Contributor

The short example on the documentation main page still uses the CSFML 2 API
and fails to compile against CSFML 3:

  • sfRenderWindow_create() is missing the new sfWindowState argument
    (error: too few arguments to function 'sfRenderWindow_create'; expected 5, have 4)
  • sfSprite_create() now takes the texture as argument, which also makes the
    following sfSprite_setTexture() call redundant

I ran into this while learning CSFML 3 and checked that the updated example
compiles cleanly against the current headers (-Wall -Wextra, no warnings).

The example on the documentation main page still used the CSFML 2 API
and fails to compile against CSFML 3:

- sfRenderWindow_create() now takes an sfWindowState argument
- sfSprite_create() now takes the texture, which makes the following
  sfSprite_setTexture() call redundant
@eXpl0it3r eXpl0it3r added the Bug label Nov 12, 2026
@eXpl0it3r
eXpl0it3r merged commit 1f52acb into SFML:master Nov 13, 2026
61 of 62 checks passed
@eXpl0it3r

Copy link
Copy Markdown
Member

Thank you for the fixes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants