mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
Display Percentage on Installing & Extracting.
Also add progressbar for Installing & convert `cia.c` to `cia.cpp` for `new`.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
* reasonable ways as different from the original version.
|
||||
*/
|
||||
|
||||
#include "cia.hpp"
|
||||
#include "download.hpp"
|
||||
#include "extract.hpp"
|
||||
#include "fileBrowse.hpp"
|
||||
@@ -35,12 +36,8 @@
|
||||
#include <fstream>
|
||||
#include <unistd.h>
|
||||
|
||||
extern "C" {
|
||||
#include "cia.h"
|
||||
}
|
||||
|
||||
extern bool showProgressBar;
|
||||
extern bool progressBarType;
|
||||
extern int progressBarType;
|
||||
extern char progressBarMsg[128];
|
||||
extern int filesExtracted;
|
||||
|
||||
@@ -110,8 +107,12 @@ Result ScriptHelper::removeFile(std::string file, std::string message) {
|
||||
|
||||
// Install a file.
|
||||
void ScriptHelper::installFile(std::string file, std::string message) {
|
||||
Msg::DisplayMsg(message);
|
||||
snprintf(progressBarMsg, sizeof(progressBarMsg), message.c_str());
|
||||
showProgressBar = true;
|
||||
progressBarType = 2;
|
||||
Threads::create((ThreadFunc)displayProgressBar);
|
||||
installCia(file.c_str());
|
||||
showProgressBar = false;
|
||||
}
|
||||
|
||||
// Extract Files.
|
||||
|
||||
Reference in New Issue
Block a user