Several little things:

Clean up of the input selected for the opengl x window in linux.
Fix a potential segfault when taking a screenshot (happens consistently when using "Save Targets" from the video debugger window).
Fix a memory corruption error that results from the wrong image size being passed when dumping textures.
Make the screenshot hotkey configurable.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6067 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice
2010-08-08 00:13:05 +00:00
parent 105c05bb7e
commit 957e7c415e
10 changed files with 25 additions and 17 deletions

View File

@ -583,13 +583,12 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
entry.SetTextureParameters(tm0,tm1);
if (g_ActiveConfig.bDumpTextures) // dump texture to file
{
char szTemp[MAX_PATH];
char szDir[MAX_PATH];
const char* uniqueId = globals->unique_id;
bool bCheckedDumpDir = false;
static bool bCheckedDumpDir = false;
sprintf(szDir,"%s%s",File::GetUserPath(D_DUMPTEXTURES_IDX), uniqueId);
sprintf(szDir,"%s%s", File::GetUserPath(D_DUMPTEXTURES_IDX), uniqueId);
if(!bCheckedDumpDir)
{
@ -599,11 +598,9 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
bCheckedDumpDir = true;
}
sprintf(szTemp, "%s/%s_%08x_%i.tga",szDir, uniqueId, (unsigned int) texHash, tex_format);
sprintf(szTemp, "%s/%s_%08x_%i.tga", szDir, uniqueId, (unsigned int) texHash, tex_format);
if (!File::Exists(szTemp))
{
SaveTexture(szTemp, target, entry.texture, expandedWidth, expandedHeight);
}
SaveTexture(szTemp, target, entry.texture, entry.w, entry.h);
}
INCSTAT(stats.numTexturesCreated);