mirror of
https://github.com/SFML/SFML.git
synced 2024-11-24 20:31:05 +08:00
Fix outdated template code
This commit is contained in:
parent
e53f4d62af
commit
4f28851ee6
@ -26,11 +26,7 @@ int main()
|
||||
sf::RenderWindow window(sf::VideoMode({800, 600}), "SFML window");
|
||||
|
||||
// Set the Icon
|
||||
sf::Image icon;
|
||||
if (!icon.loadFromFile(resourcePath() / "icon.png"))
|
||||
{
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
const auto icon = sf::Image::loadFromFile(resourcePath() / "icon.png").value();
|
||||
window.setIcon(icon);
|
||||
|
||||
// Load a sprite to display
|
||||
|
@ -24,11 +24,7 @@ int main()
|
||||
sf::RenderWindow window(sf::VideoMode({800, 600}), "SFML window");
|
||||
|
||||
// Set the Icon
|
||||
sf::Image icon;
|
||||
if (!icon.loadFromFile("icon.png"))
|
||||
{
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
const auto icon = sf::Image::loadFromFile("icon.png").value();
|
||||
window.setIcon(icon);
|
||||
|
||||
// Load a sprite to display
|
||||
|
Loading…
Reference in New Issue
Block a user