mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Dialog: Track type id on dialog class.
This commit is contained in:
parent
2b9b157151
commit
aa13f5afb7
17 changed files with 29 additions and 36 deletions
|
@ -31,7 +31,7 @@
|
||||||
#define FADE_TIME 1.0
|
#define FADE_TIME 1.0
|
||||||
const float FONT_SCALE = 0.55f;
|
const float FONT_SCALE = 0.55f;
|
||||||
|
|
||||||
PSPDialog::PSPDialog() {
|
PSPDialog::PSPDialog(int type) : dialogType_(type) {
|
||||||
}
|
}
|
||||||
|
|
||||||
PSPDialog::~PSPDialog() {
|
PSPDialog::~PSPDialog() {
|
||||||
|
|
|
@ -53,7 +53,7 @@ struct pspUtilityDialogCommon
|
||||||
class PSPDialog
|
class PSPDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PSPDialog();
|
PSPDialog(int type);
|
||||||
virtual ~PSPDialog();
|
virtual ~PSPDialog();
|
||||||
|
|
||||||
virtual int Update(int animSpeed) = 0;
|
virtual int Update(int animSpeed) = 0;
|
||||||
|
@ -80,6 +80,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
DialogStatus GetStatus();
|
DialogStatus GetStatus();
|
||||||
|
int DialogType() { return dialogType_; }
|
||||||
|
|
||||||
void StartDraw();
|
void StartDraw();
|
||||||
void EndDraw();
|
void EndDraw();
|
||||||
|
@ -127,5 +128,6 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DialogStatus status = SCE_UTILITY_STATUS_NONE;
|
DialogStatus status = SCE_UTILITY_STATUS_NONE;
|
||||||
|
int dialogType_;
|
||||||
bool volatileLocked_ = false;
|
bool volatileLocked_ = false;
|
||||||
};
|
};
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PSPGamedataInstallDialog::PSPGamedataInstallDialog() {
|
PSPGamedataInstallDialog::PSPGamedataInstallDialog(int type) : PSPDialog(type) {
|
||||||
}
|
}
|
||||||
|
|
||||||
PSPGamedataInstallDialog::~PSPGamedataInstallDialog() {
|
PSPGamedataInstallDialog::~PSPGamedataInstallDialog() {
|
||||||
|
|
|
@ -35,7 +35,7 @@ struct SceUtilityGamedataInstallParam {
|
||||||
|
|
||||||
class PSPGamedataInstallDialog: public PSPDialog {
|
class PSPGamedataInstallDialog: public PSPDialog {
|
||||||
public:
|
public:
|
||||||
PSPGamedataInstallDialog();
|
PSPGamedataInstallDialog(int type);
|
||||||
virtual ~PSPGamedataInstallDialog();
|
virtual ~PSPGamedataInstallDialog();
|
||||||
|
|
||||||
virtual int Init(u32 paramAddr);
|
virtual int Init(u32 paramAddr);
|
||||||
|
|
|
@ -35,10 +35,7 @@ static const float FONT_SCALE = 0.65f;
|
||||||
const static int MSG_INIT_DELAY_US = 300000;
|
const static int MSG_INIT_DELAY_US = 300000;
|
||||||
const static int MSG_SHUTDOWN_DELAY_US = 26000;
|
const static int MSG_SHUTDOWN_DELAY_US = 26000;
|
||||||
|
|
||||||
PSPMsgDialog::PSPMsgDialog()
|
PSPMsgDialog::PSPMsgDialog(int type) : PSPDialog(type) {
|
||||||
: PSPDialog()
|
|
||||||
, flag(0)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PSPMsgDialog::~PSPMsgDialog() {
|
PSPMsgDialog::~PSPMsgDialog() {
|
||||||
|
|
|
@ -58,7 +58,7 @@ struct pspMessageDialog
|
||||||
|
|
||||||
class PSPMsgDialog: public PSPDialog {
|
class PSPMsgDialog: public PSPDialog {
|
||||||
public:
|
public:
|
||||||
PSPMsgDialog();
|
PSPMsgDialog(int type);
|
||||||
virtual ~PSPMsgDialog();
|
virtual ~PSPMsgDialog();
|
||||||
|
|
||||||
virtual int Init(unsigned int paramAddr);
|
virtual int Init(unsigned int paramAddr);
|
||||||
|
@ -92,7 +92,7 @@ private:
|
||||||
DS_ABORT = 0x200,
|
DS_ABORT = 0x200,
|
||||||
};
|
};
|
||||||
|
|
||||||
u32 flag;
|
u32 flag = 0;
|
||||||
|
|
||||||
pspMessageDialog messageDialog;
|
pspMessageDialog messageDialog;
|
||||||
int messageDialogAddr;
|
int messageDialogAddr;
|
||||||
|
|
|
@ -54,7 +54,7 @@ struct ScanInfos {
|
||||||
} PACK;
|
} PACK;
|
||||||
|
|
||||||
|
|
||||||
PSPNetconfDialog::PSPNetconfDialog() {
|
PSPNetconfDialog::PSPNetconfDialog(int type) : PSPDialog(type) {
|
||||||
}
|
}
|
||||||
|
|
||||||
PSPNetconfDialog::~PSPNetconfDialog() {
|
PSPNetconfDialog::~PSPNetconfDialog() {
|
||||||
|
|
|
@ -37,7 +37,7 @@ struct SceUtilityNetconfParam {
|
||||||
|
|
||||||
class PSPNetconfDialog: public PSPDialog {
|
class PSPNetconfDialog: public PSPDialog {
|
||||||
public:
|
public:
|
||||||
PSPNetconfDialog();
|
PSPNetconfDialog(int type);
|
||||||
virtual ~PSPNetconfDialog();
|
virtual ~PSPNetconfDialog();
|
||||||
|
|
||||||
virtual int Init(u32 paramAddr);
|
virtual int Init(u32 paramAddr);
|
||||||
|
|
|
@ -156,7 +156,7 @@ int allowedInputFlagsMap[OSK_KEYBOARD_COUNT] = {
|
||||||
PSP_UTILITY_OSK_INPUTTYPE_JAPANESE_UPPERCASE | PSP_UTILITY_OSK_INPUTTYPE_JAPANESE_SYMBOL,
|
PSP_UTILITY_OSK_INPUTTYPE_JAPANESE_UPPERCASE | PSP_UTILITY_OSK_INPUTTYPE_JAPANESE_SYMBOL,
|
||||||
};
|
};
|
||||||
|
|
||||||
PSPOskDialog::PSPOskDialog() : PSPDialog() {
|
PSPOskDialog::PSPOskDialog(int type) : PSPDialog(type) {
|
||||||
// This can break all kinds of stuff, changing the decimal point in sprintf for example.
|
// This can break all kinds of stuff, changing the decimal point in sprintf for example.
|
||||||
// Not sure what the intended effect is so commented out for now.
|
// Not sure what the intended effect is so commented out for now.
|
||||||
// setlocale(LC_ALL, "");
|
// setlocale(LC_ALL, "");
|
||||||
|
|
|
@ -213,7 +213,7 @@ enum class PSPOskNativeStatus {
|
||||||
|
|
||||||
class PSPOskDialog: public PSPDialog {
|
class PSPOskDialog: public PSPDialog {
|
||||||
public:
|
public:
|
||||||
PSPOskDialog();
|
PSPOskDialog(int type);
|
||||||
virtual ~PSPOskDialog();
|
virtual ~PSPOskDialog();
|
||||||
|
|
||||||
virtual int Init(u32 oskPtr);
|
virtual int Init(u32 oskPtr);
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#include "PSPPlaceholderDialog.h"
|
#include "PSPPlaceholderDialog.h"
|
||||||
|
|
||||||
PSPPlaceholderDialog::PSPPlaceholderDialog() : PSPDialog() {
|
PSPPlaceholderDialog::PSPPlaceholderDialog(int type) : PSPDialog(type) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
class PSPPlaceholderDialog: public PSPDialog {
|
class PSPPlaceholderDialog: public PSPDialog {
|
||||||
public:
|
public:
|
||||||
PSPPlaceholderDialog();
|
PSPPlaceholderDialog(int type);
|
||||||
virtual ~PSPPlaceholderDialog();
|
virtual ~PSPPlaceholderDialog();
|
||||||
|
|
||||||
virtual int Init();
|
virtual int Init();
|
||||||
|
|
|
@ -56,12 +56,7 @@ const static int SAVEDATA_DIALOG_SIZE_V2 = 1500;
|
||||||
const static int SAVEDATA_DIALOG_SIZE_V3 = 1536;
|
const static int SAVEDATA_DIALOG_SIZE_V3 = 1536;
|
||||||
|
|
||||||
|
|
||||||
PSPSaveDialog::PSPSaveDialog()
|
PSPSaveDialog::PSPSaveDialog(int type) : PSPDialog(type) {
|
||||||
: PSPDialog()
|
|
||||||
, display(DS_NONE)
|
|
||||||
, currentSelectedSave(0)
|
|
||||||
, ioThread(0)
|
|
||||||
{
|
|
||||||
param.SetPspParam(0);
|
param.SetPspParam(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
|
|
||||||
class PSPSaveDialog: public PSPDialog {
|
class PSPSaveDialog: public PSPDialog {
|
||||||
public:
|
public:
|
||||||
PSPSaveDialog();
|
PSPSaveDialog(int type);
|
||||||
virtual ~PSPSaveDialog();
|
virtual ~PSPSaveDialog();
|
||||||
|
|
||||||
virtual int Init(int paramAddr);
|
virtual int Init(int paramAddr);
|
||||||
|
@ -136,14 +136,14 @@ private:
|
||||||
DB_DELETE
|
DB_DELETE
|
||||||
};
|
};
|
||||||
|
|
||||||
DisplayState display;
|
DisplayState display = DS_NONE;
|
||||||
|
|
||||||
SavedataParam param;
|
SavedataParam param;
|
||||||
SceUtilitySavedataParam request;
|
SceUtilitySavedataParam request;
|
||||||
// For detecting changes made by the game.
|
// For detecting changes made by the game.
|
||||||
SceUtilitySavedataParam originalRequest;
|
SceUtilitySavedataParam originalRequest;
|
||||||
u32 requestAddr;
|
u32 requestAddr = 0;
|
||||||
int currentSelectedSave;
|
int currentSelectedSave = 0;
|
||||||
|
|
||||||
int yesnoChoice;
|
int yesnoChoice;
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ private:
|
||||||
SAVEIO_DONE,
|
SAVEIO_DONE,
|
||||||
};
|
};
|
||||||
|
|
||||||
std::thread *ioThread;
|
std::thread *ioThread = nullptr;
|
||||||
std::mutex paramLock;
|
std::mutex paramLock;
|
||||||
volatile SaveIOStatus ioThreadStatus;
|
volatile SaveIOStatus ioThreadStatus;
|
||||||
};
|
};
|
||||||
|
|
|
@ -52,8 +52,7 @@ struct SceUtilityScreenshotParams {
|
||||||
// TODO
|
// TODO
|
||||||
};
|
};
|
||||||
|
|
||||||
PSPScreenshotDialog::PSPScreenshotDialog() : PSPDialog() {
|
PSPScreenshotDialog::PSPScreenshotDialog(int type) : PSPDialog(type) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PSPScreenshotDialog::~PSPScreenshotDialog() {
|
PSPScreenshotDialog::~PSPScreenshotDialog() {
|
||||||
|
|
|
@ -24,7 +24,7 @@ struct SceUtilityScreenshotParams;
|
||||||
|
|
||||||
class PSPScreenshotDialog : public PSPDialog {
|
class PSPScreenshotDialog : public PSPDialog {
|
||||||
public:
|
public:
|
||||||
PSPScreenshotDialog();
|
PSPScreenshotDialog(int type);
|
||||||
virtual ~PSPScreenshotDialog();
|
virtual ~PSPScreenshotDialog();
|
||||||
|
|
||||||
virtual int Init(u32 paramAddr);
|
virtual int Init(u32 paramAddr);
|
||||||
|
|
|
@ -132,12 +132,12 @@ enum UtilityDialogType {
|
||||||
// Only a single dialog is allowed at a time.
|
// Only a single dialog is allowed at a time.
|
||||||
static UtilityDialogType currentDialogType;
|
static UtilityDialogType currentDialogType;
|
||||||
bool currentDialogActive;
|
bool currentDialogActive;
|
||||||
static PSPSaveDialog saveDialog;
|
static PSPSaveDialog saveDialog(UTILITY_DIALOG_SAVEDATA);
|
||||||
static PSPMsgDialog msgDialog;
|
static PSPMsgDialog msgDialog(UTILITY_DIALOG_MSG);
|
||||||
static PSPOskDialog oskDialog;
|
static PSPOskDialog oskDialog(UTILITY_DIALOG_OSK);
|
||||||
static PSPNetconfDialog netDialog;
|
static PSPNetconfDialog netDialog(UTILITY_DIALOG_NET);
|
||||||
static PSPScreenshotDialog screenshotDialog;
|
static PSPScreenshotDialog screenshotDialog(UTILITY_DIALOG_SCREENSHOT);
|
||||||
static PSPGamedataInstallDialog gamedataInstallDialog;
|
static PSPGamedataInstallDialog gamedataInstallDialog(UTILITY_DIALOG_GAMEDATAINSTALL);
|
||||||
|
|
||||||
static int oldStatus = 100; //random value
|
static int oldStatus = 100; //random value
|
||||||
static std::map<int, u32> currentlyLoadedModules;
|
static std::map<int, u32> currentlyLoadedModules;
|
||||||
|
|
Loading…
Add table
Reference in a new issue