Next progress.
- Added a Toggle Menu for auto updates. - Left / Right can now scroll on grid to the last / next row. - Check on MainScreen constructor, if UniStore is valid. If not, download Universal-DB, if not found. - Reworked the menus some bit. - Update Screenshots.
This commit is contained in:
parent
6aec8dac77
commit
7f3f859194
34 changed files with 204 additions and 111 deletions
|
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
#include "download.hpp"
|
||||
#include "fileBrowse.hpp"
|
||||
#include "mainScreen.hpp"
|
||||
#include "storeUtils.hpp"
|
||||
#include <unistd.h>
|
||||
|
|
@ -32,6 +33,8 @@
|
|||
extern int fadeAlpha;
|
||||
extern u32 hRepeat;
|
||||
|
||||
extern UniStoreInfo GetInfo(const std::string &file, const std::string &fileName);
|
||||
|
||||
/*
|
||||
MainScreen Constructor.
|
||||
|
||||
|
|
@ -46,13 +49,27 @@ MainScreen::MainScreen() {
|
|||
if (config->lastStore() != "universal-db-beta.unistore" || config->lastStore() != "") {
|
||||
if (access((std::string(_STORE_PATH) + config->lastStore()).c_str(), F_OK) != 0) {
|
||||
config->lastStore("universal-db-beta.unistore");
|
||||
|
||||
} else {
|
||||
/* check version and file here. */
|
||||
const UniStoreInfo info = GetInfo((std::string(_STORE_PATH) + config->lastStore()), config->lastStore());
|
||||
|
||||
if (info.Version != 3) {
|
||||
config->lastStore("universal-db-beta.unistore");
|
||||
}
|
||||
|
||||
if (info.File != "") { // Ensure to check for this.
|
||||
if ((info.File.find("/") != std::string::npos)) {
|
||||
config->lastStore("universal-db-beta.unistore"); // It does contain a '/' which is invalid.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If Universal DB --> Get! */
|
||||
if (config->lastStore() == "universal-db-beta.unistore" || config->lastStore() == "") {
|
||||
if (access("sdmc:/3ds/Universal-Updater/stores/universal-db-beta.unistore", F_OK) != 0) {
|
||||
std::string tmp = "";
|
||||
std::string tmp = ""; // Just a temp.
|
||||
DownloadUniStore("https://db.universal-team.net/unistore/universal-db-beta.unistore", -1, tmp, true, true);
|
||||
DownloadSpriteSheet("https://db.universal-team.net/unistore/universal-db.t3x", "universal-db.t3x");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue