Enable video capture and screenshots if disabled

This commit is contained in:
rlaphoenix
2022-11-12 06:31:07 +00:00
parent cc358dd43b
commit d2acfe1c3e
2 changed files with 12 additions and 3 deletions
+1 -3
View File
@@ -62,10 +62,8 @@ Take a look at `nton build --help` for advanced usage like changing the Icon, Ti
- [X] Rewrite as a Python script to heavily improve the user experience and code.
- [X] Combine the Drive letter and Path arguments and manually split them when they need to be separate instead.
- [X] Automate name and publisher by extracting from the extracted `control.nacp`.
- [X] Force enable video capture and screenshots in the extracted `control.nacp`.
- [ ] Force disable save data allocation. Fixed in [v3.3.5 of Nro2NSP](https://github.com/Root-MtX/Nro2Nsp/releases/tag/3.3.5).
- [ ] Force enabling recording by editing the NROs extracted `control.nacp` at offset 0x3035 from 0 to 2 (forced).
Forced is a lot better than 1 (manual) as it allows the video to be saved. A way to enable screenshots should be done as well.
[SAK](https://github.com/dezem/SAK) has a way to do this.
- [ ] Add support for direct RetroArch Game Forwarding.
- [ ] Maybe a new GUI one day, and let you override the icons and such?
+11
View File
@@ -125,6 +125,17 @@ def build(path: Path, name: str | None, publisher: str | None, icon: Path | None
log.debug("Got the Control partition")
log.debug(base64.b64encode(control_file_data).decode())
# enable video capture and screenshots if disabled
if control_file_data[0x3035] != 0x02:
# 0x00 = Disabled, 0x01 = Manual, 0x02 = Enabled
control_file_data[0x3035] = 0x02
log.info("Enabled Video Capture")
if control_file_data[0x3034] != 0x00:
# 0x00 = Enabled, 0x01 = Disabled
control_file_data[0x3034] = 0x00
log.info("Enabled Screenshots")
control_file.write_bytes(control_file_data)
if not name:
# TODO: Assumes first region/language of the NROs title/name data is wanted
# Is UTF8 or ANSI wanted here when decoding? UTF8 should be fine