Initialize a bunch of Dialog structs

This commit is contained in:
Henrik Rydgård
2022-09-09 11:56:11 +02:00
parent dab4365557
commit 024f8ef89b
7 changed files with 31 additions and 42 deletions
+5 -5
View File
@@ -99,7 +99,7 @@ protected:
void ChangeStatus(DialogStatus newStatus, int delayUs);
void ChangeStatusInit(int delayUs);
void ChangeStatusShutdown(int delayUs);
DialogStatus ReadStatus() {
DialogStatus ReadStatus() const {
return status;
}
@@ -117,10 +117,10 @@ protected:
unsigned int lastButtons = 0;
unsigned int buttons = 0;
float fadeTimer;
bool isFading;
bool fadeIn;
u32 fadeValue;
float fadeTimer = 0.0f;
bool isFading = false;
bool fadeIn = false;
u32 fadeValue = 0;
ImageID okButtonImg;
ImageID cancelButtonImg;
+9 -9
View File
@@ -59,16 +59,16 @@ private:
void CloseCurrentFile();
void WriteSfoFile();
SceUtilityGamedataInstallParam request;
SceUtilityGamedataInstallParam request{};
PSPPointer<SceUtilityGamedataInstallParam> param;
std::vector<std::string> inFileNames;
int numFiles;
int readFiles;
u64 allFilesSize; // use this to calculate progress value.
u64 allReadSize; // use this to calculate progress value.
int progressValue;
int numFiles = 0;
int readFiles = 0;
u64 allFilesSize = 0; // use this to calculate progress value.
u64 allReadSize = 0; // use this to calculate progress value.
int progressValue = 0;
int currentInputFile;
u32 currentInputBytesLeft;
int currentOutputFile;
int currentInputFile = 0;
u32 currentInputBytesLeft = 0;
int currentOutputFile = 0;
};
+3 -3
View File
@@ -94,11 +94,11 @@ private:
u32 flag = 0;
pspMessageDialog messageDialog;
int messageDialogAddr;
pspMessageDialog messageDialog{};
int messageDialogAddr = 0;
char msgText[512];
int yesnoChoice;
int yesnoChoice = 0;
float scrollPos_ = 0.0f;
int framesUpHeld_ = 0;
int framesDownHeld_ = 0;
+4 -5
View File
@@ -148,7 +148,6 @@ struct SceUtilityOskParams
SceUtilityOskState_le state;
// Maybe just padding?
s32_le unk_60;
};
// Internal enum, not from PSP.
@@ -245,16 +244,16 @@ private:
std::string oskIntext;
std::string oskOuttext;
int selectedChar;
int selectedChar = 0;
std::u16string inputChars;
OskKeyboardDisplay currentKeyboard;
OskKeyboardLanguage currentKeyboardLanguage;
bool isCombinated;
bool isCombinated = false;
std::mutex nativeMutex_;
PSPOskNativeStatus nativeStatus_ = PSPOskNativeStatus::IDLE;
std::string nativeValue_;
int i_level; // for Korean Keyboard support
int i_value[3]; // for Korean Keyboard support
int i_level = 0; // for Korean Keyboard support
int i_value[3]{}; // for Korean Keyboard support
};
+3 -3
View File
@@ -139,13 +139,13 @@ private:
DisplayState display = DS_NONE;
SavedataParam param;
SceUtilitySavedataParam request;
SceUtilitySavedataParam request{};
// For detecting changes made by the game.
SceUtilitySavedataParam originalRequest;
SceUtilitySavedataParam originalRequest{};
u32 requestAddr = 0;
int currentSelectedSave = 0;
int yesnoChoice;
int yesnoChoice = 0;
enum SaveIOStatus
{
+1 -10
View File
@@ -193,16 +193,7 @@ void SaveFileInfo::DoState(PointerWrap &p)
}
}
SavedataParam::SavedataParam()
: pspParam(0)
, selectedSave(0)
, saveDataList(0)
, noSaveIcon(0)
, saveDataListCount(0)
, saveNameListDataCount(0)
{
}
SavedataParam::SavedataParam() { }
void SavedataParam::Init()
{
+6 -7
View File
@@ -265,7 +265,6 @@ struct SceUtilitySavedataParam
// Function 22 GETSIZES
PSPPointer<PspUtilitySavedataSizeInfo> sizeInfo;
};
// Non native, this one we can reorganize as we like
@@ -377,10 +376,10 @@ private:
std::set<std::string> GetSecureFileNames(const std::string &dirPath);
bool GetExpectedHash(const std::string &dirPath, const std::string &filename, u8 hash[16]);
SceUtilitySavedataParam* pspParam;
int selectedSave;
SaveFileInfo *saveDataList;
SaveFileInfo *noSaveIcon;
int saveDataListCount;
int saveNameListDataCount;
SceUtilitySavedataParam* pspParam = nullptr;
int selectedSave = 0;
SaveFileInfo *saveDataList = nullptr;
SaveFileInfo *noSaveIcon = nullptr;
int saveDataListCount = 0;
int saveNameListDataCount = 0;
};