0 Members and 1 Guest are viewing this topic.
Run-Time Check Failure #2 - Stack around the variable 'app' was corrupted.
int main(int argc, char** argv){ Window app(VideoMode(768, 512, 32), "SFML Window"); const Input& input = app.GetInput(); while (app.IsOpened()) { Event events; while (app.GetEvent(events)) { if ((events.Type == Event::Closed) || // X is clicked ((events.Type == Event::KeyReleased) && (events.Key.Code == Key::Escape))) // Esc is released app.Close(); } // Arrow Keys bool LeftKeyDown = input.IsKeyDown(Key::Left); bool RightKeyDown = input.IsKeyDown(Key::Right); bool UpKeyDown = input.IsKeyDown(Key::Up); bool DownKeyDown = input.IsKeyDown(Key::Down); // Mouse bool LeftDown = input.IsMouseButtonDown(Mouse::Left); bool MiddleDown = input.IsMouseButtonDown(Mouse::Middle); bool RightDown = input.IsMouseButtonDown(Mouse::Right); unsigned int MouseX = input.GetMouseX(); unsigned int MouseY = input.GetMouseY(); app.Display(); } return 0;}