mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Fix crash when fb emulation enabled/disabled during gameplay, issue #601
This commit is contained in:
parent
70c4941fb9
commit
cbbd5d17de
|
@ -582,13 +582,11 @@ void FrameBuffer_Init()
|
||||||
|
|
||||||
void FrameBuffer_Destroy()
|
void FrameBuffer_Destroy()
|
||||||
{
|
{
|
||||||
if (config.frameBufferEmulation.enable != 0) {
|
|
||||||
g_RDRAMtoFB.Destroy();
|
g_RDRAMtoFB.Destroy();
|
||||||
#ifndef GLES2
|
#ifndef GLES2
|
||||||
g_dbToRDRAM.Destroy();
|
g_dbToRDRAM.Destroy();
|
||||||
g_fbToRDRAM.Destroy();
|
g_fbToRDRAM.Destroy();
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
frameBufferList().destroy();
|
frameBufferList().destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1099,8 +1097,10 @@ void DepthBufferToRDRAM::Destroy() {
|
||||||
textureCache().removeFrameBufferTexture(m_pDepthTexture);
|
textureCache().removeFrameBufferTexture(m_pDepthTexture);
|
||||||
m_pDepthTexture = NULL;
|
m_pDepthTexture = NULL;
|
||||||
}
|
}
|
||||||
glDeleteBuffers(1, &m_PBO);
|
if (m_PBO != 0) {
|
||||||
m_PBO = 0;
|
glDeleteBuffers(1, &m_PBO);
|
||||||
|
m_PBO = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DepthBufferToRDRAM::CopyToRDRAM( u32 _address) {
|
bool DepthBufferToRDRAM::CopyToRDRAM( u32 _address) {
|
||||||
|
@ -1209,8 +1209,10 @@ void RDRAMtoFrameBuffer::Destroy()
|
||||||
m_pTexture = NULL;
|
m_pTexture = NULL;
|
||||||
}
|
}
|
||||||
#ifndef GLES2
|
#ifndef GLES2
|
||||||
glDeleteBuffers(1, &m_PBO);
|
if (m_PBO != 0) {
|
||||||
m_PBO = 0;
|
glDeleteBuffers(1, &m_PBO);
|
||||||
|
m_PBO = 0;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -182,6 +182,7 @@ public:
|
||||||
u32 getHeightOffset() const {return m_heightOffset;}
|
u32 getHeightOffset() const {return m_heightOffset;}
|
||||||
bool isFullscreen() const {return m_bFullscreen;}
|
bool isFullscreen() const {return m_bFullscreen;}
|
||||||
bool isAdjustScreen() const {return m_bAdjustScreen;}
|
bool isAdjustScreen() const {return m_bAdjustScreen;}
|
||||||
|
bool isResizeWindow() const {return m_bResizeWindow;}
|
||||||
|
|
||||||
OGLRender & getRender() {return m_render;}
|
OGLRender & getRender() {return m_render;}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include "GBI.h"
|
#include "GBI.h"
|
||||||
#include "gDP.h"
|
#include "gDP.h"
|
||||||
#include "gSP.h"
|
#include "gSP.h"
|
||||||
|
#include "OpenGL.h"
|
||||||
#include "Debug.h"
|
#include "Debug.h"
|
||||||
|
|
||||||
void RDP_Unknown( u32 w0, u32 w1 )
|
void RDP_Unknown( u32 w0, u32 w1 )
|
||||||
|
@ -552,7 +553,12 @@ inline u32 READ_RDP_DATA(u32 address)
|
||||||
|
|
||||||
void RDP_ProcessRDPList()
|
void RDP_ProcessRDPList()
|
||||||
{
|
{
|
||||||
DebugMsg(DEBUG_HIGH | DEBUG_HANDLED, "ProcessRDPList()\n");
|
if (ConfigOpen || video().isResizeWindow()) {
|
||||||
|
dp_status &= ~0x0002;
|
||||||
|
dp_start = dp_current = dp_end;
|
||||||
|
gDPFullSync();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const u32 length = dp_end - dp_current;
|
const u32 length = dp_end - dp_current;
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,7 @@ void RSP_CheckDLCounter()
|
||||||
|
|
||||||
void RSP_ProcessDList()
|
void RSP_ProcessDList()
|
||||||
{
|
{
|
||||||
if (ConfigOpen) {
|
if (ConfigOpen || video().isResizeWindow()) {
|
||||||
gDPFullSync();
|
gDPFullSync();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user