Merge remote-tracking branch 'origin/master'

This commit is contained in:
Fabian Dill 2020-07-11 00:52:58 +02:00
commit cb0201082f
2 changed files with 5 additions and 1 deletions

View File

@ -11,6 +11,10 @@ def adjust(args):
logger = logging.getLogger('Adjuster') logger = logging.getLogger('Adjuster')
logger.info('Patching ROM.') logger.info('Patching ROM.')
if os.path.splitext(args.rom)[-1].lower() == '.bmbp':
import Patch
meta, args.rom = Patch.create_rom_file(args.rom)
if os.stat(args.rom).st_size in (0x200000, 0x400000) and os.path.splitext(args.rom)[-1].lower() == '.sfc': if os.stat(args.rom).st_size in (0x200000, 0x400000) and os.path.splitext(args.rom)[-1].lower() == '.sfc':
rom = LocalRom(args.rom, patch=False) rom = LocalRom(args.rom, patch=False)
else: else:

2
Gui.py
View File

@ -547,7 +547,7 @@ def guiMain(args=None):
romEntry2 = Entry(romDialogFrame2, textvariable=romVar2) romEntry2 = Entry(romDialogFrame2, textvariable=romVar2)
def RomSelect2(): def RomSelect2():
rom = filedialog.askopenfilename(filetypes=[("Rom Files", (".sfc", ".smc")), ("All Files", "*")]) rom = filedialog.askopenfilename(filetypes=[("Rom Files", (".sfc", ".smc", ".bmbp")), ("All Files", "*")])
romVar2.set(rom) romVar2.set(rom)
romSelectButton2 = Button(romDialogFrame2, text='Select Rom', command=RomSelect2) romSelectButton2 = Button(romDialogFrame2, text='Select Rom', command=RomSelect2)