diff --git a/Cxbe.dsp b/Cxbe.dsp
index 2e50824b7..fec5f6a5d 100644
--- a/Cxbe.dsp
+++ b/Cxbe.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /O2 /I "Include" /I "Include/Core/" /I "Include/Standard" /I "Include/Standard/Cxbe" /I "Include/Win32/" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /O2 /I "Include" /I "Include/Core/" /I "Include/Standard" /I "Include/Standard/Cxbe" /I "Include/Win32/" /I "Include/Win32/CxbxKrnl/" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@@ -67,7 +67,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /Zi /Od /I "Include" /I "Include/Core/" /I "Include/Standard" /I "Include/Standard/Cxbe" /I "Include/Win32/" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /Zi /Od /I "Include" /I "Include/Core/" /I "Include/Standard" /I "Include/Standard/Cxbe" /I "Include/Win32/" /I "Include/Win32/CxbxKrnl/" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
diff --git a/Cxbe.vcproj b/Cxbe.vcproj
index b4bc7027d..277bede18 100644
--- a/Cxbe.vcproj
+++ b/Cxbe.vcproj
@@ -21,7 +21,7 @@
diff --git a/Cxbx.opt b/Cxbx.opt
index 86f452e15..580b62044 100644
Binary files a/Cxbx.opt and b/Cxbx.opt differ
diff --git a/Cxbx.sln b/Cxbx.sln
index c52cea430..5449d5186 100644
--- a/Cxbx.sln
+++ b/Cxbx.sln
@@ -1,9 +1,9 @@
Microsoft Visual Studio Solution File, Format Version 7.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cxbe", "Cxbe.vcproj", "{F6656053-E173-4BFC-BC4F-A4539910E72E}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cxbe", "Cxbe.vcproj", "{47E018FF-BC97-4BC1-9565-8D1B5EF5739A}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cxbx", "Cxbx.vcproj", "{09283643-8783-476C-9A8A-CA8D582C9C5B}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cxbx", "Cxbx.vcproj", "{32D9FF15-9484-4C74-866B-E336EDCF1669}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CxbxKrnl", "CxbxKrnl.vcproj", "{017929D0-1B96-400E-AF89-09CB8BA40BF9}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CxbxKrnl", "CxbxKrnl.vcproj", "{134EEF58-6EBA-458A-8D9E-EDFE79650036}"
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
@@ -11,21 +11,21 @@ Global
ConfigName.1 = Release
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
- {09283643-8783-476C-9A8A-CA8D582C9C5B}.0 = {017929D0-1B96-400E-AF89-09CB8BA40BF9}
+ {32D9FF15-9484-4C74-866B-E336EDCF1669}.0 = {134EEF58-6EBA-458A-8D9E-EDFE79650036}
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
- {F6656053-E173-4BFC-BC4F-A4539910E72E}.Debug.ActiveCfg = Debug|Win32
- {F6656053-E173-4BFC-BC4F-A4539910E72E}.Debug.Build.0 = Debug|Win32
- {F6656053-E173-4BFC-BC4F-A4539910E72E}.Release.ActiveCfg = Release|Win32
- {F6656053-E173-4BFC-BC4F-A4539910E72E}.Release.Build.0 = Release|Win32
- {09283643-8783-476C-9A8A-CA8D582C9C5B}.Debug.ActiveCfg = Debug|Win32
- {09283643-8783-476C-9A8A-CA8D582C9C5B}.Debug.Build.0 = Debug|Win32
- {09283643-8783-476C-9A8A-CA8D582C9C5B}.Release.ActiveCfg = Release|Win32
- {09283643-8783-476C-9A8A-CA8D582C9C5B}.Release.Build.0 = Release|Win32
- {017929D0-1B96-400E-AF89-09CB8BA40BF9}.Debug.ActiveCfg = Debug|Win32
- {017929D0-1B96-400E-AF89-09CB8BA40BF9}.Debug.Build.0 = Debug|Win32
- {017929D0-1B96-400E-AF89-09CB8BA40BF9}.Release.ActiveCfg = Release|Win32
- {017929D0-1B96-400E-AF89-09CB8BA40BF9}.Release.Build.0 = Release|Win32
+ {47E018FF-BC97-4BC1-9565-8D1B5EF5739A}.Debug.ActiveCfg = Debug|Win32
+ {47E018FF-BC97-4BC1-9565-8D1B5EF5739A}.Debug.Build.0 = Debug|Win32
+ {47E018FF-BC97-4BC1-9565-8D1B5EF5739A}.Release.ActiveCfg = Release|Win32
+ {47E018FF-BC97-4BC1-9565-8D1B5EF5739A}.Release.Build.0 = Release|Win32
+ {32D9FF15-9484-4C74-866B-E336EDCF1669}.Debug.ActiveCfg = Debug|Win32
+ {32D9FF15-9484-4C74-866B-E336EDCF1669}.Debug.Build.0 = Debug|Win32
+ {32D9FF15-9484-4C74-866B-E336EDCF1669}.Release.ActiveCfg = Release|Win32
+ {32D9FF15-9484-4C74-866B-E336EDCF1669}.Release.Build.0 = Release|Win32
+ {134EEF58-6EBA-458A-8D9E-EDFE79650036}.Debug.ActiveCfg = Debug|Win32
+ {134EEF58-6EBA-458A-8D9E-EDFE79650036}.Debug.Build.0 = Debug|Win32
+ {134EEF58-6EBA-458A-8D9E-EDFE79650036}.Release.ActiveCfg = Release|Win32
+ {134EEF58-6EBA-458A-8D9E-EDFE79650036}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
diff --git a/Cxbx.suo b/Cxbx.suo
new file mode 100644
index 000000000..6e65881de
Binary files /dev/null and b/Cxbx.suo differ
diff --git a/Cxbx.vcproj b/Cxbx.vcproj
index 38cea407b..b38b00b0d 100644
--- a/Cxbx.vcproj
+++ b/Cxbx.vcproj
@@ -96,7 +96,7 @@ upxCxbx.bat
BrowseInformation="1"
WarningLevel="3"
SuppressStartupBanner="TRUE"
- DebugInformationFormat="4"
+ DebugInformationFormat="3"
CompileAs="0"/>
diff --git a/CxbxKrnl.vcproj b/CxbxKrnl.vcproj
index 80b190594..70bfca414 100644
--- a/CxbxKrnl.vcproj
+++ b/CxbxKrnl.vcproj
@@ -21,7 +21,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -253,30 +238,64 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
@@ -381,27 +382,61 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Include/Win32/CxbxKrnl/Emu.h b/Include/Win32/CxbxKrnl/Emu.h
index bf70d9456..2fdd81236 100644
--- a/Include/Win32/CxbxKrnl/Emu.h
+++ b/Include/Win32/CxbxKrnl/Emu.h
@@ -38,6 +38,7 @@
#undef FIELD_OFFSET // prevent macro redefinition warnings
#include
+#include
// pointless function
extern "C" CXBXKRNL_API void NTAPI EmuNoFunc();
@@ -115,7 +116,7 @@ extern struct XInputSetStateStatus
PVOID pFeedback;
}
g_pXInputSetStateStatus[8];
-
+/*
// extra stuff for multimonitors (win95+)
typedef struct _MONITORINFO
{
@@ -125,5 +126,5 @@ typedef struct _MONITORINFO
DWORD dwFlags;
}
MONITORINFO, *LPMONITORINFO;
-
+*/
#endif
diff --git a/Include/Win32/CxbxKrnl/EmuXOnline.h b/Include/Win32/CxbxKrnl/EmuXOnline.h
index eac886aea..b372dbbfb 100644
--- a/Include/Win32/CxbxKrnl/EmuXOnline.h
+++ b/Include/Win32/CxbxKrnl/EmuXOnline.h
@@ -54,25 +54,26 @@
// ******************************************************************
class EmuThis
{
- // ******************************************************************
- // * func: Emusocket
- // ******************************************************************
- SOCKET Emusocket(int af, int type, int protocol);
+ public:
+ // ******************************************************************
+ // * func: Emusocket
+ // ******************************************************************
+ SOCKET Emusocket(int af, int type, int protocol);
- // ******************************************************************
- // * func: Emubind
- // ******************************************************************
- int Emubind(SOCKET s, const struct sockaddr FAR *name, int namelen);
+ // ******************************************************************
+ // * func: Emubind
+ // ******************************************************************
+ int Emubind(SOCKET s, const struct sockaddr FAR *name, int namelen);
- // ******************************************************************
- // * func: Emulisten
- // ******************************************************************
- int Emulisten(SOCKET s, int backlog);
+ // ******************************************************************
+ // * func: Emulisten
+ // ******************************************************************
+ int Emulisten(SOCKET s, int backlog);
- // ******************************************************************
- // * func: Emuioctlsocket
- // ******************************************************************
- int Emuioctlsocket(SOCKET s, long cmd, u_long FAR *argp);
+ // ******************************************************************
+ // * func: Emuioctlsocket
+ // ******************************************************************
+ int Emuioctlsocket(SOCKET s, long cmd, u_long FAR *argp);
};
// ******************************************************************
diff --git a/Source/Win32/CxbxKrnl/Emu.cpp b/Source/Win32/CxbxKrnl/Emu.cpp
index 2dd0b40e9..76bf4e581 100644
--- a/Source/Win32/CxbxKrnl/Emu.cpp
+++ b/Source/Win32/CxbxKrnl/Emu.cpp
@@ -40,6 +40,7 @@ namespace xboxkrnl
#include
};
+#define COMPILE_MULTIMON_STUBS
#include "Emu.h"
#include "EmuFS.h"
diff --git a/Source/Win32/CxbxKrnl/EmuD3D8.cpp b/Source/Win32/CxbxKrnl/EmuD3D8.cpp
index 53e70ac11..b99756721 100644
--- a/Source/Win32/CxbxKrnl/EmuD3D8.cpp
+++ b/Source/Win32/CxbxKrnl/EmuD3D8.cpp
@@ -60,7 +60,7 @@ extern HWND g_hEmuWindow = NULL; // rendering window
extern XTL::LPDIRECT3DDEVICE8 g_pD3DDevice8 = NULL; // Direct3D8 Device
// Static Function(s)
-static BOOL WINAPI EmuEnumDisplayDevices(GUID FAR *lpGUID, LPSTR lpDriverDescription, LPSTR lpDriverName, LPVOID lpContext, XTL::HMONITOR hm);
+static BOOL WINAPI EmuEnumDisplayDevices(GUID FAR *lpGUID, LPSTR lpDriverDescription, LPSTR lpDriverName, LPVOID lpContext, HMONITOR hm);
static DWORD WINAPI EmuRenderWindow(LPVOID);
static DWORD WINAPI EmuCreateDeviceProxy(LPVOID);
static LRESULT WINAPI EmuMsgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -69,13 +69,13 @@ static inline void EmuVerifyResourceIsRegistered(XTL::X_D3DReso
static void EmuAdjustPower2(UINT *dwWidth, UINT *dwHeight);
static void EmuUpdateDeferredStates();
-typedef BOOL (WINAPI *pfGetMonitorInfo)(XTL::HMONITOR hMonitor, LPMONITORINFO lpmi);
-static pfGetMonitorInfo GetMonitorInfo = (pfGetMonitorInfo)GetProcAddress(LoadLibrary("user32.dll"), "GetMonitorInfoA");
+//typedef BOOL (WINAPI *pfGetMonitorInfo)(HMONITOR hMonitor, LPMONITORINFO lpmi);
+//static pfGetMonitorInfo GetMonitorInfo = (pfGetMonitorInfo)GetProcAddress(LoadLibrary("user32.dll"), "GetMonitorInfoA");
// Static Variable(s)
static GUID g_ddguid; // DirectDraw driver GUID
-static XTL::HMONITOR g_hMonitor = NULL; // Handle to DirectDraw monitor
-static XTL::LPDIRECT3D8 g_pD3D8 = NULL; // Direct3D8
+static HMONITOR g_hMonitor = NULL; // Handle to DirectDraw monitor
+static XTL::LPDIRECT3D8 g_pD3D8 = NULL; // Direct3D8
static BOOL g_bSupportsYUY2 = FALSE;// Does device support YUY2 overlays?
static XTL::LPDIRECTDRAW7 g_pDD7 = NULL; // DirectDraw7
static XTL::LPDIRECTDRAWSURFACE7 g_pDDSPrimary = NULL; // DirectDraw7 Primary Surface
@@ -244,7 +244,7 @@ VOID XTL::EmuD3DCleanup()
}
// enumeration procedure for locating display device GUIDs
-static BOOL WINAPI EmuEnumDisplayDevices(GUID FAR *lpGUID, LPSTR lpDriverDescription, LPSTR lpDriverName, LPVOID lpContext, XTL::HMONITOR hm)
+static BOOL WINAPI EmuEnumDisplayDevices(GUID FAR *lpGUID, LPSTR lpDriverDescription, LPSTR lpDriverName, LPVOID lpContext, HMONITOR hm)
{
static DWORD dwEnumCount = 0;
diff --git a/Source/Win32/CxbxKrnl/EmuDSound.cpp b/Source/Win32/CxbxKrnl/EmuDSound.cpp
index 53c979e08..c1bf50bc3 100644
--- a/Source/Win32/CxbxKrnl/EmuDSound.cpp
+++ b/Source/Win32/CxbxKrnl/EmuDSound.cpp
@@ -1189,37 +1189,6 @@ HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_GetStatus
return hRet;
}
-
-// ******************************************************************
-// * func: EmuIDirectSoundBuffer8_SetVolume
-// ******************************************************************
-HRESULT WINAPI XTL::EmuIDirectSoundBuffer8_SetVolume
-(
- X_CDirectSoundBuffer *pThis,
- LONG lVolume
-)
-{
- EmuSwapFS(); // Win2k/XP FS
-
- // debug trace
- #ifdef _DEBUG_TRACE
- {
- printf("EmuDSound (0x%X): EmuIDirectSoundBuffer8_SetVolume\n"
- "(\n"
- " pThis : 0x%.08X\n"
- " lVolume : 0x%.08X\n"
- ");\n",
- GetCurrentThreadId(), pThis, lVolume);
- }
- #endif
-
- // TODO: Translate params, then make the PC DirectSound call
-
- EmuSwapFS(); // XBox FS
-
- return DS_OK;
-}
-
// ******************************************************************
// * func: EmuIDirectSoundBuffer8_SetCurrentPosition
// ******************************************************************
diff --git a/Source/Win32/Mutex.cpp b/Source/Win32/Mutex.cpp
index 6ac299eb1..fa72f37b8 100644
--- a/Source/Win32/Mutex.cpp
+++ b/Source/Win32/Mutex.cpp
@@ -52,9 +52,12 @@ void Mutex::Lock()
while(true)
{
// Grab the lock, letting us look at the variables
+#if (_MSC_VER < 1300) // We are not using VC++.NET
while(InterlockedCompareExchange((LPVOID*)&m_MutexLock, (LPVOID)1, (LPVOID)0))
-// while(InterlockedCompareExchange((LPLONG)&m_MutexLock, (LONG)1, (LONG)0))
- Sleep(1);
+#else
+ while(InterlockedCompareExchange((LPLONG)&m_MutexLock, (LONG)1, (LONG)0))
+#endif
+ Sleep(1);
// Are we the the new owner?
if (!m_OwnerProcess)
@@ -99,8 +102,11 @@ void Mutex::Lock()
void Mutex::Unlock()
{
// Grab the lock, letting us look at the variables
+#if (_MSC_VER < 1300) // We are not using VC++.NET
while(InterlockedCompareExchange((LPVOID*)&m_MutexLock, (LPVOID)1, (LPVOID)0))
-// while (InterlockedCompareExchange((LPLONG)&m_MutexLock, (LONG)1, (LONG)0))
+#else
+ while (InterlockedCompareExchange((LPLONG)&m_MutexLock, (LONG)1, (LONG)0))
+#endif
Sleep(1);
// Decrement the lock count