diff --git a/python/setup.py b/python/setup.py index 9eed271e7..589cff294 100644 --- a/python/setup.py +++ b/python/setup.py @@ -10,16 +10,16 @@ setup(name='PySFML', author_email='remi.k2620@gmail.com', url='http://www.sfml-dev.org/', license='zlib/png', - ext_modules=[ Extension('PySFML.sf', \ - ['src/Clock.cpp', 'src/Color.cpp', 'src/Drawable.cpp', \ - 'src/Event.cpp', 'src/Image.cpp', 'src/Input.cpp', 'src/Key.cpp', 'src/main.cpp', 'src/Music.cpp', \ - 'src/PostFX.cpp', 'src/Rect.cpp', 'src/RenderWindow.cpp', 'src/Sleep.cpp', \ - 'src/Sprite.cpp', 'src/String.cpp', 'src/VideoMode.cpp', 'src/View.cpp', 'src/Window.cpp', \ - 'src/Joy.cpp', 'src/Mouse.cpp', 'src/WindowStyle.cpp', 'src/Blend.cpp', 'src/Sound.cpp', \ - 'src/SoundBuffer.cpp', 'src/Listener.cpp', 'src/SoundRecorder.cpp', 'src/SoundBufferRecorder.cpp', \ - 'src/SoundStream.cpp', 'src/Font.cpp', 'src/Glyph.cpp', 'src/Shape.cpp', 'src/WindowSettings.cpp' ], \ - libraries=['sfml-graphics', 'sfml-window', 'sfml-audio', 'sfml-system'], \ - library_dirs=['../lib/mingw'], \ + ext_modules=[ Extension('PySFML.sf', + ['src/Clock.cpp', 'src/Color.cpp', 'src/Drawable.cpp', + 'src/Event.cpp', 'src/Image.cpp', 'src/Input.cpp', 'src/Key.cpp', 'src/main.cpp', 'src/Music.cpp', + 'src/PostFX.cpp', 'src/Rect.cpp', 'src/RenderWindow.cpp', 'src/Sleep.cpp', + 'src/Sprite.cpp', 'src/String.cpp', 'src/VideoMode.cpp', 'src/View.cpp', 'src/Window.cpp', + 'src/Joy.cpp', 'src/Mouse.cpp', 'src/WindowStyle.cpp', 'src/Blend.cpp', 'src/Sound.cpp', + 'src/SoundBuffer.cpp', 'src/Listener.cpp', 'src/SoundRecorder.cpp', 'src/SoundBufferRecorder.cpp', + 'src/SoundStream.cpp', 'src/Font.cpp', 'src/Glyph.cpp', 'src/Shape.cpp', 'src/WindowSettings.cpp'], + libraries=['sfml-graphics', 'sfml-window', 'sfml-audio', 'sfml-system'], + library_dirs=['../lib/mingw'], include_dirs=['../include'] )], package_dir = {'PySFML':'PySFML'}, diff --git a/python/src/Joy.cpp b/python/src/Joy.cpp index 7f20f68f3..fdce88c69 100644 --- a/python/src/Joy.cpp +++ b/python/src/Joy.cpp @@ -101,5 +101,14 @@ void PySfJoy_InitConst() obj = PyLong_FromLong(sf::Joy::AxisPOV); PyDict_SetItemString(PySfJoyType.tp_dict, "AxisPOV", obj); Py_DECREF(obj); + obj = PyLong_FromLong(sf::Joy::Count); + PyDict_SetItemString(PySfJoyType.tp_dict, "Count", obj); + Py_DECREF(obj); + obj = PyLong_FromLong(sf::Joy::AxisCount); + PyDict_SetItemString(PySfJoyType.tp_dict, "AxisCount", obj); + Py_DECREF(obj); + obj = PyLong_FromLong(sf::Joy::ButtonCount); + PyDict_SetItemString(PySfJoyType.tp_dict, "ButtonCount", obj); + Py_DECREF(obj); } diff --git a/python/src/Mouse.cpp b/python/src/Mouse.cpp index d0165efc2..f2fe20976 100644 --- a/python/src/Mouse.cpp +++ b/python/src/Mouse.cpp @@ -95,5 +95,8 @@ void PySfMouse_InitConst() obj = PyLong_FromLong(sf::Mouse::XButton2); PyDict_SetItemString(PySfMouseType.tp_dict, "XButton2", obj); Py_DECREF(obj); + obj = PyLong_FromLong(sf::Mouse::ButtonCount); + PyDict_SetItemString(PySfMouseType.tp_dict, "ButtonCount", obj); + Py_DECREF(obj); }