1
0
forked from Mirrors/RGSX

v1.9.9.3 - add BIOS folder handling for "00 BIOS" platform in download functions

This commit is contained in:
skymike03
2025-08-29 17:33:38 +02:00
parent 37aeb0e7b7
commit 3c268bdd04
2 changed files with 18 additions and 1 deletions

View File

@@ -5,7 +5,7 @@ import platform
from rgsx_settings import load_rgsx_settings, save_rgsx_settings, migrate_old_settings
# Version actuelle de l'application
app_version = "1.9.9.2"
app_version = "1.9.9.3"
def get_operating_system():
"""Renvoie le nom du système d'exploitation."""
@@ -65,6 +65,13 @@ SYSTEM_FOLDER = get_system_root()
APP_FOLDER = os.path.join(get_application_root(), "RGSX")
ROMS_FOLDER = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(APP_FOLDER))), "roms")
SAVE_FOLDER = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(APP_FOLDER))), "saves", "ports", "rgsx")
BIOS_FOLDER = os.path.dirname(os.path.dirname(os.path.dirname(APP_FOLDER)))
print(f"BIOS_FOLDER: {BIOS_FOLDER}")
print(f"ROMS_FOLDER: {ROMS_FOLDER}")
print(f"SAVE_FOLDER: {SAVE_FOLDER}")
print(f"RGSX APP_FOLDER: {APP_FOLDER}")
# Configuration du logging
logger = logging.getLogger(__name__)

View File

@@ -262,6 +262,11 @@ async def download_rom(url, platform, game_name, is_zip_non_supported=False, tas
if not dest_dir:
platform_folder = normalize_platform_name(platform)
dest_dir = apply_symlink_path(config.ROMS_FOLDER, platform_folder)
# Spécifique: si le système est "00 BIOS" on force le dossier BIOS
if platform == "00 BIOS":
dest_dir = config.BIOS_FOLDER
logger.debug(f"Plateforme '00 BIOS' détectée, destination forcée vers BIOS_FOLDER: {dest_dir}")
os.makedirs(dest_dir, exist_ok=True)
if not os.access(dest_dir, os.W_OK):
@@ -470,6 +475,11 @@ async def download_from_1fichier(url, platform, game_name, is_zip_non_supported=
dest_dir = apply_symlink_path(config.ROMS_FOLDER, platform_folder)
logger.debug(f"Répertoire destination déterminé: {dest_dir}")
# Spécifique: si le système est "00 BIOS" on force le dossier BIOS
if platform == "00 BIOS":
dest_dir = config.BIOS_FOLDER
logger.debug(f"Plateforme '00 BIOS' détectée, destination forcée vers BIOS_FOLDER: {dest_dir}")
logger.debug(f"Vérification répertoire destination: {dest_dir}")
os.makedirs(dest_dir, exist_ok=True)
logger.debug(f"Répertoire créé ou existant: {dest_dir}")