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.


Topics - kitstainedheart

Pages: [1]
1
Window / [BUG] SFML polls input from another window
« on: May 30, 2016, 10:21:09 pm »
Hello and good afternoon,
I am having to deal with a SFML bug that is rather annoying on Windows 10, and I would like help if possible...
So, my application is made on C++, it consists 1 classical SFML RenderWindow and 1 classical STD console output window(for debugging and such), input detection is made through "sf::Keyboard::isKeyPressed", however, SFML is using the CONSOLE WINDOW to detect my key presses, even on the default SFML boiler plate code...
I have tried compiling the library myself, but it does NOT change anything, the binaries provided by the site give me the same result...
Its really troublesome because, the same code works on Linux...
I am using SFML 2.3.2, on MinGW GCC DW2 32bit, on Windows 10 64bit (but the application is 32bit)~~
Can anyone give me support on this?
TESTING CODE IF ANYONE NEEDS IT:
#include <iostream>
#include <SFML/Graphics/RenderWindow.hpp>
#include <SFML/Window/Event.hpp>

using namespace std;

int main(int argc, char *argv[])
{
        cout << "Hello World!" << endl;
        bool isPlaying = true;
        sf::RenderWindow window(sf::VideoMode(800, 600), "SFMLInputTest");
        sf::Event gameEvent;
        while (isPlaying){
                while (window.pollEvent(gameEvent)){
                        if (gameEvent.type == sf::Event::Closed){
                                isPlaying = false;
                        }
                }
                if (sf::Keyboard::isKeyPressed(sf::Keyboard::Key::B))
                        isPlaying = false;
                window.clear();
                window.display();
        }
        return 0;
}
 
Thanks in advance...

Pages: [1]