diff --git a/stepmania/src/BaseClasses/outputq.cpp b/stepmania/src/BaseClasses/outputq.cpp index c1e0d1c37e..d80d84f45e 100644 --- a/stepmania/src/BaseClasses/outputq.cpp +++ b/stepmania/src/BaseClasses/outputq.cpp @@ -626,7 +626,9 @@ HRESULT COutputQueue::ReceiveMultiple( // Loop processing the samples in batches LONG iLost = 0; - for(long iDone = 0; +/*NABIL: I moved this long declaration out of the for loop, incorrect scope*/ + long iDone; + for(iDone = 0; iDone < nSamples || (m_nBatched != 0 && m_bSendAnyway);) { //pragma message (REMIND("Implement threshold scheme")) diff --git a/stepmania/src/BaseClasses/sysclock.cpp b/stepmania/src/BaseClasses/sysclock.cpp index 5a04bf8ed6..b07a2e5cbb 100644 --- a/stepmania/src/BaseClasses/sysclock.cpp +++ b/stepmania/src/BaseClasses/sysclock.cpp @@ -11,20 +11,21 @@ #include #include - -#ifdef FILTER_DLL +/*NABIL: I changed this*/ +//#ifdef FILTER_DLL /* List of class IDs and creator functions for the class factory. This provides the link between the OLE entry point in the DLL and an object being created. The class factory will call the static CreateInstance function when it is asked to create a CLSID_SystemClock object */ +/*NABIL: This was screwed up....(It didn't have the "blah")*/ CFactoryTemplate g_Templates[1] = { - {&CLSID_SystemClock, CSystemClock::CreateInstance} + { (const WCHAR *) "blah", &CLSID_SystemClock, CSystemClock::CreateInstance } }; int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]); -#endif +//#endif /* This goes in the factory template table to create new instances */ CUnknown * WINAPI CSystemClock::CreateInstance(LPUNKNOWN pUnk,HRESULT *phr) diff --git a/stepmania/src/BaseClasses/winctrl.cpp b/stepmania/src/BaseClasses/winctrl.cpp index 6040fd20b3..9998e26a05 100644 --- a/stepmania/src/BaseClasses/winctrl.cpp +++ b/stepmania/src/BaseClasses/winctrl.cpp @@ -126,7 +126,9 @@ STDMETHODIMP CBaseControlWindow::put_Caption(BSTR strCaption) { // which ensures the interface doesn't fiddle around with getting memory. A // BSTR is a normal C string with the length at position (-1), we use the // WriteBSTR helper function to create the caption to try and avoid OLE32 -/* + +/* NABIL: I un-commented this entire function...*/ + STDMETHODIMP CBaseControlWindow::get_Caption(BSTR *pstrCaption) { CheckPointer(pstrCaption,E_POINTER); CheckConnected(m_pPin,VFW_E_NOT_CONNECTED); @@ -143,7 +145,8 @@ STDMETHODIMP CBaseControlWindow::get_Caption(BSTR *pstrCaption) { #endif return WriteBSTR(pstrCaption,WideCaption); } -*/ + +/*NABIL: END Un-comment*/ // Set the window style using GWL_EXSTYLE diff --git a/stepmania/src/BaseClasses/winutil.cpp b/stepmania/src/BaseClasses/winutil.cpp index fd48700d00..df9c10dc0d 100644 --- a/stepmania/src/BaseClasses/winutil.cpp +++ b/stepmania/src/BaseClasses/winutil.cpp @@ -10,6 +10,7 @@ #include #include #include +#include static UINT MsgDestroy; @@ -2104,7 +2105,8 @@ HRESULT CImagePalette::MakeIdentityPalette(PALETTEENTRY *pEntry,INT iColours, LP // I am not sure what will be in the flags fields for the system entries UINT Result = GetSystemPaletteEntries(hdc,0,PalLoCount,SystemEntries); - for (UINT Count = 0;Count < Result;Count++) { + UINT Count; + for (Count = 0;Count < Result;Count++) { if (SystemEntries[Count].peRed != pEntry[Count].peRed || SystemEntries[Count].peGreen != pEntry[Count].peGreen || SystemEntries[Count].peBlue != pEntry[Count].peBlue) { diff --git a/stepmania/src/BaseClasses/wxdebug.cpp b/stepmania/src/BaseClasses/wxdebug.cpp index fdf01e320b..b8087ae922 100644 --- a/stepmania/src/BaseClasses/wxdebug.cpp +++ b/stepmania/src/BaseClasses/wxdebug.cpp @@ -527,7 +527,8 @@ BOOL WINAPI DbgCheckModuleLevel(DWORD Type,DWORD Level) { if(g_fAutoRefreshLevels) { // re-read the registry every second. We cannot use RegNotify() to // notice registry changes because it's not available on win9x. - static g_dwLastRefresh = 0; + /*NABIL: This needed to be a static int, not ust static*/ + static int g_dwLastRefresh = 0; DWORD dwTime = timeGetTime(); if(dwTime - g_dwLastRefresh > 1000) { g_dwLastRefresh = dwTime; diff --git a/stepmania/src/BaseClasses/wxutil.cpp b/stepmania/src/BaseClasses/wxutil.cpp index 4fd6e2626e..065d84e346 100644 --- a/stepmania/src/BaseClasses/wxutil.cpp +++ b/stepmania/src/BaseClasses/wxutil.cpp @@ -6,8 +6,7 @@ // // Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ - - +#include #include // @@ -260,7 +259,7 @@ HRESULT CAMThread::CoInitializeHelper() { PCoInitializeEx pCoInitializeEx = (PCoInitializeEx)(GetProcAddress(hOle, "CoInitializeEx")); if(pCoInitializeEx) { - hr = (*pCoInitializeEx)(0, COINIT_DISABLE_OLE1DDE ); + hr = (*pCoInitializeEx)(0, 0x4 ); /*NABIL: Changed this to the constant, rather than the Variable...*/ } } else { @@ -989,14 +988,15 @@ BOOL WINAPI CritCheckOut(const CCritSec * pcCrit) { } #endif -/* +/*NABIL: I un-commented this...*/ STDAPI WriteBSTR(BSTR *pstrDest, LPCWSTR szSrc) { *pstrDest = SysAllocString(szSrc); if(!(*pstrDest)) return E_OUTOFMEMORY; return NOERROR; } +/*END un-comment*/ - +/* STDAPI FreeBSTR(BSTR* pstr) { if(*pstr == NULL) return S_FALSE; SysFreeString(*pstr);