-
-
Save KennethBenicio/cea4f6a1d1f6b76779c8d916338948e2 to your computer and use it in GitHub Desktop.
Launch openmw and have Steam track your gameplay hours, etc as if you were playing Morrowind
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import sys | |
from ctypes import CDLL | |
from subprocess import call | |
# Morrowind | |
os.environ["SteamAppId"] = "22320" | |
# Enable Steam Overlay | |
os.environ["LD_PRELOAD"] = os.getenv("HOME") + "/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so" | |
# You can get libsteam_api.so from one of your Steam games | |
try: | |
steam_api = CDLL("./libsteam_api.so") | |
steam_api.SteamAPI_Init() | |
except: | |
print("Failed to initialize Steam API") | |
sys.exit(1) | |
call(["openmw"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment