Skip to content
Snippets Groups Projects
Commit 029dea67 authored by Vicki Pfau's avatar Vicki Pfau
Browse files

retro: Overload data_path so calling without a hint uses our hint

parent 3d8dfe09
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ import os
import json
import subprocess
import sys
from retro._retro import Movie, RetroEmulator, core_path, data_path
from retro._retro import Movie, RetroEmulator, core_path, data_path as _data_path
ROOT_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
RETRO_DATA_PATH = os.path.dirname(__file__)
......@@ -40,6 +40,11 @@ EMU_CORES = {}
EMU_INFO = {}
EMU_EXTENSIONS = {}
def data_path(hint=RETRO_DATA_PATH):
return _data_path(hint)
with open(os.path.join(os.path.dirname(__file__), 'cores.json')) as f:
_coreInfo = f.read()
RetroEmulator.load_core_info(_coreInfo)
......@@ -58,7 +63,7 @@ def get_game_path(game=""):
"""
Return the path to a given game's directory
"""
return os.path.join(data_path(RETRO_DATA_PATH), game)
return os.path.join(data_path(), game)
def get_romfile_path(game):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment