Added PSP Accept/Cance
This commit is contained in:
@@ -6,10 +6,45 @@
|
||||
*/
|
||||
|
||||
#include "systempsp.h"
|
||||
#include "input/input.h"
|
||||
#include "util/string.h"
|
||||
#include "assert/assert.h"
|
||||
|
||||
errorret_t systemInitPSP() {
|
||||
// Bind ACCEPT and CANCEL binds.
|
||||
inputbuttondata_t *buttonCross, *buttonCircle, *buttonAccept, *buttonCancel;
|
||||
|
||||
inputbuttondata_t *i = INPUT_BUTTON_DATA;
|
||||
while(i->name) {
|
||||
if(stringCompare(i->name, "cross")) {
|
||||
buttonCross = i;
|
||||
} else if(stringCompare(i->name, "circle")) {
|
||||
buttonCircle = i;
|
||||
} else if(stringCompare(i->name, "accept")) {
|
||||
buttonAccept = i;
|
||||
} else if(stringCompare(i->name, "cancel")) {
|
||||
buttonCancel = i;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
assertNotNull(buttonCross, "Cross button not found!");
|
||||
assertNotNull(buttonCircle, "Circle button not found!");
|
||||
assertNotNull(buttonAccept, "Accept button not found!");
|
||||
assertNotNull(buttonCancel, "Cancel button not found!");
|
||||
|
||||
if(systemPSPGetCrossButtonSetting() == PSP_UTILITY_ACCEPT_CROSS) {
|
||||
buttonAccept->button.gpButton = buttonCross->button.gpButton;
|
||||
buttonCancel->button.gpButton = buttonCircle->button.gpButton;
|
||||
} else {
|
||||
buttonAccept->button.gpButton = buttonCircle->button.gpButton;
|
||||
buttonCancel->button.gpButton = buttonCross->button.gpButton;
|
||||
}
|
||||
|
||||
errorOk();
|
||||
}
|
||||
|
||||
systemdialogtype_t systemGetActiveDialogTypePSP() {
|
||||
|
||||
|
||||
return SYSTEM_DIALOG_TYPE_NONE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user