mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +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");
|
sf::RenderWindow window(sf::VideoMode({800, 600}), "SFML window");
|
||||||
|
|
||||||
// Set the Icon
|
// Set the Icon
|
||||||
sf::Image icon;
|
const auto icon = sf::Image::loadFromFile(resourcePath() / "icon.png").value();
|
||||||
if (!icon.loadFromFile(resourcePath() / "icon.png"))
|
|
||||||
{
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
window.setIcon(icon);
|
window.setIcon(icon);
|
||||||
|
|
||||||
// Load a sprite to display
|
// Load a sprite to display
|
||||||
|
@ -24,11 +24,7 @@ int main()
|
|||||||
sf::RenderWindow window(sf::VideoMode({800, 600}), "SFML window");
|
sf::RenderWindow window(sf::VideoMode({800, 600}), "SFML window");
|
||||||
|
|
||||||
// Set the Icon
|
// Set the Icon
|
||||||
sf::Image icon;
|
const auto icon = sf::Image::loadFromFile("icon.png").value();
|
||||||
if (!icon.loadFromFile("icon.png"))
|
|
||||||
{
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
window.setIcon(icon);
|
window.setIcon(icon);
|
||||||
|
|
||||||
// Load a sprite to display
|
// Load a sprite to display
|
||||||
|
Loading…
Reference in New Issue
Block a user