diff --git a/README.md b/README.md index 1f09cb1f1..dfd26ad4c 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ This method is intended to be used when .fw support isn't available (when portin Game covers should be placed in the `romart` folder at the base of your sd card. You can obtain a pre-made pack [here](https://github.com/ducalex/retro-go-covers). Retro-Go is also compatible with the older Go-Play romart pack. You can add missing cover art by creating a PNG image (160x168, 8bit). Two naming schemes are supported: -- Filename-based: `/romart/nes/Super Mario.nes.png` (notice the rom extension is included) +- Filename-based: `/romart/nes/Super Mario.png` (notice the rom extension is *not* included) - CRC32-based: `/romart/nes/A/ABCDE123.png` where `nes` is the same as the rom folder, and `ABCDE123` is the CRC32 of the game (press A -> Properties in the launcher to find it), and `A` is the first character of the CRC32 _Note: CRC32-based, which is what is used in the pre-made pack, is much slower than name-based! This type is useful because filenames vary greatly despite having identical CRCs, but if you generate your own art I suggest you use filename-based format and delete all CRC-based art from your SD Card to improve responsiveness._ diff --git a/launcher/main/gui.c b/launcher/main/gui.c index 608f9b997..e7ab87052 100644 --- a/launcher/main/gui.c +++ b/launcher/main/gui.c @@ -575,7 +575,11 @@ void gui_load_preview(tab_t *tab) else if (type == 0x2 && app->use_crc_covers && application_get_file_crc32(file)) // Game cover (png) path_len = snprintf(path, RG_PATH_MAX, "%s/%X/%08X.png", app->paths.covers, (int)(file->checksum >> 28), (int)file->checksum); else if (type == 0x3) // Game cover (based on filename) - path_len = snprintf(path, RG_PATH_MAX, "%s/%s.png", app->paths.covers, file->name); + { + path_len = snprintf(path, RG_PATH_MAX, "%s/%s", app->paths.covers, file->name); + if (path_len < RG_PATH_MAX - 3) // Don't bother if we already have an overflow + strcpy(path + path_len - strlen(rg_extension(file->name)), "png"); + } else if (type == 0x4) // Save state screenshot (png) { rg_emu_states_t *savestates = rg_emu_get_states(path, 4);