mirror of https://github.com/PCSX2/pcsx2.git
SPU2-X: Fix one little bug in the spu2replay code and a few warnings discovered by warning level 4 + code analysis.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4867 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
b54fe4cb9e
commit
94e79f781d
|
@ -380,8 +380,8 @@ private:
|
||||||
SendMessage(GetDlgItem(hWnd,IDC_PA_DEVICE),CB_RESETCONTENT,0,0);
|
SendMessage(GetDlgItem(hWnd,IDC_PA_DEVICE),CB_RESETCONTENT,0,0);
|
||||||
SendMessageA(GetDlgItem(hWnd,IDC_PA_DEVICE),CB_ADDSTRING,0,(LPARAM)"Default Device");
|
SendMessageA(GetDlgItem(hWnd,IDC_PA_DEVICE),CB_ADDSTRING,0,(LPARAM)"Default Device");
|
||||||
SendMessage(GetDlgItem(hWnd,IDC_PA_DEVICE),CB_SETITEMDATA,0,0);
|
SendMessage(GetDlgItem(hWnd,IDC_PA_DEVICE),CB_SETITEMDATA,0,0);
|
||||||
int idx=0;
|
int _idx=0;
|
||||||
int i=1,j=0;
|
int i=1;
|
||||||
for(int j=0;j<Pa_GetDeviceCount();j++)
|
for(int j=0;j<Pa_GetDeviceCount();j++)
|
||||||
{
|
{
|
||||||
const PaDeviceInfo * info = Pa_GetDeviceInfo(j);
|
const PaDeviceInfo * info = Pa_GetDeviceInfo(j);
|
||||||
|
@ -391,12 +391,12 @@ private:
|
||||||
SendMessage(GetDlgItem(hWnd,IDC_PA_DEVICE),CB_SETITEMDATA,i,(LPARAM)info);
|
SendMessage(GetDlgItem(hWnd,IDC_PA_DEVICE),CB_SETITEMDATA,i,(LPARAM)info);
|
||||||
if(wxString::FromAscii(info->name) == m_Device)
|
if(wxString::FromAscii(info->name) == m_Device)
|
||||||
{
|
{
|
||||||
idx = i;
|
_idx = i;
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SendMessage(GetDlgItem(hWnd,IDC_PA_DEVICE),CB_SETCURSEL,idx,0);
|
SendMessage(GetDlgItem(hWnd,IDC_PA_DEVICE),CB_SETCURSEL,_idx,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
INIT_SLIDER( IDC_LATENCY, 10, 200, 10, 1, 1 );
|
INIT_SLIDER( IDC_LATENCY, 10, 200, 10, 1, 1 );
|
||||||
|
|
|
@ -188,7 +188,7 @@ u32 WaitSync( u32 TargetCycle )
|
||||||
u32 WaitTime = WaitCycles / IOPCiclesPerMS;
|
u32 WaitTime = WaitCycles / IOPCiclesPerMS;
|
||||||
if(WaitTime > 10)
|
if(WaitTime > 10)
|
||||||
WaitTime = 10;
|
WaitTime = 10;
|
||||||
if(WaitTime = 0)
|
if(WaitTime == 0)
|
||||||
WaitTime = 1;
|
WaitTime = 1;
|
||||||
SleepEx(WaitTime, TRUE);
|
SleepEx(WaitTime, TRUE);
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ void ReadSettings()
|
||||||
if( mods[OutputModule] == NULL )
|
if( mods[OutputModule] == NULL )
|
||||||
{
|
{
|
||||||
// Unsupported or legacy module.
|
// Unsupported or legacy module.
|
||||||
fprintf( stderr, "* SPU2-X: Unknown output module '%s' specified in configuration file.\n", omodid );
|
fwprintf( stderr, L"* SPU2-X: Unknown output module '%s' specified in configuration file.\n", omodid );
|
||||||
fprintf( stderr, "* SPU2-X: Defaulting to DirectSound (%S).\n", DSoundOut->GetIdent() );
|
fprintf( stderr, "* SPU2-X: Defaulting to DirectSound (%S).\n", DSoundOut->GetIdent() );
|
||||||
OutputModule = FindOutputModuleById( DSoundOut->GetIdent() );
|
OutputModule = FindOutputModuleById( DSoundOut->GetIdent() );
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,7 +190,7 @@ void UpdateDebugDialog()
|
||||||
TextOut(hdc,JX+4,JY+ 4,L"REVB",4);
|
TextOut(hdc,JX+4,JY+ 4,L"REVB",4);
|
||||||
TextOut(hdc,JX+4,JY+18,L"IRQE",4);
|
TextOut(hdc,JX+4,JY+18,L"IRQE",4);
|
||||||
TextOut(hdc,JX+4,JY+32,L"ADMA",4);
|
TextOut(hdc,JX+4,JY+32,L"ADMA",4);
|
||||||
swprintf_s(t,L"DMA%s",c==0 ? "4" : "7");
|
swprintf_s(t,L"DMA%s",c==0 ? L"4" : L"7");
|
||||||
TextOut(hdc,JX+4,JY+46,t, 4);
|
TextOut(hdc,JX+4,JY+46,t, 4);
|
||||||
|
|
||||||
SetTextColor(hdc,RGB( 0,255, 0));
|
SetTextColor(hdc,RGB( 0,255, 0));
|
||||||
|
@ -259,7 +259,6 @@ void UpdateDebugDialog()
|
||||||
}
|
}
|
||||||
if(cd.dmaFlag > 0) // So it shows x times this is called, since dmas are so fast
|
if(cd.dmaFlag > 0) // So it shows x times this is called, since dmas are so fast
|
||||||
{
|
{
|
||||||
static wchar_t t[256];
|
|
||||||
swprintf_s(t,L"size = %d",cd.lastsize);
|
swprintf_s(t,L"size = %d",cd.lastsize);
|
||||||
|
|
||||||
TextOut(hdc,JX+64,JY+46,t,wcslen(t));
|
TextOut(hdc,JX+64,JY+46,t,wcslen(t));
|
||||||
|
|
Loading…
Reference in New Issue