diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 0359622..12ac8eb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -13,7 +13,7 @@ int main() { texture.setSmooth(true); sf::Vector2u window_size = texture.getSize(); - sf::RenderWindow window(sf::VideoMode(window_size.x, window_size.y), "SFML works!", 0); + sf::RenderWindow window(sf::VideoMode(window_size.x, window_size.y), "SFML works!", 0, sf::ContextSettings(0, 0, 4)); window.setVerticalSyncEnabled(false); window.setFramerateLimit(0); @@ -65,7 +65,7 @@ int main() { sf::Image output_image; output_image.create(flag_width, flag_height, sf::Color::Transparent); - const float playtime_sec = 2.0f; + const float playtime_sec = 1.78f; const float frame_time = 1000.0 / (double)fps / 1000.0; double elapsed_frame_time = 0.0; @@ -93,6 +93,7 @@ int main() { break; } + window.close(); running = false; work_thread.join(); system("ffmpeg -i \"frames/%d.png\" -framerate 24 -filter_complex \"fps=24,split=2[palette_in][gif];[palette_in]palettegen[palette_out];[gif]fifo[gif_fifo]; [gif_fifo][palette_out]paletteuse\" -y output.gif"); |