File utility improved

+ minor fixes
This commit is contained in:
Nekotekina 2016-01-06 02:52:48 +03:00
parent 5029dff73a
commit b3e3c68f15
75 changed files with 839 additions and 964 deletions

View file

@ -24,8 +24,6 @@
#include "Gui/LLEModulesManager.h"
#include "Gui/CgDisasm.h"
#include "Crypto/unpkg.h"
#include <wx/dynlib.h>
#include <wx/progdlg.h>
#ifndef _WIN32
#include "frame_icon.xpm"
@ -255,7 +253,7 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event))
fs::file pkg_f(ctrl.GetPath().ToStdString());
// Open file mapping (test)
fs::file_ptr pkg_ptr(pkg_f);
fs::file_read_map pkg_ptr(pkg_f);
if (!pkg_f || !pkg_ptr)
{
@ -265,7 +263,7 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event))
// Append title ID to the path
local_path += '/';
local_path += { pkg_ptr + 55, 9 };
local_path.append(pkg_ptr + 55, 9);
if (!fs::create_dir(local_path))
{
@ -289,7 +287,7 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event))
volatile f64 progress = 0.0;
// Run PKG unpacking asynchronously
auto result = std::async(std::launch::async, WRAP_EXPR(pkg_install(pkg_f, local_path + "/", progress)));
auto result = std::async(std::launch::async, WRAP_EXPR(pkg_install(pkg_f, local_path + '/', progress)));
// Wait for the completion
while (result.wait_for(15ms) != std::future_status::ready)