Skip to content

Commit

Permalink
Change folder to 100DSI00
Browse files Browse the repository at this point in the history
Whoops, the DCF folder needs to be 8 characters
  • Loading branch information
Epicpkmn11 committed Apr 19, 2022
1 parent baea8f4 commit 519e710
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DSi camera test

This is an example app for using the DSi's cameras. Currently it can show both cameras and save a picture to `sd:/DCIM/100DSITEST/IMG_####.png`.
This is an example app for using the DSi's cameras. Currently it can show both cameras and save a picture to `sd:/DCIM/100DSI00/IMG_####.png`.

![Example photo](resources/example.png)

Expand Down
6 changes: 3 additions & 3 deletions arm9/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ int clamp(int val, int min, int max) { return val < min ? min : (val > max) ? ma
int getImageNumber() {
int highest = -1;

DIR *pdir = opendir("/DCIM/100DSITEST");
DIR *pdir = opendir("/DCIM/100DSI00");
if(pdir == NULL) {
printf("Unable to open directory");
return -1;
Expand Down Expand Up @@ -51,7 +51,7 @@ int main(int argc, char **argv) {
bool fatInited = fatInitDefault();
if(fatInited) {
mkdir("/DCIM", 0777);
mkdir("/DCIM/100DSITEST", 0777);
mkdir("/DCIM/100DSI00", 0777);
} else {
printf("FAT init failed, photos cannot\nbe saved.\n");
}
Expand Down Expand Up @@ -130,7 +130,7 @@ int main(int argc, char **argv) {
free(yuv);

char imgName[32];
sprintf(imgName, "/DCIM/100DSITEST/IMG_%04d.PNG", getImageNumber());
sprintf(imgName, "/DCIM/100DSI00/IMG_%04d.PNG", getImageNumber());
lodepng_encode24_file(imgName, rgb, 640, 480);
free(rgb);

Expand Down

0 comments on commit 519e710

Please sign in to comment.