mirror of https://github.com/snes9xgit/snes9x.git
Merge branch 'master' of git://github.com/snes9xgit/snes9x
This commit is contained in:
commit
6159f9a46a
|
@ -3547,6 +3547,7 @@ void CMemory::ApplyROMFixes (void)
|
||||||
match_na ("MSPACMAN") || // Ms Pacman
|
match_na ("MSPACMAN") || // Ms Pacman
|
||||||
match_na ("THE MASK") || // The Mask
|
match_na ("THE MASK") || // The Mask
|
||||||
match_na ("PRIMAL RAGE") || // Primal Rage
|
match_na ("PRIMAL RAGE") || // Primal Rage
|
||||||
|
match_na ("PORKY PIGS HAUNTED") ||
|
||||||
match_na ("DOOM TROOPERS")) // Doom Troopers
|
match_na ("DOOM TROOPERS")) // Doom Troopers
|
||||||
Timings.APUAllowTimeOverflow = TRUE;
|
Timings.APUAllowTimeOverflow = TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -294,8 +294,6 @@ bool CDirect3D::Initialize(HWND hWnd)
|
||||||
|
|
||||||
init_done = true;
|
init_done = true;
|
||||||
|
|
||||||
SetViewport();
|
|
||||||
|
|
||||||
ApplyDisplayChanges();
|
ApplyDisplayChanges();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -731,6 +729,9 @@ void CDirect3D::Render(SSurface Src)
|
||||||
drawSurface->UnlockRect(0);
|
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 the output size of the render method changes we need to update the viewport
|
||||||
if(afterRenderHeight != dstRect.bottom || afterRenderWidth != dstRect.right) {
|
if(afterRenderHeight != dstRect.bottom || afterRenderWidth != dstRect.right) {
|
||||||
afterRenderHeight = dstRect.bottom;
|
afterRenderHeight = dstRect.bottom;
|
||||||
|
@ -738,9 +739,6 @@ void CDirect3D::Render(SSurface Src)
|
||||||
SetViewport();
|
SetViewport();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!GUI.Stretch||GUI.AspectRatio)
|
|
||||||
pDevice->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0);
|
|
||||||
|
|
||||||
pDevice->BeginScene();
|
pDevice->BeginScene();
|
||||||
|
|
||||||
pDevice->SetTexture(0, drawSurface);
|
pDevice->SetTexture(0, drawSurface);
|
||||||
|
@ -927,7 +925,6 @@ bool CDirect3D::ChangeRenderSize(unsigned int newWidth, unsigned int newHeight)
|
||||||
if(!ResetDevice())
|
if(!ResetDevice())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
SetViewport();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1000,6 +997,9 @@ bool CDirect3D::ResetDevice()
|
||||||
|
|
||||||
//recreate the surface
|
//recreate the surface
|
||||||
CreateDrawSurface();
|
CreateDrawSurface();
|
||||||
|
|
||||||
|
SetViewport();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1042,7 +1042,7 @@ bool CDirect3D::SetFullscreen(bool fullscreen)
|
||||||
|
|
||||||
//present here to get a fullscreen blank even if no rendering is done
|
//present here to get a fullscreen blank even if no rendering is done
|
||||||
pDevice->Present(NULL,NULL,NULL,NULL);
|
pDevice->Present(NULL,NULL,NULL,NULL);
|
||||||
SetupVertices();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1351,7 +1351,7 @@ static bool DoOpenRomDialog(TCHAR filename [_MAX_PATH], bool noCustomDlg = false
|
||||||
_tfullpath(szPathName, S9xGetDirectoryT(ROM_DIR), MAX_PATH);
|
_tfullpath(szPathName, S9xGetDirectoryT(ROM_DIR), MAX_PATH);
|
||||||
|
|
||||||
// a limited strcat that doesn't mind null characters
|
// 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
|
// make filter string using entries in valid_ext
|
||||||
TCHAR lpfilter [8192] = {0};
|
TCHAR lpfilter [8192] = {0};
|
||||||
|
@ -5843,7 +5843,7 @@ INT_PTR CALLBACK DlgOpenROMProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPara
|
||||||
tvi.hItem=hTemp;
|
tvi.hItem=hTemp;
|
||||||
TreeView_GetItem(dirList, &tvi);
|
TreeView_GetItem(dirList, &tvi);
|
||||||
|
|
||||||
if(_tcsstr(blah, temp) != 0)
|
if(_tcsicmp(blah, temp) != 0)
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -5854,7 +5854,7 @@ INT_PTR CALLBACK DlgOpenROMProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPara
|
||||||
tvi.hItem=hTemp;
|
tvi.hItem=hTemp;
|
||||||
TreeView_GetItem(dirList, &tvi);
|
TreeView_GetItem(dirList, &tvi);
|
||||||
}
|
}
|
||||||
while((hTemp != NULL) && (_tcsstr(blah, temp) != 0));
|
while((hTemp != NULL) && (_tcsicmp(blah, temp) != 0));
|
||||||
|
|
||||||
if(hTemp!=NULL)
|
if(hTemp!=NULL)
|
||||||
{
|
{
|
||||||
|
@ -5888,11 +5888,12 @@ INT_PTR CALLBACK DlgOpenROMProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPara
|
||||||
{
|
{
|
||||||
LVFINDINFO lvfi;
|
LVFINDINFO lvfi;
|
||||||
ZeroMemory(&lvfi, sizeof(LVFINDINFO));
|
ZeroMemory(&lvfi, sizeof(LVFINDINFO));
|
||||||
TCHAR tmp[_MAX_PATH];
|
TCHAR filename[_MAX_PATH];
|
||||||
TCHAR *tmp2;
|
TCHAR *tmp, *tmp2;
|
||||||
lstrcpy(tmp,_tFromChar(Memory.ROMFilename));
|
lstrcpy(filename,_tFromChar(Memory.ROMFilename));
|
||||||
|
tmp = filename;
|
||||||
while(tmp2=_tcsstr(tmp, TEXT("\\")))
|
while(tmp2=_tcsstr(tmp, TEXT("\\")))
|
||||||
tmp2=tmp2+1;
|
tmp=tmp2+sizeof(TCHAR);
|
||||||
|
|
||||||
lvfi.flags=LVFI_STRING;
|
lvfi.flags=LVFI_STRING;
|
||||||
lvfi.psz=tmp2;
|
lvfi.psz=tmp2;
|
||||||
|
@ -6640,8 +6641,7 @@ bool RegisterProgid() {
|
||||||
|
|
||||||
_stprintf_s(szRegKey,PATH_MAX-1,TEXT("Software\\Classes\\%s"),SNES9XWPROGID);
|
_stprintf_s(szRegKey,PATH_MAX-1,TEXT("Software\\Classes\\%s"),SNES9XWPROGID);
|
||||||
REGCREATEKEY(HKEY_CURRENT_USER, szRegKey)
|
REGCREATEKEY(HKEY_CURRENT_USER, szRegKey)
|
||||||
int test = lstrlen(SNES9XWPROGIDDESC) + 1;
|
REGSETVALUE(hKey,NULL,REG_SZ,SNES9XWPROGIDDESC,(lstrlen(SNES9XWPROGIDDESC) + 1) * sizeof(TCHAR))
|
||||||
REGSETVALUE(hKey,NULL,REG_SZ,SNES9XWPROGIDDESC,22)
|
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
|
|
||||||
_stprintf_s(szRegKey,PATH_MAX-1,TEXT("Software\\Classes\\%s\\DefaultIcon"),SNES9XWPROGID);
|
_stprintf_s(szRegKey,PATH_MAX-1,TEXT("Software\\Classes\\%s\\DefaultIcon"),SNES9XWPROGID);
|
||||||
|
|
Loading…
Reference in New Issue