Some tiny fix, fixed a crash when activating "overlay some statistics" on OGL plugin (which actually overlays a whole book + 400 chapters of statistics and, indeed, overflows and crash) + memleak fix on LLE plugin and little fix on GBAlink shutdown code.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5113 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
141ee0e485
commit
ae58a743cb
|
@ -60,7 +60,11 @@ void GBAConnectionWaiter_Shutdown()
|
||||||
{
|
{
|
||||||
server_running = false;
|
server_running = false;
|
||||||
if (connectionThread)
|
if (connectionThread)
|
||||||
|
{
|
||||||
connectionThread->WaitForDeath();
|
connectionThread->WaitForDeath();
|
||||||
|
delete connectionThread;
|
||||||
|
connectionThread = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GetAvailableSock(sf::SocketTCP& sock_to_fill)
|
bool GetAvailableSock(sf::SocketTCP& sock_to_fill)
|
||||||
|
|
|
@ -46,34 +46,41 @@ void Statistics::SwapDL()
|
||||||
char *Statistics::ToString(char *ptr)
|
char *Statistics::ToString(char *ptr)
|
||||||
{
|
{
|
||||||
char *p = ptr;
|
char *p = ptr;
|
||||||
p+=sprintf(p,"textures created: %i\n",stats.numTexturesCreated);
|
ptr+=sprintf(ptr,"textures created: %i\n",stats.numTexturesCreated);
|
||||||
p+=sprintf(p,"textures alive: %i\n",stats.numTexturesAlive);
|
ptr+=sprintf(ptr,"textures alive: %i\n",stats.numTexturesAlive);
|
||||||
p+=sprintf(p,"pshaders created: %i\n",stats.numPixelShadersCreated);
|
ptr+=sprintf(ptr,"pshaders created: %i\n",stats.numPixelShadersCreated);
|
||||||
p+=sprintf(p,"pshaders alive: %i\n",stats.numPixelShadersAlive);
|
ptr+=sprintf(ptr,"pshaders alive: %i\n",stats.numPixelShadersAlive);
|
||||||
p+=sprintf(p,"vshaders created: %i\n",stats.numVertexShadersCreated);
|
ptr+=sprintf(ptr,"vshaders created: %i\n",stats.numVertexShadersCreated);
|
||||||
p+=sprintf(p,"vshaders alive: %i\n",stats.numVertexShadersAlive);
|
ptr+=sprintf(ptr,"vshaders alive: %i\n",stats.numVertexShadersAlive);
|
||||||
p+=sprintf(p,"dlists called: %i\n",stats.numDListsCalled);
|
ptr+=sprintf(ptr,"dlists called: %i\n",stats.numDListsCalled);
|
||||||
p+=sprintf(p,"dlists called(f): %i\n",stats.thisFrame.numDListsCalled);
|
ptr+=sprintf(ptr,"dlists called(f): %i\n",stats.thisFrame.numDListsCalled);
|
||||||
p+=sprintf(p,"dlists alive: %i\n",stats.numDListsAlive);
|
ptr+=sprintf(ptr,"dlists alive: %i\n",stats.numDListsAlive);
|
||||||
p+=sprintf(p,"primitive joins: %i\n",stats.thisFrame.numPrimitiveJoins);
|
ptr+=sprintf(ptr,"primitive joins: %i\n",stats.thisFrame.numPrimitiveJoins);
|
||||||
p+=sprintf(p,"draw calls: %i\n",stats.thisFrame.numDrawCalls);
|
ptr+=sprintf(ptr,"draw calls: %i\n",stats.thisFrame.numDrawCalls);
|
||||||
p+=sprintf(p,"indexed draw calls: %i\n",stats.thisFrame.numIndexedDrawCalls);
|
ptr+=sprintf(ptr,"indexed draw calls: %i\n",stats.thisFrame.numIndexedDrawCalls);
|
||||||
p+=sprintf(p,"buffer splits: %i\n",stats.thisFrame.numBufferSplits);
|
ptr+=sprintf(ptr,"buffer splits: %i\n",stats.thisFrame.numBufferSplits);
|
||||||
p+=sprintf(p,"primitives: %i\n",stats.thisFrame.numPrims);
|
ptr+=sprintf(ptr,"primitives: %i\n",stats.thisFrame.numPrims);
|
||||||
p+=sprintf(p,"primitives (DL): %i\n",stats.thisFrame.numDLPrims);
|
ptr+=sprintf(ptr,"primitives (DL): %i\n",stats.thisFrame.numDLPrims);
|
||||||
p+=sprintf(p,"XF loads: %i\n",stats.thisFrame.numXFLoads);
|
ptr+=sprintf(ptr,"XF loads: %i\n",stats.thisFrame.numXFLoads);
|
||||||
p+=sprintf(p,"XF loads (DL): %i\n",stats.thisFrame.numXFLoadsInDL);
|
ptr+=sprintf(ptr,"XF loads (DL): %i\n",stats.thisFrame.numXFLoadsInDL);
|
||||||
p+=sprintf(p,"CP loads: %i\n",stats.thisFrame.numCPLoads);
|
ptr+=sprintf(ptr,"CP loads: %i\n",stats.thisFrame.numCPLoads);
|
||||||
p+=sprintf(p,"CP loads (DL): %i\n",stats.thisFrame.numCPLoadsInDL);
|
ptr+=sprintf(ptr,"CP loads (DL): %i\n",stats.thisFrame.numCPLoadsInDL);
|
||||||
p+=sprintf(p,"BP loads: %i\n",stats.thisFrame.numBPLoads);
|
ptr+=sprintf(ptr,"BP loads: %i\n",stats.thisFrame.numBPLoads);
|
||||||
p+=sprintf(p,"BP loads (DL): %i\n",stats.thisFrame.numBPLoadsInDL);
|
ptr+=sprintf(ptr,"BP loads (DL): %i\n",stats.thisFrame.numBPLoadsInDL);
|
||||||
p+=sprintf(p,"Vertex Loaders: %i\n",stats.numVertexLoaders);
|
ptr+=sprintf(ptr,"Vertex Loaders: %i\n",stats.numVertexLoaders);
|
||||||
|
|
||||||
std::string text1;
|
std::string text1;
|
||||||
VertexLoaderManager::AppendListToString(&text1);
|
VertexLoaderManager::AppendListToString(&text1);
|
||||||
// TODO: Check for buffer overflow
|
|
||||||
p+=sprintf(p,"%s",text1.c_str());
|
// TODO : at some point text1 just becomes too huge and overflows, we can't even read the added stuff
|
||||||
return p;
|
// since it gets added at the far bottom of the screen anyway (actually outside the rendering window)
|
||||||
|
// we should really reset the list instead of using substr
|
||||||
|
if (text1.size() + ptr - p > 8170)
|
||||||
|
text1 = text1.substr(0, 8170 - (ptr - p));
|
||||||
|
|
||||||
|
ptr+=sprintf(ptr,"%s",text1.c_str());
|
||||||
|
|
||||||
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Is this really needed?
|
// Is this really needed?
|
||||||
|
|
|
@ -138,7 +138,8 @@ void DllConfig(HWND _hParent)
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
if (!m_ConfigFrame)
|
if (!m_ConfigFrame)
|
||||||
{
|
{
|
||||||
m_ConfigFrame = new DSPConfigDialogLLE(GetParentedWxWindow(_hParent));
|
wxWindow *frame = GetParentedWxWindow(_hParent);
|
||||||
|
m_ConfigFrame = new DSPConfigDialogLLE(frame);
|
||||||
|
|
||||||
// add backends
|
// add backends
|
||||||
std::vector<std::string> backends = AudioCommon::GetSoundBackends();
|
std::vector<std::string> backends = AudioCommon::GetSoundBackends();
|
||||||
|
@ -153,6 +154,10 @@ void DllConfig(HWND _hParent)
|
||||||
m_ConfigFrame->ShowModal();
|
m_ConfigFrame->ShowModal();
|
||||||
m_ConfigFrame->Destroy();
|
m_ConfigFrame->Destroy();
|
||||||
m_ConfigFrame = NULL;
|
m_ConfigFrame = NULL;
|
||||||
|
#ifdef _WIN32
|
||||||
|
frame->SetHWND(NULL);
|
||||||
|
#endif
|
||||||
|
delete frame;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue