Made a slight mistake when porting over from my old branch.

Mempak and Rumblepak will work fine again.
This commit is contained in:
Emmet Young 2016-01-28 22:51:48 +11:00
parent e879431606
commit c6fa59ac3a
2 changed files with 6 additions and 6 deletions

View File

@ -113,11 +113,11 @@ void Mempak::ReadFrom(int32_t Control, uint32_t address, uint8_t * data)
{
if (address < 0x8000)
{
memcpy(&data, &Mempaks[Control][address], 0x20);
memcpy(data, &Mempaks[Control][address], 0x20);
}
else
{
memset(&data, 0x00, 0x20);
memset(data, 0x00, 0x20);
/* Rumble pack area */
}
}
@ -126,7 +126,7 @@ void Mempak::WriteTo(int32_t Control, uint32_t address, uint8_t * data)
{
if (address < 0x8000)
{
memcpy(&Mempaks[Control][address], &data, 0x20);
memcpy(&Mempaks[Control][address], data, 0x20);
FILE* mempak = fopen(MempakNames[Control], "wb");
fwrite(Mempaks[Control], 1, 0x8000, mempak);

View File

@ -19,11 +19,11 @@ void Rumblepak::ReadFrom(uint32_t address, uint8_t * data)
{
if ((address >= 0x8000) && (address < 0x9000))
{
memset(&data, 0x80, 0x20);
memset(data, 0x80, 0x20);
}
else
{
memset(&data, 0x00, 0x20);
memset(data, 0x00, 0x20);
}
}
@ -33,7 +33,7 @@ void Rumblepak::WriteTo(int32_t Control, uint32_t address, uint8_t * data)
{
if (g_Plugins->Control()->RumbleCommand != NULL)
{
g_Plugins->Control()->RumbleCommand(Control, *(int *)(&data));
g_Plugins->Control()->RumbleCommand(Control, *(int *)data);
}
}
}