-hopefully fixed a random codedump

-if emu save partition is set to -1, it will use sd card by default
This commit is contained in:
fix94.1 2012-05-17 00:43:42 +00:00
parent 907c68f074
commit 0a90ae532e
3 changed files with 5 additions and 13 deletions

View File

@ -47,6 +47,7 @@ void MEM1_free(void *p)
void MEM2_init(unsigned int mem2Size)
{
g_mem2gp.init(mem2Size);
g_mem2gp.clear();
}
void MEM2_cleanup(void)

View File

@ -348,9 +348,10 @@ int CMenu::_FlashSave(string gameId)
int CMenu::_AutoExtractSave(string gameId)
{
int emuPartition = m_cfg.getInt("GAMES", "savepartition", m_cfg.getInt("NAND", "partition", 0));
if(emuPartition < 0)
emuPartition = 0;
char basepath[MAX_FAT_PATH];
snprintf(basepath, sizeof(basepath), "%s:%s", DeviceName[emuPartition], m_cfg.getString("GAMES", "savepath", m_cfg.getString("NAND", "path", "")).c_str());
Nand::Instance()->CreatePath("%s/import", basepath);
Nand::Instance()->CreatePath("%s/meta", basepath);
Nand::Instance()->CreatePath("%s/shared1", basepath);

View File

@ -117,17 +117,7 @@ void SoundHandler::RemoveDecoder(int voice)
if(DecoderList[voice] != NULL)
{
if(DecoderList[voice]->GetSoundType() == SOUND_OGG)
delete ((OggDecoder *)DecoderList[voice]);
else if(DecoderList[voice]->GetSoundType() == SOUND_MP3)
delete ((Mp3Decoder *)DecoderList[voice]);
else if(DecoderList[voice]->GetSoundType() == SOUND_WAV)
delete ((WavDecoder *)DecoderList[voice]);
else if(DecoderList[voice]->GetSoundType() == SOUND_AIF)
delete ((AifDecoder *)DecoderList[voice]);
else if(DecoderList[voice]->GetSoundType() == SOUND_BNS)
delete ((BNSDecoder *)DecoderList[voice]);
else
(*DecoderList[voice]).ClearBuffer();
delete DecoderList[voice];
DecoderList[voice] = NULL;
}