Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

screenshots: use subdirectories for the date and include the title ID #1488

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ioistired
Copy link
Contributor

Using subdirectories allows for easier retrieval over FTP,
as it reduces the amount of entries in the screenshots directory.

Including the title ID lets users search for all screenshots they have of a
certain game, or organize their screenshots by software instead of by date.

Using subdirectories allows for easier retrieval over FTP,
as it reduces the amount of entries in the screenshots directory.

Including the title ID lets users search for all screenshots they have of a
certain game, or organize their screenshots by software instead of by date.

FS_ProgramInfo programInfo;
u32 unused;
res = PMDBG_GetCurrentAppInfo(&programInfo, &unused, &unused);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized there's a bug in this approach: screenshots taken of the home menu while software is suspended, and screenshots taken of applets while software is suspended, will result in the wrong title ID written. Is that an issue?

@Shadow322
Copy link

add location too? like if i have boot.firm on ctrnand it will make SS in nand not sd card we need a setting to chose SS location

@ioistired
Copy link
Contributor Author

That's beyond the scope of this pull request. The original code saves to SD.

@Shadow322
Copy link

That's beyond the scope of this pull request. The original code saves to SD.

Nope it does as I stated

@ioistired
Copy link
Contributor Author

Oh I misread you. What part of my changes breaks the current behavior?

#define WRITE_SCREENSHOT(screenName, screenWidth, top, left) do { \
sprintf( \
filename, \
"%s/%04lu-%02lu-%02lu_%02lu-%02lu-%02lu.%03llu_%016llx_%s.bmp", \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checkpoint uses the lower 4 bytes (8 nybbles) of the program's title ID. Should I do the same here?

@ioistired
Copy link
Contributor Author

@Shadow322 I tested it on NAND and it does indeed save to ctr:/rw/luma/screenshots/yyyy/mm/dd/ when the SD card is unavailable. I think a user-configurable toggle to choose where to save is beyond the scope of this pull request.

You'll notice this line is unchanged from the original code:

archiveId = isSdMode ? ARCHIVE_SDMC : ARCHIVE_NAND_RW;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants