Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Comments out Joystick name code.
  • Loading branch information
NoobsArePeople2 committed Sep 18, 2013
1 parent 03446c4 commit a38e67b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
7 changes: 2 additions & 5 deletions ResourcePath.cpp
@@ -1,15 +1,12 @@
//-------------------------------------------------------
//
// Resource Path for using SFML in Eclipse CDT.
//
// Uses CoreFoundation on Mac OS to return the proper
// resource path for bundled applications
//
// Based on resourcePath.mm provided with the Xcode
// templates for SFML. This version contains no
// Objective-C code, allowing it to be compiled in
// Eclipse so the file can be used regardless of platform
// or development environment.
// non-Xcode IDEs so the file can be used regardless of
// platform or development environment.
//
//-------------------------------------------------------

Expand Down
12 changes: 8 additions & 4 deletions main.cpp
Expand Up @@ -73,10 +73,12 @@ int main()
accumulator -= updateInterval;
++ticks;
sf::Event event;
win.pollEvent(event);
if (event.type == sf::Event::Closed)
while (win.pollEvent(event))
{
win.close();
if (event.type == sf::Event::Closed)
{
win.close();
}
}

// Update loop
Expand All @@ -103,7 +105,9 @@ int main()
float povY = hasPovY ? sf::Joystick::getAxisPosition(i, sf::Joystick::PovY) : 0;

std::ostringstream stream;
stream << sf::Joystick::getName(i) << "\n";
// Uncomment this if you are using an SFML version that supports
// Joystick names. See: https://github.com/NoobsArePeople2/SFML
// stream << sf::Joystick::getName(i) << "\n";
stream << "Axis X: " << x << "\nAxis Y: " << y << "\nAxis Z: " << z;
gui.at(i).at(0).setString(stream.str());
stream.str("");
Expand Down

0 comments on commit a38e67b

Please sign in to comment.