mirror of
https://github.com/libretro/Mu.git
synced 2026-09-23 07:05:37 +00:00
Just use memset to 0 out structs
This commit is contained in:
@@ -391,38 +391,6 @@ uint32_t emulatorInit(buffer_t palmRomDump, buffer_t palmBootDump, uint32_t spec
|
||||
ads7846Reset();
|
||||
sdCardInit();
|
||||
|
||||
/*
|
||||
//input
|
||||
palmInput.buttonUp = false;
|
||||
palmInput.buttonDown = false;
|
||||
palmInput.buttonLeft = false;//only used in hybrid mode
|
||||
palmInput.buttonRight = false;//only used in hybrid mode
|
||||
palmInput.buttonSelect = false;//only used in hybrid mode
|
||||
|
||||
palmInput.buttonCalendar = false;
|
||||
palmInput.buttonAddress = false;
|
||||
palmInput.buttonTodo = false;
|
||||
palmInput.buttonNotes = false;
|
||||
|
||||
palmInput.buttonPower = false;
|
||||
palmInput.buttonContrast = false;
|
||||
|
||||
palmInput.touchscreenX = 0;
|
||||
palmInput.touchscreenY = 0;
|
||||
palmInput.touchscreenTouched = false;
|
||||
|
||||
//sdcard
|
||||
palmSdCard.sessionId = 0x0000000000000000;
|
||||
palmSdCard.stateId = 0x0000000000000000;
|
||||
palmSdCard.size = 0;
|
||||
palmSdCard.type = CARD_NONE;
|
||||
palmSdCard.inserted = false;
|
||||
|
||||
//misc settable attributes
|
||||
palmMisc.batteryCharging = false;
|
||||
palmMisc.batteryLevel = 100;
|
||||
palmMisc.inDock = false;
|
||||
*/
|
||||
memset(&palmInput, 0x00, sizeof(palmInput));
|
||||
memset(&palmSdCard, 0x00, sizeof(palmSdCard));
|
||||
memset(&palmMisc, 0x00, sizeof(palmMisc));
|
||||
@@ -483,13 +451,6 @@ uint32_t emulatorSetNewSdCard(uint64_t size, uint8_t type){
|
||||
}
|
||||
else{
|
||||
memset(&palmSdCard, 0x00, sizeof(palmSdCard));
|
||||
/*
|
||||
palmSdCard.sessionId = 0x0000000000000000;
|
||||
palmSdCard.stateId = 0x0000000000000000;
|
||||
palmSdCard.size = 0;
|
||||
palmSdCard.type = CARD_NONE;
|
||||
palmSdCard.inserted = false;
|
||||
*/
|
||||
}
|
||||
|
||||
return EMU_ERROR_NONE;
|
||||
|
||||
@@ -972,20 +972,6 @@ void resetHwRegisters(){
|
||||
spi1TxPosition = 0;
|
||||
|
||||
memset(chips, 0x00, sizeof(chips));
|
||||
/*
|
||||
for(uint8_t chip = CHIP_BEGIN; chip < CHIP_END; chip++){
|
||||
chips[chip].enable = false;
|
||||
chips[chip].start = 0x00000000;
|
||||
chips[chip].size = 0x00000000;
|
||||
chips[chip].mask = 0x00000000;
|
||||
|
||||
chips[chip].inBootMode = false;
|
||||
chips[chip].readOnly = false;
|
||||
chips[chip].readOnlyForProtectedMemory = false;
|
||||
chips[chip].supervisorOnlyProtectedMemory = false;
|
||||
chips[chip].unprotectedSize = 0x00000000;
|
||||
}
|
||||
*/
|
||||
//all chipselects are disabled at boot and CSA is mapped to 0x00000000 and covers the entire address range until CSGBA set otherwise
|
||||
chips[CHIP_A_ROM].inBootMode = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user