diff --git a/desmume/src/GPU.cpp b/desmume/src/GPU.cpp index a4c5e9919..c4107a376 100644 --- a/desmume/src/GPU.cpp +++ b/desmume/src/GPU.cpp @@ -312,6 +312,7 @@ void GPU_Reset(GPU *g, u8 l) delete osd; osd = new OSDCLASS(-1); //DISP_FIFOclear(&g->disp_fifo); + memset(GPU_screen, 0, sizeof(GPU_screen)); } void GPU_DeInit(GPU * gpu) diff --git a/desmume/src/OGLRender.cpp b/desmume/src/OGLRender.cpp index 19e0f6cf3..e698b689d 100644 --- a/desmume/src/OGLRender.cpp +++ b/desmume/src/OGLRender.cpp @@ -492,7 +492,9 @@ static void OGLReset() //clear the framebuffers // memset(GPU_screenStencil,0,sizeof(GPU_screenStencil)); memset(GPU_screen3D,0,sizeof(GPU_screen3D)); - + needRefreshFramebuffer = false; + memset(texMAP, 0, sizeof(texMAP)); + textureMode=TEXMODE_NONE; } static char OGLInit(void) diff --git a/desmume/src/gfx3d.cpp b/desmume/src/gfx3d.cpp index df685bfdc..103470069 100644 --- a/desmume/src/gfx3d.cpp +++ b/desmume/src/gfx3d.cpp @@ -2001,13 +2001,13 @@ SFORMAT SF_GFX3D[]={ { "GMTM", 4,16, mtxTemporal}, { "GMCU", 4,64, mtxCurrent}, { "GM0P", 4, 1, &mtxStack[0].position}, - { "GM1M", 4,16, mtxStack[0].matrix}, + { "GM1M", 4,16, &mtxStack[0].matrix}, { "GM1P", 4, 1, &mtxStack[1].position}, - { "GM1M", 4,496,mtxStack[1].matrix}, + { "GM1M", 4,496,&mtxStack[1].matrix}, { "GM2P", 4, 1, &mtxStack[2].position}, - { "GM2M", 4,496,mtxStack[2].matrix}, + { "GM2M", 4,496,&mtxStack[2].matrix}, { "GM3P", 4, 1, &mtxStack[3].position}, - { "GM3M", 4,16, mtxStack[3].matrix}, + { "GM3M", 4,16, &mtxStack[3].matrix}, { "ML4I", 1, 1, &ML4x4ind}, { "ML3I", 1, 1, &ML4x3ind}, { "MM4I", 1, 1, &MM4x4ind},