Skip to content

Commit

Permalink
Force YM2413 refresh after state loading. Fix #109
Browse files Browse the repository at this point in the history
  • Loading branch information
drhelius committed Dec 24, 2024
1 parent aa355e3 commit 41658c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/YM2413.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,6 @@ void YM2413::LoadState(std::istream& stream)
stream.read(reinterpret_cast<char*>(&m_pOPLL->slot[i].eg_out), sizeof(m_pOPLL->slot[i].eg_out));
stream.read(reinterpret_cast<char*>(&m_pOPLL->slot[i].update_requests), sizeof(m_pOPLL->slot[i].update_requests));
}

OPLL_forceRefresh(m_pOPLL);
}
2 changes: 1 addition & 1 deletion src/audio/emu2413/emu2413.c
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ OPLL *OPLL_new(void) {
initializeTables();
}

opll = (OPLL *)calloc(sizeof(OPLL), 1);
opll = (OPLL *)calloc(1, sizeof(OPLL));
if (opll == NULL)
return NULL;

Expand Down

0 comments on commit 41658c3

Please sign in to comment.