Hey, I'm using SFML 1.6 on a win 7 machine.
My problem is that my program needs a stopable watch, so I am trying to modify the sf::clock class to include a stopwatch function. The function looks like this.
bool Clock::stopwatch(int ms)
{
if (GetTime() > stopwatch_start + ms ) {
stopwatch_start = GetTime();
return true;}
else return false;
}
GetTime() is just: return static_cast<double>sf::priv::Platform::GetSystemTime();
Anyhow, the problem isn't with the function itself. The problem is the stopwatch_start.
Apparently declaring a extra int/float/double/dword variable in the clock.hpp file causes the Renderwindow function Clear(); to malfunction and give me an access violation reading error on the next line.
The program runs fine(with the exclusion of the stopwatch function) if I remove declaration of the stopwatch_start. (for the reference it is declared as double stopwatch_start; as a private member of clock).
Could anyone post me any tips?