@@ -956,7 +956,7 @@ def setup_guns_evdev(self, conf: dict[str, Any], guns: Guns, shortRomName: str,
956956 self .setConf (conf , f"PLAYER_{ nplayer } _{ action } " , f"{ evplayer } :KEY:{ code } " )
957957
958958 def setup_eeprom (self ):
959- DOWNLOADED_FLAG : Final = self .LINDBERGH_SAVES / "downloaded .txt"
959+ DOWNLOADED_FLAG : Final = self .LINDBERGH_SAVES / "downloadedv43 .txt"
960960 RAW_URL : Final = "https://raw.githubusercontent.com/batocera-linux/lindbergh-eeprom/main/lindbergh-eeprom.tar.xz"
961961
962962 mkdir_if_not_exists (self .LINDBERGH_SAVES )
@@ -1007,10 +1007,16 @@ def setup_libraries(self, romDir: Path, romName: str) -> None:
10071007 shutil .copy2 (srcCgGL , destCgGL )
10081008 _logger .debug ("Overwriting bad lib: %s" , destCgGL )
10091009
1010- # remove any legacy libsegaapi.so
1011- if Path (romDir , "libsegaapi.so" ).exists ():
1012- Path (romDir , "libsegaapi.so" ).unlink ()
1013- _logger .debug ("Removed: %s/libsegaapi.so" , romDir )
1010+ # Remove legacy/conflicting files from the ROM directory
1011+ legacy_files = ["libsegaapi.so" , "lindbergh" , "lindbergh.conf" , "lindbergh.so" ]
1012+ for legacy_file in legacy_files :
1013+ legacy_path = romDir / legacy_file
1014+ if legacy_path .exists ():
1015+ try :
1016+ legacy_path .unlink ()
1017+ _logger .debug ("Removed legacy file: %s" , legacy_path )
1018+ except Exception as e :
1019+ _logger .debug ("Could not remove legacy file %s: %s" , legacy_path , e )
10141020
10151021 def setup_config (
10161022 self ,
0 commit comments