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

Pages: [1]
1
Window / Re: Can't access requestFocus function
« on: September 25, 2017, 06:10:14 pm »
Uninstall all traces of SFML first, otherwise you'll end up with using the old binaries.
Also you can't use the Linux download provided on the download page for your Raspberry Pi. Those binaries are x64 and you need ARM and the two distros are quite different overall, so they probably wouldn't be compatible anyways.

I haven't uninstalled the old SFML first, I'll try that (should I use a remove or a purge?)

On the link I provided, there was a x32 download, and that was the one I used. If that's still not going to be compatible, and only the outdated released package is going to be compatible, then I'll need a work around using the outdated version that would accomplish the same request to OS to get focus. Does anyone know a good work around for this or where I could start/find one?

Thanks

2
Window / Re: Can't access requestFocus function
« on: September 22, 2017, 11:47:32 pm »
I've downloaded 2.3.2 and the auto-suggested requestFocus function comes up, however when I compile it, it still is giving the same error: that class sf::RenderWindow has no member named 'requestFocus'. I originally used apt-get install libsfml-dev to start working in sfml, could this outdated package still being integrated be the cause?

3
Window / Re: Can't access requestFocus function
« on: September 22, 2017, 08:16:12 pm »
Ah was going through the changelog and found https://www.sfml-dev.org/download/sfml/2.3.2/  which does have a 32-bit linux installer, and since requestFocus was added as part of 2.2, 2.3.2 should satisfy all my needs. Thanks!

4
Window / Re: Can't access requestFocus function
« on: September 22, 2017, 08:11:41 pm »
As I am running a 32-bit linux OS, is there a simpler way to do this than the tutorial lays out? Going by that I have to build it manually and I will almost positively screw that up haha. From the https://www.sfml-dev.org/download/sfml/2.4.0/    can I download the source code from the "All" section and compile/build it with a flag for 32 bit? Something like -DCMAKE_CXX_FLAGS=-m32?

This is not a very in depth project, I can't imagine needing any extra functionality than I already have except for being able to requestFocus...if there's a way to just inject that, that would work too.

5
Window / Re: Can't access requestFocus function
« on: September 22, 2017, 02:35:18 am »
So I did an general update to my system, as well as $ sudo apt-get install libsfml-dev    which is what the sfml tutorial has to install it first, and it says that libsfml-dev is already the newest version with 0 upgraded packages. Should I be doing this a different way?

Thanks again

6
Window / Re: Can't access requestFocus function
« on: September 22, 2017, 02:30:24 am »
What SFML version are you running?
If requestFocus() can't be found then you must be running like SFML 2.1 which is very old.

Solution then would be to build from source or find an updated package.

I was worried that might be what it was, is it possible to update it easily without having to rewrite my program?

Thanks for the response. I'll start googling how to do that. Again, I'm pretty new to this haha

7
Window / Can't access requestFocus function
« on: September 22, 2017, 02:07:43 am »
This is my first project working with sfml and I'm creating a full screen program on a Raspberry Pi 3 that captures keyboard input and tracks the outcome of a board game. I noticed that occasionally my fullscreen renderwindow will "freeze"- not accept input from keyboard, as well as stopping a rotating set of 4 graphics in one area - and the only way to exit is to kill the program from the command line. Reading more into it, I think I realized that it has to do with my window losing focus. I've researched in depth and found the requestFocus function which I'm hoping will fix my problem- along with some hasFocus booleans - but when I went to implement this, apparently the requestFocus function doesn't exist.

Sf::RenderWindow window;
window.requestFocus();

When I try to compile, it says class sf::RenderWindow has no member named 'requestFocus'. I've tried it with just a Window class as well.

This is honestly one of my first full projects, so it might be a stupid question/simple fix like a #include that I missed or something, but I can't find anything about why this isn't working for me. Anyone got any ideas or workarounds?
Here's my heading:

#include <SFML/Graphics.hpp>
#include <iostream>
#include <cstdio>
#include <cstdlib>

Thanks

Pages: [1]