CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Path: blob/master/Core/Dialog/PSPGamedataInstallDialog.h
Views: 1401
// Copyright (c) 2012- PPSSPP Project.12// This program is free software: you can redistribute it and/or modify3// it under the terms of the GNU General Public License as published by4// the Free Software Foundation, version 2.0 or later versions.56// This program is distributed in the hope that it will be useful,7// but WITHOUT ANY WARRANTY; without even the implied warranty of8// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9// GNU General Public License 2.0 for more details.1011// A copy of the GPL 2.0 should have been included with the program.12// If not, see http://www.gnu.org/licenses/1314// Official git repository and contact information can be found at15// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.1617#pragma once1819#include "Core/Dialog/PSPDialog.h"20#include "Core/Dialog/SavedataParam.h"2122struct SceUtilityGamedataInstallParam {23pspUtilityDialogCommon common;24s32_le mode;25char gameName[13];26char ignore1[3];27char dataName[20];28PspUtilitySavedataSFOParam sfoParam;29int progress;30u32_le unknownResult1;31u32_le unknownResult2;32char ignore3[48];33};3435class PSPGamedataInstallDialog: public PSPDialog {36public:37PSPGamedataInstallDialog(UtilityDialogType type);38~PSPGamedataInstallDialog();3940int Init(u32 paramAddr);41int Update(int animSpeed) override;42int Shutdown(bool force = false) override;43void DoState(PointerWrap &p) override;4445int Abort();46std::string GetGameDataInstallFileName(const SceUtilityGamedataInstallParam *param, const std::string &filename);4748protected:49// TODO: Manage status correctly.50bool UseAutoStatus() override {51return true;52}5354private:55void UpdateProgress();56void RenderProgress(int percentage);57void OpenNextFile();58void CopyCurrentFileData();59void CloseCurrentFile();60void WriteSfoFile();6162SceUtilityGamedataInstallParam request{};63PSPPointer<SceUtilityGamedataInstallParam> param;64std::vector<std::string> inFileNames;65int numFiles = 0;66int readFiles = 0;67u64 allFilesSize = 0; // use this to calculate progress value.68u64 allReadSize = 0; // use this to calculate progress value.69int progressValue = 0;7071int currentInputFile = 0;72u32 currentInputBytesLeft = 0;73int currentOutputFile = 0;74};757677