Skip to content

Commit 4b47ea2

Browse files
iconTitle: specify if given file is a GBA ROM if ndsPath is GBARunner3
1 parent 0fe064e commit 4b47ea2

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

source/iconTitle.cpp

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -201,20 +201,25 @@ void iconTitleUpdate (int isdir, const std::string& name) {
201201
// close file!
202202
fclose (fp);
203203

204-
// turn unicode into ascii (kind of)
205-
// and convert 0x0A into 0x00
206-
char *p = (char*)banner.titles[0];
207-
for (size_t i = 0; i < sizeof(banner.titles[0]); i = i+2) {
208-
if ((p[i] == 0x0A) || (p[i] == 0xFF))
209-
p[i/2] = 0;
210-
else
211-
p[i/2] = p[i];
212-
}
204+
// Do something special for GBA stuff
205+
if (ndsPath == GBARUNNER3_PATH) {
206+
writeRow (2, "GameBoy Advance ROM");
207+
} else {
208+
// turn unicode into ascii (kind of)
209+
// and convert 0x0A into 0x00
210+
char *p = (char*)banner.titles[0];
211+
for (size_t i = 0; i < sizeof(banner.titles[0]); i = i+2) {
212+
if ((p[i] == 0x0A) || (p[i] == 0xFF))
213+
p[i/2] = 0;
214+
else
215+
p[i/2] = p[i];
216+
}
213217

214-
// text
215-
for (size_t i = 0; i < 3; ++i) {
216-
writeRow(i+1, p);
217-
p += strlen(p) + 1;
218+
// text
219+
for (size_t i = 0; i < 3; ++i) {
220+
writeRow(i+1, p);
221+
p += strlen(p) + 1;
222+
}
218223
}
219224

220225
// icon

0 commit comments

Comments
 (0)