mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
some gui checking
This commit is contained in:
7
Patch.py
7
Patch.py
@@ -3,7 +3,7 @@ import yaml
|
||||
import os
|
||||
import lzma
|
||||
import hashlib
|
||||
from typing import Tuple
|
||||
from typing import Tuple, Optional
|
||||
|
||||
import Utils
|
||||
from Rom import JAP10HASH, read_rom
|
||||
@@ -11,11 +11,12 @@ from Rom import JAP10HASH, read_rom
|
||||
base_rom_bytes = None
|
||||
|
||||
|
||||
def get_base_rom_bytes() -> bytes:
|
||||
def get_base_rom_bytes(file_name: str = None) -> bytes:
|
||||
global base_rom_bytes
|
||||
if not base_rom_bytes:
|
||||
options = Utils.get_options()
|
||||
file_name = options["general_options"]["rom_file"]
|
||||
if not file_name:
|
||||
file_name = options["general_options"]["rom_file"]
|
||||
if not os.path.exists(file_name):
|
||||
file_name = Utils.local_path(file_name)
|
||||
base_rom_bytes = bytes(read_rom(open(file_name, "rb")))
|
||||
|
Reference in New Issue
Block a user