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 - Mr Qwak

Pages: [1]
1
System / Re: Mouse wheel problem on OS X.
« on: June 17, 2013, 11:44:07 pm »
Ah, spotted it. Thank you Laurent. :)

Can I also ask, how does it work with the development of the SFML lib. Do you make all the changes yourself, or are other people making changes too? (checking stuff in and out of source control etc).

I imagine, it's just you. Could get rather messy with 'too many cooks spoiling the broth' etc etc. How do you like people to contribute? Just make suggestions on the issue tracker?

2
System / Re: Mouse wheel problem on OS X.
« on: June 17, 2013, 11:11:43 pm »
After some investigation...

It seems the mouse wheel deltaY comes from Mac OS X as a float; and SFML is stuffing it in to an Event struct as an int; which I suspect may be the cause of the issue.

1. First it's a float...

-(void)scrollWheel:(NSEvent *)theEvent
{
    if (m_requester != 0) {
        NSPoint loc = [self cursorPositionFromEvent:theEvent];
       
        m_requester->mouseWheelScrolledAt([theEvent deltaY], loc.x, loc.y);
       
    }
   
    // Transmit to non-SFML responder
    [[self nextResponder] scrollWheel:theEvent];
}

2. Now it's n int...

void WindowImplCocoa::mouseWheelScrolledAt(float delta, int x, int y)
{
    Event event;
    event.type = Event::MouseWheelMoved;
    event.mouseWheel.delta = delta; // suspect the event.mouseWheel.delta is an int?
    event.mouseWheel.x = x;
    event.mouseWheel.y = y;
   
    pushEvent(event);
}

Possibly moving the wheel a single notch at a time is causing low (< 0.5f values in the delta, which are coming out as 0, when it's converted to an int).

Could well be wrong though...

3
General / Building SFML on Mac.
« on: June 17, 2013, 06:34:32 pm »
Hello,

I've just build SFML on Mac, following this great guide: http://www.mjbshaw.com/2013/02/building-sfml-2-with-c11-on-os-x.html

My projects use the SFML frameworks, rather than the dylibs. So my question is, do I just need to build the Frameworks? (don't need to bother with libsfml-audio-s-d.a etc etc.

Thanks.

4
System / Mouse wheel problem on OS X.
« on: June 17, 2013, 12:34:09 pm »
Wondering if this is happening to anyone else...

I'm polling window events okay, and getting the mouse wheel delta (event.mouseWheel.delta). However, if I scroll my mouse wheel in one direction, slowly by continuously, one 'step' at a time; I always get a delta of 0.

Not sure if this is something specific just to the OS X version of SFML? Is there anything I can do to fix this behaviour?

I'm assuming event.mouseWheel.delta, is an int; is that correct?

Any suggestions very much appreciated. Thanks.

5
General / SFML on a Retina Macbook
« on: June 05, 2013, 11:38:10 pm »
Hello,

Does anyone know if SFML works correctly at various resolutions on a Macbook with a Retina display?

As I understand it, on a Retina MB, pixels are not equal to points, which throws a spanner in the works, if you're using SDL. Just wondering if the same issue exists with SFML?

Thanks.

Pages: [1]