Merge branch 'master' of git://github.com/snes9xgit/snes9x

This commit is contained in:
gocha 2011-05-02 12:57:26 +09:00
commit 6159f9a46a
3 changed files with 17 additions and 16 deletions

View File

@ -3547,6 +3547,7 @@ void CMemory::ApplyROMFixes (void)
match_na ("MSPACMAN") || // Ms Pacman
match_na ("THE MASK") || // The Mask
match_na ("PRIMAL RAGE") || // Primal Rage
match_na ("PORKY PIGS HAUNTED") ||
match_na ("DOOM TROOPERS")) // Doom Troopers
Timings.APUAllowTimeOverflow = TRUE;
}

View File

@ -294,8 +294,6 @@ bool CDirect3D::Initialize(HWND hWnd)
init_done = true;
SetViewport();
ApplyDisplayChanges();
return true;
@ -731,6 +729,9 @@ void CDirect3D::Render(SSurface Src)
drawSurface->UnlockRect(0);
}
if(!GUI.Stretch||GUI.AspectRatio)
pDevice->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0);
//if the output size of the render method changes we need to update the viewport
if(afterRenderHeight != dstRect.bottom || afterRenderWidth != dstRect.right) {
afterRenderHeight = dstRect.bottom;
@ -738,9 +739,6 @@ void CDirect3D::Render(SSurface Src)
SetViewport();
}
if(!GUI.Stretch||GUI.AspectRatio)
pDevice->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0);
pDevice->BeginScene();
pDevice->SetTexture(0, drawSurface);
@ -927,7 +925,6 @@ bool CDirect3D::ChangeRenderSize(unsigned int newWidth, unsigned int newHeight)
if(!ResetDevice())
return false;
SetViewport();
return true;
}
@ -1000,6 +997,9 @@ bool CDirect3D::ResetDevice()
//recreate the surface
CreateDrawSurface();
SetViewport();
return true;
}
@ -1042,7 +1042,7 @@ bool CDirect3D::SetFullscreen(bool fullscreen)
//present here to get a fullscreen blank even if no rendering is done
pDevice->Present(NULL,NULL,NULL,NULL);
SetupVertices();
return true;
}

View File

@ -1351,7 +1351,7 @@ static bool DoOpenRomDialog(TCHAR filename [_MAX_PATH], bool noCustomDlg = false
_tfullpath(szPathName, S9xGetDirectoryT(ROM_DIR), MAX_PATH);
// a limited strcat that doesn't mind null characters
#define strcat0(to,from) do{memcpy(to,from,sizeof(from)-1);to+=sizeof(from)-1;}while(false)
#define strcat0(to,from) do{memcpy(to,from,sizeof(from)-1);to+=(sizeof(from)/sizeof(TCHAR))-1;}while(false)
// make filter string using entries in valid_ext
TCHAR lpfilter [8192] = {0};
@ -5843,7 +5843,7 @@ INT_PTR CALLBACK DlgOpenROMProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPara
tvi.hItem=hTemp;
TreeView_GetItem(dirList, &tvi);
if(_tcsstr(blah, temp) != 0)
if(_tcsicmp(blah, temp) != 0)
{
do
{
@ -5854,7 +5854,7 @@ INT_PTR CALLBACK DlgOpenROMProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPara
tvi.hItem=hTemp;
TreeView_GetItem(dirList, &tvi);
}
while((hTemp != NULL) && (_tcsstr(blah, temp) != 0));
while((hTemp != NULL) && (_tcsicmp(blah, temp) != 0));
if(hTemp!=NULL)
{
@ -5888,11 +5888,12 @@ INT_PTR CALLBACK DlgOpenROMProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPara
{
LVFINDINFO lvfi;
ZeroMemory(&lvfi, sizeof(LVFINDINFO));
TCHAR tmp[_MAX_PATH];
TCHAR *tmp2;
lstrcpy(tmp,_tFromChar(Memory.ROMFilename));
TCHAR filename[_MAX_PATH];
TCHAR *tmp, *tmp2;
lstrcpy(filename,_tFromChar(Memory.ROMFilename));
tmp = filename;
while(tmp2=_tcsstr(tmp, TEXT("\\")))
tmp2=tmp2+1;
tmp=tmp2+sizeof(TCHAR);
lvfi.flags=LVFI_STRING;
lvfi.psz=tmp2;
@ -6640,8 +6641,7 @@ bool RegisterProgid() {
_stprintf_s(szRegKey,PATH_MAX-1,TEXT("Software\\Classes\\%s"),SNES9XWPROGID);
REGCREATEKEY(HKEY_CURRENT_USER, szRegKey)
int test = lstrlen(SNES9XWPROGIDDESC) + 1;
REGSETVALUE(hKey,NULL,REG_SZ,SNES9XWPROGIDDESC,22)
REGSETVALUE(hKey,NULL,REG_SZ,SNES9XWPROGIDDESC,(lstrlen(SNES9XWPROGIDDESC) + 1) * sizeof(TCHAR))
RegCloseKey(hKey);
_stprintf_s(szRegKey,PATH_MAX-1,TEXT("Software\\Classes\\%s\\DefaultIcon"),SNES9XWPROGID);