diff --git a/src/common/AddressRanges.h b/src/common/AddressRanges.h index e68704ded..3396480f5 100644 --- a/src/common/AddressRanges.h +++ b/src/common/AddressRanges.h @@ -35,8 +35,12 @@ // ****************************************************************** #pragma once +#ifndef CXBXEMULATOR_EXPORTS // Only trim Windows symbols CxbxLoader, not in CxbxEmulator #include #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#endif // CXBXEMULATOR_EXPORTS + +#undef FIELD_OFFSET // prevent macro redefinition warnings #include // For DWORD, CALLBACK, VirtualAlloc, LPVOID, SIZE_T, HMODULE #define KB(x) ((x) * 1024 ) // = 0x00000400 diff --git a/src/core/hle/D3D8/Direct3D9/Direct3D9.cpp b/src/core/hle/D3D8/Direct3D9/Direct3D9.cpp index e8ae724c3..ae392e413 100644 --- a/src/core/hle/D3D8/Direct3D9/Direct3D9.cpp +++ b/src/core/hle/D3D8/Direct3D9/Direct3D9.cpp @@ -26,6 +26,11 @@ // ****************************************************************** #define LOG_PREFIX CXBXR_MODULE::D3D8 +#ifdef CXBXEMULATOR_EXPORTS // DbgConsole only in Cxbx, not in CxbxEmulator + #undef INCLUDE_DBG_CONSOLE +#else + #define INCLUDE_DBG_CONSOLE +#endif #include "common\util\hasher.h" #include #include @@ -41,7 +46,9 @@ namespace xboxkrnl #include "core\kernel\init\CxbxKrnl.h" #include "core\kernel\support\Emu.h" #include "EmuShared.h" +#ifdef INCLUDE_DBG_CONSOLE #include "gui\DbgConsole.h" +#endif #include "core\hle\D3D8\ResourceTracker.h" #include "core\hle\D3D8\Direct3D9\Direct3D9.h" // For LPDIRECTDRAWSURFACE7 #include "core\hle\D3D8\XbVertexBuffer.h" @@ -1783,7 +1790,9 @@ static DWORD WINAPI EmuRenderWindow(LPVOID lpVoid) SetFocus(g_hEmuWindow); - DbgConsole *dbgConsole = new DbgConsole(); +#ifdef INCLUDE_DBG_CONSOLE + DbgConsole *dbgConsole = new DbgConsole(); +#endif // message processing loop { @@ -1806,21 +1815,27 @@ static DWORD WINAPI EmuRenderWindow(LPVOID lpVoid) { Sleep(0); +#ifdef INCLUDE_DBG_CONSOLE // if we've just switched back to display off, clear buffer & display prompt if(!g_bPrintfOn && lPrintfOn) { - dbgConsole->Reset(); + dbgConsole->Reset(); } +#endif lPrintfOn = g_bPrintfOn; - dbgConsole->Process(); +#ifdef INCLUDE_DBG_CONSOLE + dbgConsole->Process(); +#endif } } g_bRenderWindowActive = false; - delete dbgConsole; +#ifdef INCLUDE_DBG_CONSOLE + delete dbgConsole; +#endif CxbxKrnlCleanup(nullptr); } diff --git a/src/emulator/targetver.h b/src/emulator/targetver.h index 90e767bfc..ba864c29a 100644 --- a/src/emulator/targetver.h +++ b/src/emulator/targetver.h @@ -5,4 +5,4 @@ // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. -#include +//#include