Skip to content

Commit

Permalink
Merge pull request #25 from simracingstudio/patch-2
Browse files Browse the repository at this point in the history
Update fmodex.py
  • Loading branch information
tyrylu committed Apr 3, 2021
2 parents 52f8f2d + 36fb6b1 commit ff44700
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions pyfmodex/fmodex.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
from ctypes import *
import os, platform
import os
import platform
import sys

arch = platform.architecture()[0]
if platform.system() == "Windows":
_dll = windll.fmod
try:
_dll = windll.fmod
except Exception as e:
current_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
try:
_dll = CDLL(os.path.join(current_directory, 'fmod'))
except:
raise RuntimeError("Pyfmodex could not find the fmod library")

elif platform.system() == "Linux":
_dll = CDLL("libfmod.so")

elif platform.system() == "Darwin":
if arch == "32bit":
raise RuntimeError("No 32-bit fmod library for Mac Os exists")
Expand Down

0 comments on commit ff44700

Please sign in to comment.