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.


Topics - arpeggiodragon

Pages: [1]
1
Window / Oddity with Event.Key.Code(s) ?
« on: August 11, 2010, 06:21:35 am »
This one is very straightforward. Using this code:

Code: [Select]

        while (window.GetEvent(Event))
        {
  if( Event.Key.Code == sf::Key::Down )
{  
             // setting a breakpoint here triggers when the mouse gets moved most the time.


Moving the mouse around will trigger Key::Dir events and possibly (untested) others. Very strange.

Windows XP. VC++ 09. SFML2.0


[edit] - I investigated this further and found this to be re-produceable when moving the the mouse coordinates outside of the top-left corner of the window and back.

In other words: Just shake the mouse real fast next to the window icon. :P

2
Graphics / ~Image() crash -sfml2.0
« on: August 04, 2010, 05:29:23 am »
I will sometimes get a crash from the Image destructor on program exit. "Sometimes" as in not very often, but occasionally.  -MSVC 2008 _DEBUG setting.

Here is the main function with non-SFML code removed:

Code: [Select]

int main()
{
sf::RenderWindow window(sf::VideoMode(640, 480), "SFML OpenGL" );

sf::Image tilesheet;
if (!tilesheet.LoadFromFile("image.png"))
          return -123;

  // create OpenGL texture with tilesheet.GetPixelsPtr()
 
  // -main loop
  {
  // OpenGL code here
window.SaveGLStates();
{
window.Draw(text);
}
window.RestoreGLStates();

window.Display();
  }
  return 0;
}

Pages: [1]
anything