Bläddra i källkod

Fix OpenAL error when closing

Wolf Clement 4 år sedan
förälder
incheckning
bd9bd6ca9e
5 ändrade filer med 13 tillägg och 10 borttagningar
  1. 1 1
      .gitignore
  2. 4 4
      README.md
  3. 1 1
      build.py
  4. 6 3
      main.py
  5. 1 1
      setup.py

+ 1 - 1
.gitignore

@@ -4,4 +4,4 @@ __pycache__
 
 build/
 dist/
-csgo_quake_sounds.egg-info/
+*.egg-info/

+ 4 - 4
README.md

@@ -6,14 +6,14 @@ Custom sounds in your Counter-Strike : Global Offensive matches.
 
 ### FAQ
 
-* Will I get banned for using this ?
-
-No. This is using [Game State Integration](https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Game_State_Integration), which is allowed by Valve.
-
 * Does it work in matchmaking ? On faceit ?
 
 Yes.
 
+* Will I get banned for using this ?
+
+No. This is using [Game State Integration](https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Game_State_Integration), which is allowed by Valve.
+
 * How do I add my own sounds ?
 
 Drop your sounds in the corresponding `sounds` folder. Feel free to remove the ones you don't like, too.

+ 1 - 1
build.py

@@ -21,7 +21,7 @@ executables = [Executable("main.py", base=base, targetName="csgo-custom-sounds.e
 
 setup(
     name="csgo-custom-sounds",
-    version="1.5",
+    version="1.5.1",
     description="Play custom sounds via Gamestate Integration",
     options=dict(build_exe=buildOptions),
     executables=executables,

+ 6 - 3
main.py

@@ -84,9 +84,12 @@ def main():
     )
     loop.run_until_complete(app.MainLoop())
 
-    # Devices might not always be ready to get closed - but OS will clean up anyway,
-    # so we can leave this line commented out
-    oalQuit()
+    # Freeing OpenAL buffers might fail if they are still in use
+    # We don't really care since the OS will clean up anyway.
+    try:
+        oalQuit()
+    except:  # noqa
+        pass
 
 
 if __name__ == "__main__":

+ 1 - 1
setup.py

@@ -6,7 +6,7 @@ except ImportError:
 
 setup(
     name="csgo-custom-sounds",
-    version="1.5.0",
+    version="1.5.1",
     description="Play custom sounds via Gamestate Integration",
     python_requires="==3.*,>=3.7.0",
     author="kiwec",