Skip to content

Commit

Permalink
wii: use absolute path, init filesystem
Browse files Browse the repository at this point in the history
  • Loading branch information
vgmoose committed Jan 10, 2025
1 parent dec5479 commit b081f53
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion console/Menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ void Menu::initGet()
// this is a blocking load
#if defined(WII)
// default the repo type to OSC for wii (TODO: don't hardcode this)
this->get = new Get(DEFAULT_GET_HOME, DEFAULT_REPO, true, "osc");
// also hardcodes an absolute path, for no chdir on wii
this->get = new Get("/apps/appstore/.get/", DEFAULT_REPO, true, "osc");
#else
this->get = new Get(DEFAULT_GET_HOME, DEFAULT_REPO);
#endif
Expand Down
2 changes: 1 addition & 1 deletion gui/MainDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ bool MainDisplay::process(InputEvents* event)
// fetch repositories metadata
#if defined(WII)
// default the repo type to OSC for wii (TODO: don't hardcode this)
get = new Get(DEFAULT_GET_HOME, DEFAULT_REPO, false, "osc");
get = new Get("/apps/appstore/.get/", DEFAULT_REPO, false, "osc");
#else
get = new Get(DEFAULT_GET_HOME, DEFAULT_REPO, false);
#endif
Expand Down
10 changes: 7 additions & 3 deletions gui/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
#include <switch.h>
#endif

#if defined(WII)
#include <unistd.h>
#include <fat.h>
#endif

#if defined(__WIIU__)
#include <unistd.h>

Expand Down Expand Up @@ -49,9 +54,8 @@ void setPlatformPwd()
#if defined(WII)
void setPlatformPwd()
{
#define HBAS_PATH "/apps/appstore"

mkpath(HBAS_PATH);
fatInitDefault();
mkpath("/apps/appstore/.get");
// chdir(HBAS_PATH); TODO: no chdir on wii, will need to keep track of the pwd some other way
}
#endif
Expand Down

0 comments on commit b081f53

Please sign in to comment.