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 - ph03nix

Pages: [1]
1
Window / Re: Dragging the window causes display to stop updating
« on: December 07, 2013, 04:26:53 pm »
I'm making a rhythm game where the music syncs up to the gameplay, and dragging the display causes the game to become de-synchronized. I was previously using allegro, and dragging the display did not cause the game logic to stop.

2
Window / Re: AW: Dragging the window causes display to stop updating
« on: December 06, 2013, 10:24:23 pm »
Yes that is SFML 1.6 code. I'm not sure, but could you try to poll the events in the thread you created the window and draw in a separate thread?

That worked. Thanks! :D

Although when I call window.create to recreate the window with a different style it crashes or malfunctions (in any of the threads)

3
Window / Re: Dragging the window causes display to stop updating
« on: December 06, 2013, 08:27:51 pm »
Is this from a different version of SFML? It says to put GetEvent on a seperate thread, but SFML 2.1 only has pollEvent.

Either way I tried putting pollEvent on a seperate thread, but the window locks up (can't drag, minimize, close) unless it's being called on the main thread.

I have a function like this:

int pollThread(){
       
        while (window.isOpen()){

                sf::Event ev;
                while (window.pollEvent(ev)){
                        if (ev.type == sf::Event::Closed){
                                window.close();
                                return 0;
                        }
                }
        }
}

And before I have the drawing loop in the main function I do this:

sf::Thread thread(&pollThread);
thread.launch();

4
Window / Dragging the window causes display to stop updating
« on: November 30, 2013, 07:36:37 pm »
I'm using SFML 2.1 on Windows 7 and XP.

I noticed that when I click and draw the SFML window's title bar to drag the window around, the display stops updating until I release it. Is there a way to fix this?

Pages: [1]
anything