aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore/mdec.c
diff options
context:
space:
mode:
authornotaz2010-12-23 01:52:12 +0200
committernotaz2010-12-23 01:52:12 +0200
commitc62b43c9f32d79116225247acf09ccd30d4d658b (patch)
treec255ba78b9710a312706f31ad7e45768b325c42f /libpcsxcore/mdec.c
parent57a757cedcc7928894aaf957565adfa95f1caab5 (diff)
downloadpcsx_rearmed-c62b43c9f32d79116225247acf09ccd30d4d658b.tar.gz
pcsx_rearmed-c62b43c9f32d79116225247acf09ccd30d4d658b.tar.bz2
pcsx_rearmed-c62b43c9f32d79116225247acf09ccd30d4d658b.zip
init some forgotten stuff
otherwise glitches happen if certain games are ran in a row.
Diffstat (limited to 'libpcsxcore/mdec.c')
-rw-r--r--libpcsxcore/mdec.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libpcsxcore/mdec.c b/libpcsxcore/mdec.c
index 629816b..b25b961 100644
--- a/libpcsxcore/mdec.c
+++ b/libpcsxcore/mdec.c
@@ -219,7 +219,7 @@ struct _pending_dma1 {
u32 chcr;
};
-struct {
+static struct {
u32 reg0;
u32 reg1;
u16 * rl;
@@ -436,11 +436,10 @@ static void yuv2rgb24(int *blk, u8 *image) {
}
void mdecInit(void) {
+ memset(&mdec, 0, sizeof(mdec));
+ memset(iq_y, 0, sizeof(iq_y));
+ memset(iq_uv, 0, sizeof(iq_uv));
mdec.rl = (u16 *)&psxM[0x100000];
- mdec.reg0 = 0;
- mdec.reg1 = 0;
- mdec.pending_dma1.adr = 0;
- mdec.block_buffer_pos = 0;
}
// command register