Skip to content

Commit 28b74a9

Browse files
committed
Check .rvid version if it's higher than the player supports
1 parent 8cdbebc commit 28b74a9

1 file changed

Lines changed: 19 additions & 13 deletions

File tree

arm9/source/main.cpp

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,10 @@ void renderFrames(void) {
225225
int playRvid(const char* filename) {
226226
bool confirmStop = false;
227227

228+
if (rvidHeader.ver > 1) {
229+
return 3;
230+
}
231+
228232
if (rvidHeader.fps > 24) {
229233
if (!hasMemoryExpansionPak && !extendedMemory) {
230234
return 2;
@@ -661,10 +665,18 @@ int main(int argc, char **argv) {
661665
} else {
662666
int err = playRvid(filename.c_str());
663667
fclose(rvid);
664-
if (err == 2) {
668+
if (err == 3) {
669+
consoleClear();
670+
printf("This Rocket Video file\n");
671+
printf("contains a version higher than\n");
672+
printf("the player supports.\n");
673+
printf("\n");
674+
printf("Please update the player to\n");
675+
printf("the latest version.\n");
676+
} else if (err == 2) {
665677
consoleClear();
666-
printf("Rocket Video file is above\n");
667-
printf("24FPS.\n");
678+
printf("This Rocket Video file is\n");
679+
printf("above 24FPS.\n");
668680
printf("\n");
669681
if (isRegularDS) {
670682
printf("Please insert the DS Memory\n");
@@ -675,21 +687,15 @@ int main(int argc, char **argv) {
675687
printf("a DSi-mode flashcard, or the\n");
676688
printf("SD card.\n");
677689
}
678-
printf("\n");
679-
printf("A: OK\n");
680-
while (1) {
681-
scanKeys();
682-
if ((keysDown() & KEY_A) && argc < 2) {
683-
break;
684-
}
685-
}
686690
} else if (err == 1) {
687691
consoleClear();
688-
printf("25-60FPS Rocket Video file\n");
689-
printf("is too big!\n");
692+
printf("This 25-60FPS Rocket Video\n");
693+
printf("file is too big!\n");
690694
printf("\n");
691695
printf("Please use less frames, and/or\n");
692696
printf("reduce vertical resolution.\n");
697+
}
698+
if (err > 0) {
693699
printf("\n");
694700
printf("A: OK\n");
695701
while (1) {

0 commit comments

Comments
 (0)