mirror of
https://gitlab.com/Theopse/fbi-i18n-zh.git
synced 2025-04-25 10:56:36 +08:00
Update for ctrcommon changes.
This commit is contained in:
parent
2b0c8eed77
commit
52f419b804
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
INSTALL,
|
INSTALL,
|
||||||
@ -93,7 +94,7 @@ int main(int argc, char **argv) {
|
|||||||
screen_swap_buffers();
|
screen_swap_buffers();
|
||||||
|
|
||||||
RemoteFile file = ui_accept_remote_file();
|
RemoteFile file = ui_accept_remote_file();
|
||||||
if(file.socket == -1) {
|
if(file.fd == NULL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +102,7 @@ int main(int argc, char **argv) {
|
|||||||
confirmStream << "Install the received application?" << "\n";
|
confirmStream << "Install the received application?" << "\n";
|
||||||
confirmStream << "Size: " << file.fileSize << " bytes (" << std::fixed << std::setprecision(2) << file.fileSize / 1024.0f / 1024.0f << "MB)" << "\n";
|
confirmStream << "Size: " << file.fileSize << " bytes (" << std::fixed << std::setprecision(2) << file.fileSize / 1024.0f / 1024.0f << "MB)" << "\n";
|
||||||
if(ui_prompt(confirmStream.str(), true)) {
|
if(ui_prompt(confirmStream.str(), true)) {
|
||||||
int ret = app_install_socket(destination, file.socket, file.fileSize, onProgress);
|
int ret = app_install(destination, file.fd, file.fileSize, onProgress);
|
||||||
std::stringstream resultMsg;
|
std::stringstream resultMsg;
|
||||||
resultMsg << "Install ";
|
resultMsg << "Install ";
|
||||||
if(ret == 0) {
|
if(ret == 0) {
|
||||||
@ -115,7 +116,7 @@ int main(int argc, char **argv) {
|
|||||||
ui_prompt(resultMsg.str(), false);
|
ui_prompt(resultMsg.str(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
socket_close(file.socket);
|
fclose(file.fd);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user