Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ShardTheBroken

Pages: [1]
1
Sorry for bringing up an old topic, but I am having this exact same issue with Ubuntu 24.04, g++14. Here is a link to a video showing the issue: https://drive.google.com/file/d/12NNll-IviG9l_DNPJ6k5ZhanWEakC7MS/view?usp=sharing.

My resize handling code is equivalent to:

if( event.type == sf::Event::Resized )
{
        Vector2u size { std::max( event.size.width, MinWindowWidth ), std::max( event.size.height, MinWindowHeight ) };

        if( size.x != event.size.width || size.y != event.size.height )
        {
                m_window->setSize( size );
                continue;
        }

        sf::View view = m_window->getView();
        Vector2f tl = view.getCenter() - ( view.getSize() * 0.5f );

        view.setSize( Vector2f( static_cast<float>( event.size.width ), static_cast<float>( event.size.height ) ) );
        view.setCenter( tl + Vector2f( view.getSize() * 0.5f ) );
        view.setViewport( { { 0.f, 0.f }, { 1.f, 1.f } } );

        m_window->setView( view );
}
 

Edit: Using SFML 2.6.1

Pages: [1]