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

Pages: [1] 2 3 ... 723
1
General / Re: Font Loading.
« on: Today at 12:33:59 pm »
How are you using the font?

.\Ironforge.exe
The requested video mode is not available, switching to a valid mode
  VideoMode: { size: { 2560, 1440 }, bitsPerPixel: 32 }
Failed to change display mode for fullscreen
 

But the font problem, I never got it. I also tried to catch std::runtime_error, but it did nothing.
Is 2560, 1440 a valid resolution for your monitor?

Maybe you're mixing debug and release libraries, which could cause odd side effects due to undefined behavior.

2
General / Re: Keyboard Press Once [SOLVED]
« on: Today at 08:35:31 am »
While sf::Keyboard::isKeyPressed may "work", it's not the intended usage to mix it with events.

Unfortunately, I don't know what's causing the events to not have the right value.

3
General / Re: Font Loading.
« on: Today at 08:33:06 am »
Have you tried a different font?
Does it crash with an exception, because of the .value() call on the optional?

4
General discussions / Re: Virus alert during download
« on: May 30, 2024, 11:05:15 pm »
It's a so called false-positive. Would be great if you could report it as such, hopefully someone at McAfee would then clear it.

If you don't want to disable your AV, you're best served by building SFML from source, e.g. by using the SFML CMake template.

5
SFML projects / Re: Tail Smash! - Arcade driving game
« on: May 29, 2024, 11:32:24 pm »
That's a pretty cool write up! I especially liked the diagrams :)

6
General / Re: Can't compile when trying to render text
« on: May 29, 2024, 11:31:08 pm »
That's a known issue when using UCRT-based MinGW versions, as the pre-compiled freetype library were compiled with MSVCRT. You can either switch to a MSVCRT-based MinGW version or build SFML's dependencies with your own compiler.

7
General / Re: Keyboard big issue
« on: May 29, 2024, 01:01:52 pm »
What window manager are you using? Is this running wayland or xlib?

8
General / Re: Keyboard big issue
« on: May 29, 2024, 02:09:49 am »
What version of SFML are you using?

9
General / Re: Keyboard big issue
« on: May 28, 2024, 04:55:17 pm »
Set a break point inside the key pressed event body, run the application through a debugger and check what the value of the key code is.

I have a feeling that you either have a different layout configured that you're expecting, so hitting the specific key doesn't actually trigger something. Or you have something installed on Debian that remaps keyboard values.

It's unlikely an SFML issue, since we've been using basically the same code for a long time now.

10
General / Re: Keyboard big issue
« on: May 28, 2024, 04:29:00 pm »
Are you using a special keyboard layout?

So the following example application doesn't work?

#include <SFML/Graphics.hpp>

int main()
{
    auto window = sf::RenderWindow{ { 1920u, 1080u }, "Color Switcher" };
    window.setFramerateLimit(144);

    auto backgroundColor = sf::Color::Black;

    while (window.isOpen())
    {
        for (auto event = sf::Event{}; window.pollEvent(event);)
        {
            if (event.type == sf::Event::Closed)
            {
                window.close();
            }
            else if (event.type == sf::Event::KeyPressed && event.code == sf::Keyboard::R)
            {
                backgroundColor = sf::Color::Red;
            }
            else if (event.type == sf::Event::KeyRelease && event.code == sf::Keyboard::G)
            {
                backgroundColor = sf::Color::Green;
            }
        }

        window.clear(backgroundColor);
        window.display();
    }
}

If you use SFML 2.6, can you try scancodes instead?

11
General / Re: Keyboard big issue
« on: May 28, 2024, 03:57:55 pm »
That's some interesting code formatting :D
(Btw. you don't need a semicolon after an if-body)

When you say for "letters" are you passing in as key for example sf::Keyboard::A?

12
General / Re: Keyboard big issue
« on: May 28, 2024, 03:16:25 pm »
Can you share some minimal and compiable code that reproduces the issue?

13
General / Re: error during initialisation of SFML
« on: May 27, 2024, 02:09:15 pm »
Just in case someone finds this post or the original poster checks again.

Those kinds of errors are usually an indication that a wrong runtime library was used.
Runtime libraries have to match 100% between that one used with SFML and then one that gets linked into your application.
This means, one needs to make sure to use the exact same compiler version (not just GCC version, but the whole configuration!). Or even simpler, build SFML with your compiler, that guarantees it matches. See also the SFML CMake Template.

14
The application needs the permission, not the terminal or XCode as far as I know.
If you recompile or change the application name, the permission might be removed, but I'm not sure how macOS hands this out.

Either way, I still highly recommend to track keyboard states via events.

15
On macOS in order to use sf::Keyboard::isKeyPressed you'll need to give monitoring permission to the application.
Alternatively, you can use the KeyPressed event that doesn't need any additional permission.

Pages: [1] 2 3 ... 723