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

Pages: [1]
1
General / SFML and Raw Mouse
« on: April 11, 2009, 04:18:04 pm »
ah, I get it now.. will have to try it out monday :)

thanks!

2
General / SFML and Raw Mouse
« on: April 11, 2009, 04:06:49 pm »
Im not sure I know what you mean. How would that help us getting the LPARAM sent along with the WM_INPUT message?

Code: [Select]
// When the WM_INPUT message is received, the lparam must be passed to this function

3
General / SFML and Raw Mouse
« on: April 11, 2009, 06:21:00 am »
The relation to SFML.. well we (yes, im working with Znake) are building the engine in SFML and Visual C++. It seems a regular Win32 project in Visual Studio 2008 has no problem passing through the correct LPARAM from the WM_INPUT message. How can we catch that event in SFML?

we figuered the GlobalOnEvent() function in the lib source would be the best way to catch it, but so far we've been unsuccesfull.

long story short: a normal Win32 app can properly catch the WM_INPUT message and pass through the LPARAM we need to Raw Mouse. Can we do this in SFML, as a console app with SFML windows, and if so how's the best way to do it?

thanks.

4
System / Clock getting paused by Sleep()
« on: April 10, 2009, 02:16:49 am »
Couldn't find any information about this so I figuered i'd had to ask :)

We're currently working on a game projekt and we've done some prototyping in SFML.. From what we can see a sf::Clock will return incorrect values if used along with a sleep.

example1:
Code: [Select]

sf::Clock Clock;
while(true)
{
    //do some stuff, break after 60 seconds
    Sleep(1);
}
std::cout << Clock.GetElapsedTime() << std::endl;

we tested with a stop watch and broke the loop manually after 60 seconds, the Clock.GetElapsedTime() would return a value of ~35 seconds.

example2:
Code: [Select]

sf::Clock Clock;
while(true)
{
    //do some stuff, break after 60 seconds
    //Sleep(1);
}
std::cout << Clock.GetElapsedTime() << std::endl;

with the sleep out of the way, and the programm still running for 60 seconds, it returned a far more precise value.

Is there something we're doing wrong or is this a bug?

to work around it we're using floats in wich we add all the sleep values and then add the Clocks time.

edit: I'm using windows XP btw.

Pages: [1]
anything