Skip to content

Commit

Permalink
SFML 3 added a new sf::State parameter to the window constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
texus committed Jan 22, 2024
1 parent e9b423b commit 4fca994
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/main-SFML_OPENGL3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int main()
settings.minorVersion = 3;

#if SFML_VERSION_MAJOR >= 3
sf::Window window(sf::VideoMode{{800, 600}}, "TGUI example (SFML-OpenGL3)", sf::Style::Default, settings);
sf::Window window(sf::VideoMode{{800, 600}}, "TGUI example (SFML-OpenGL3)", sf::Style::Default, sf::State::Windowed, settings);
#else
sf::Window window({800, 600}, "TGUI example (SFML-OpenGL3)", sf::Style::Default, settings);
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/DefaultBackendWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ namespace tgui
#endif

#if SFML_VERSION_MAJOR >= 3
m_window.create(sf::VideoMode{{width, height}}, title.toStdString(), sf::Style::Default, settings);
m_window.create(sf::VideoMode{{width, height}}, title.toStdString(), sf::Style::Default, sf::State::Windowed, settings);
#else
m_window.create(sf::VideoMode{width, height}, title.toStdString(), sf::Style::Default, settings);
#endif
Expand Down
2 changes: 1 addition & 1 deletion tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ struct TestsWindowDefault : public TestsWindowBase
}

#if SFML_VERSION_MAJOR >= 3
sf::Window window{sf::VideoMode{{windowWidth, windowHeight}}, windowTitle, sf::Style::Default, sf::ContextSettings(0, 0, 0, 3, 3, sf::ContextSettings::Attribute::Core)};
sf::Window window{sf::VideoMode{{windowWidth, windowHeight}}, windowTitle, sf::Style::Default, sf::State::Windowed, sf::ContextSettings(0, 0, 0, 3, 3, sf::ContextSettings::Attribute::Core)};
#else
sf::Window window{sf::VideoMode{windowWidth, windowHeight}, windowTitle, sf::Style::Default, sf::ContextSettings(0, 0, 0, 3, 3, sf::ContextSettings::Attribute::Core)};
#endif
Expand Down

0 comments on commit 4fca994

Please sign in to comment.