mirror of
https://gitlab.com/Nanolx/homebrewfilter.git
synced 2024-12-26 17:41:48 +01:00
before updating copy the old boot.dol to prev.dol
This commit is contained in:
parent
c08ff4f916
commit
30175e07f9
Binary file not shown.
@ -14,8 +14,10 @@
|
||||
#include "Network/update.h"
|
||||
#include "Network/http.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <ios>
|
||||
|
||||
#/*** Extern variables ***/
|
||||
/*** Extern variables ***/
|
||||
extern GuiWindow * mainWindow;
|
||||
extern bool boot_buffer;
|
||||
|
||||
@ -101,6 +103,12 @@ updatePrompt(string rev)
|
||||
char url[100];
|
||||
sprintf(url, "http://download.tuxfamily.org/hbf/DOL/rev%s/boot.dol", rev.c_str());
|
||||
|
||||
// copy boot.dol to prev.dol
|
||||
std::ifstream infile((Settings.device_dat + ":/apps/HomebrewFilter/boot.dol").c_str(), std::ios_base::binary);
|
||||
std::ofstream outfile((Settings.device_dat + ":/apps/HomebrewFilter/prev.dol").c_str(), std::ios_base::binary);
|
||||
|
||||
outfile << infile.rdbuf();
|
||||
|
||||
struct block file = downloadfile(url);
|
||||
if (file.data && file.size > 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user