From c47e1ed6e929979132cbf32eb62c34a5eb7c8310 Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Sat, 26 Feb 2011 03:20:58 +0000 Subject: [PATCH] Couple clarifications and fixed warnings. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4367 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/Cache.cpp | 20 ++++++++++---------- pcsx2/MMI.cpp | 4 ++-- pcsx2/gui/AppCoreThread.cpp | 6 ++++-- pcsx2/gui/Panels/GSWindowPanel.cpp | 2 +- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/pcsx2/Cache.cpp b/pcsx2/Cache.cpp index 32b2e3bcc4..b9b682d73d 100644 --- a/pcsx2/Cache.cpp +++ b/pcsx2/Cache.cpp @@ -103,8 +103,8 @@ int getFreeCache(u32 mem, int mode, int * way ) { void writeCache8(u32 mem, u8 value) { int i, number; - u32 vmv=vtlbdata.vmap[mem>>VTLB_PAGE_BITS]; - s32 ppf=(mem+vmv) & ~0x3f; + //u32 vmv=vtlbdata.vmap[mem>>VTLB_PAGE_BITS]; + //s32 ppf=(mem+vmv) & ~0x3f; i = getFreeCache(mem,1,&number); CACHE_LOG("writeCache8 %8.8x adding to %d, way %d, value %x", mem, i,number,value); pCache[i].tag[number] |= DIRTY_FLAG; // Set Dirty Bit if mode == write @@ -113,8 +113,8 @@ void writeCache8(u32 mem, u8 value) { void writeCache16(u32 mem, u16 value) { int i, number; - u32 vmv=vtlbdata.vmap[mem>>VTLB_PAGE_BITS]; - s32 ppf=(mem+vmv) & ~0x3f; + //u32 vmv=vtlbdata.vmap[mem>>VTLB_PAGE_BITS]; + //s32 ppf=(mem+vmv) & ~0x3f; i = getFreeCache(mem,1,&number); CACHE_LOG("writeCache16 %8.8x adding to %d, way %d, value %x", mem, i,number,value); pCache[i].tag[number] |= DIRTY_FLAG; // Set Dirty Bit if mode == write @@ -123,8 +123,8 @@ void writeCache16(u32 mem, u16 value) { void writeCache32(u32 mem, u32 value) { int i, number; - u32 vmv=vtlbdata.vmap[mem>>VTLB_PAGE_BITS]; - s32 ppf=(mem+vmv) & ~0x3f; + //u32 vmv=vtlbdata.vmap[mem>>VTLB_PAGE_BITS]; + //s32 ppf=(mem+vmv) & ~0x3f; i = getFreeCache(mem,1,&number); CACHE_LOG("writeCache32 %8.8x adding to %d, way %d, value %x", mem, i,number,value); pCache[i].tag[number] |= DIRTY_FLAG; // Set Dirty Bit if mode == write @@ -133,8 +133,8 @@ void writeCache32(u32 mem, u32 value) { void writeCache64(u32 mem, const u64 value) { int i, number; - u32 vmv=vtlbdata.vmap[mem>>VTLB_PAGE_BITS]; - s32 ppf=(mem+vmv) & ~0x3f; + //u32 vmv=vtlbdata.vmap[mem>>VTLB_PAGE_BITS]; + //s32 ppf=(mem+vmv) & ~0x3f; i = getFreeCache(mem,1,&number); CACHE_LOG("writeCache64 %8.8x adding to %d, way %d, value %x", mem, i,number,value); pCache[i].tag[number] |= DIRTY_FLAG; // Set Dirty Bit if mode == write @@ -143,8 +143,8 @@ void writeCache64(u32 mem, const u64 value) { void writeCache128(u32 mem, const mem128_t* value){ int i, number; - u32 vmv=vtlbdata.vmap[mem>>VTLB_PAGE_BITS]; - s32 ppf=(mem+vmv) & ~0x3f; + //u32 vmv=vtlbdata.vmap[mem>>VTLB_PAGE_BITS]; + //s32 ppf=(mem+vmv) & ~0x3f; i = getFreeCache(mem,1,&number); CACHE_LOG("writeCache128 %8.8x adding to %d way %x tag %x vallo = %x_%x valhi = %x_%x", mem, i, number, pCache[i].tag[number], value->lo, value->hi); pCache[i].tag[number] |= DIRTY_FLAG; // Set Dirty Bit if mode == write diff --git a/pcsx2/MMI.cpp b/pcsx2/MMI.cpp index a09a64fb2b..6375405461 100644 --- a/pcsx2/MMI.cpp +++ b/pcsx2/MMI.cpp @@ -614,7 +614,7 @@ __fi void _PADDSB(int n) if (sTemp16 > 0x7F) cpuRegs.GPR.r[_Rd_].UC[n] = 0x7F; - else if (sTemp16 < (s16)0xff80) + else if (sTemp16 < /*(s16)0xff80*/(s16)-128) // be sure cpuRegs.GPR.r[_Rd_].UC[n] = 0x80; else cpuRegs.GPR.r[_Rd_].UC[n] = (s8)sTemp16; @@ -635,7 +635,7 @@ static __fi void _PSUBSB( u8 n ) if (sTemp16 >= 0x7F) cpuRegs.GPR.r[_Rd_].UC[n] = 0x7F; - else if (sTemp16 <= (s16)0xff80) + else if (sTemp16 < /*(s16)0xff80*/(s16)-128) // be sure cpuRegs.GPR.r[_Rd_].UC[n] = 0x80; else cpuRegs.GPR.r[_Rd_].UC[n] = (s8)sTemp16; diff --git a/pcsx2/gui/AppCoreThread.cpp b/pcsx2/gui/AppCoreThread.cpp index 56f9b16c39..e7cdf11ab7 100644 --- a/pcsx2/gui/AppCoreThread.cpp +++ b/pcsx2/gui/AppCoreThread.cpp @@ -625,7 +625,8 @@ ScopedCoreThreadClose::ScopedCoreThreadClose() if( !PostToSysExec(new SysExecEvent_CoreThreadClose()) ) { - if( !(m_alreadyStopped = CoreThread.IsClosed()) ) + m_alreadyStopped = CoreThread.IsClosed(); + if ( !m_alreadyStopped ) CoreThread.Suspend(); } @@ -651,7 +652,8 @@ ScopedCoreThreadPause::ScopedCoreThreadPause( BaseSysExecEvent_ScopedCore* abuse if( !abuse_me ) abuse_me = new SysExecEvent_CoreThreadPause(); if( !PostToSysExec( abuse_me ) ) { - if( !(m_alreadyStopped = CoreThread.IsPaused()) ) + m_alreadyStopped = CoreThread.IsPaused(); + if( !m_alreadyStopped ) CoreThread.Pause(); } diff --git a/pcsx2/gui/Panels/GSWindowPanel.cpp b/pcsx2/gui/Panels/GSWindowPanel.cpp index 7598e0c0b6..e97b2bfc24 100644 --- a/pcsx2/gui/Panels/GSWindowPanel.cpp +++ b/pcsx2/gui/Panels/GSWindowPanel.cpp @@ -156,7 +156,7 @@ void Panels::GSWindowSettingsPanel::Apply() appconf.IsToggleFullscreenOnDoubleClick = m_check_DclickFullscreen->GetValue(); - long xr, yr; + long xr, yr = 1; if( !m_text_WindowWidth->GetValue().ToLong( &xr ) || !m_text_WindowHeight->GetValue().ToLong( &yr ) ) throw Exception::CannotApplySettings( this )