Replaced DbgPrintg EmuKrnl with DbgFuncArgs, avoiding typos altogether

This commit is contained in:
PatrickvL 2016-11-07 11:38:59 +01:00
parent 02708b4f1f
commit 94d3fbbffe
6 changed files with 540 additions and 908 deletions

View File

@ -82,8 +82,6 @@ typedef signed long sint32;
/*! define this to dump textures that are registered */ /*! define this to dump textures that are registered */
//#define _DEBUG_DUMP_TEXTURE_REGISTER "D:\\cxbx\\_textures\\" //#define _DEBUG_DUMP_TEXTURE_REGISTER "D:\\cxbx\\_textures\\"
#include "Version.h"
/*! version string dependent on trace flag */ /*! version string dependent on trace flag */
#ifndef _DEBUG_TRACE #ifndef _DEBUG_TRACE
#define _CXBX_VERSION _GIT_VERSION " ("__DATE__ ")" #define _CXBX_VERSION _GIT_VERSION " ("__DATE__ ")"
@ -105,11 +103,13 @@ extern volatile bool g_bPrintfOn;
#endif #endif
/*! DbgPrintf enabled if _DEBUG_TRACE is set */ /*! DbgPrintf enabled if _DEBUG_TRACE is set */
#ifdef _DEBUG_TRACE #define DbgPrintf(fmt, ...) do { if (_DEBUG_TRACE) if(g_bPrintfOn) printf(fmt, __VA_ARGS__); } while (0)
#define DbgPrintf if(g_bPrintfOn) printf
#else // See http://stackoverflow.com/questions/1644868/c-define-macro-for-debug-printing
inline void null_func(...) { } // TODO : print each argument indented on a separate line
#define DbgPrintf null_func #define DbgFuncArgs(fmt, ...) \
#endif do { if (_DEBUG_TRACE) if(g_bPrintfOn) \
printf(__FILE__ " (0x%X): " __func__ "(" fmt ");\n", GetCurrentThreadID(), __VA_ARGS__); \
} while (0)
#endif #endif

File diff suppressed because it is too large Load Diff

View File

@ -58,20 +58,9 @@ PVOID WINAPI XTL::EmuXGIsSwizzledFormat
XTL::D3DFORMAT Format XTL::D3DFORMAT Format
) )
{ {
// ****************************************************************** DbgFuncArgs(
// * debug trace " Format : 0x%.08X\n",
// ****************************************************************** Format);
#ifdef _DEBUG_TRACE
{
DbgPrintf("EmuXapi (0x%X): EmuXGIsSwizzledFormat\n"
"(\n"
" Format : 0x%.08X\n"
");\n",
GetCurrentThreadId(), Format);
}
#endif
return FALSE; return FALSE;
} }
@ -93,8 +82,7 @@ VOID WINAPI XTL::EmuXGSwizzleRect
{ {
DbgPrintf("EmuXapi (0x%X): EmuXGSwizzleRect\n" DbgFuncArgs(
"(\n"
" pSource : 0x%.08X\n" " pSource : 0x%.08X\n"
" Pitch : 0x%.08X\n" " Pitch : 0x%.08X\n"
" pRect : 0x%.08X\n" " pRect : 0x%.08X\n"
@ -102,9 +90,8 @@ VOID WINAPI XTL::EmuXGSwizzleRect
" Width : 0x%.08X\n" " Width : 0x%.08X\n"
" Height : 0x%.08X\n" " Height : 0x%.08X\n"
" pPoint : 0x%.08X\n" " pPoint : 0x%.08X\n"
" BytesPerPixel : 0x%.08X\n" " BytesPerPixel : 0x%.08X\n",
");\n", pSource, Pitch, pRect, pDest, Width, Height,
GetCurrentThreadId(), pSource, Pitch, pRect, pDest, Width, Height,
pPoint, BytesPerPixel); pPoint, BytesPerPixel);
if(pRect == NULL && pPoint == NULL && Pitch == 0) if(pRect == NULL && pPoint == NULL && Pitch == 0)
@ -163,8 +150,7 @@ VOID WINAPI XTL::EmuXGSwizzleBox
{ {
DbgPrintf("EmuXapi (0x%X): EmuXGSwizzleBox\n" DbgFuncArgs(
"(\n"
" pSource : 0x%.08X\n" " pSource : 0x%.08X\n"
" RowPitch : 0x%.08X\n" " RowPitch : 0x%.08X\n"
" SlicePitch : 0x%.08X\n" " SlicePitch : 0x%.08X\n"
@ -174,9 +160,8 @@ VOID WINAPI XTL::EmuXGSwizzleBox
" Height : 0x%.08X\n" " Height : 0x%.08X\n"
" Depth : 0x%.08X\n" " Depth : 0x%.08X\n"
" pPoint : 0x%.08X\n" " pPoint : 0x%.08X\n"
" BytesPerPixel : 0x%.08X\n" " BytesPerPixel : 0x%.08X\n",
");\n", pSource, RowPitch, SlicePitch, pBox, pDest, Width, Height,
GetCurrentThreadId(), pSource, RowPitch, SlicePitch, pBox, pDest, Width, Height,
Depth, pPoint, BytesPerPixel); Depth, pPoint, BytesPerPixel);
if(pDest != (LPVOID) 0x80000000) if(pDest != (LPVOID) 0x80000000)
@ -339,13 +324,11 @@ HRESULT WINAPI XTL::EmuXGWriteSurfaceOrTextureToXPR
{ {
DbgPrintf("EmuXapi (0x%X): EmuXGWriteSurfaceOrTextureToXPR\n" DbgFuncArgs(
"(\n"
" pResource : 0x%.08X\n" " pResource : 0x%.08X\n"
" cPath : 0x%.08X\n" " cPath : 0x%.08X\n"
" bWriteSurfaceAsTexture : 0x%.08X\n" " bWriteSurfaceAsTexture : 0x%.08X\n",
");\n", pResource, cPath, bWriteSurfaceAsTexture);
GetCurrentThreadId(), pResource, cPath, bWriteSurfaceAsTexture);
// TODO: If necessary, either reverse the .xbx and .xpr file formats // TODO: If necessary, either reverse the .xbx and .xpr file formats
// and write the surface/texture to a file, or output a generic .xbx // and write the surface/texture to a file, or output a generic .xbx
@ -376,8 +359,7 @@ VOID WINAPI XTL::EmuXGSetTextureHeader
{ {
DbgPrintf("EmuXapi (0x%X): EmuXGSetTextureHeader\n" DbgFuncArgs(
"(\n"
" Width : 0x%.08X\n" " Width : 0x%.08X\n"
" Height : 0x%.08X\n" " Height : 0x%.08X\n"
" Levels : 0x%.08X\n" " Levels : 0x%.08X\n"
@ -386,9 +368,8 @@ VOID WINAPI XTL::EmuXGSetTextureHeader
" Pool : 0x%.08X\n" " Pool : 0x%.08X\n"
" pTexture : 0x%.08X\n" " pTexture : 0x%.08X\n"
" Data : 0x%.08X\n" " Data : 0x%.08X\n"
" Pitch : 0x%.08X\n" " Pitch : 0x%.08X\n",
");\n", Width, Height, Levels, Usage,
GetCurrentThreadId(), Width, Height, Levels, Usage,
Format, Pool, pTexture, Data, Pitch); Format, Pool, pTexture, Data, Pitch);
// NOTES: This function simply creates a texture that needs to be registered // NOTES: This function simply creates a texture that needs to be registered
@ -454,13 +435,11 @@ VOID WINAPI XTL::EmuXGSetTextureHeader
//{ //{
// //
// //
// DbgPrintf("EmuXapi (0x%X): EmuXFONT_OpenBitmapFontFromMemory\n" // DbgFuncArgs(
// "(\n"
// " pFontData : 0x%.08X\n" // " pFontData : 0x%.08X\n"
// " uFontDataSize : 0x%.08X\n" // " uFontDataSize : 0x%.08X\n"
// " ppFont : 0x%.08X\n" // " ppFont : 0x%.08X\n",
// ");\n", // pFontData, uFontDataSize, ppFont);
// GetCurrentThreadId(), pFontData, uFontDataSize, ppFont);
// //
// __asm int 3; // __asm int 3;
// //

View File

@ -58,12 +58,10 @@ int WINAPI XTL::EmuWSAStartup
{ {
DbgPrintf("EmuXapi (0x%X): EmuWSAStartup\n" DbgFuncArgs(
"(\n"
" wVersionRequested : 0x%.08X\n" " wVersionRequested : 0x%.08X\n"
" lpWSAData : 0x%.08X\n" " lpWSAData : 0x%.08X\n",
");\n", wVersionRequested, lpWSAData);
GetCurrentThreadId(), wVersionRequested, lpWSAData);
int ret = WSAStartup(wVersionRequested, lpWSAData); int ret = WSAStartup(wVersionRequested, lpWSAData);
@ -82,11 +80,9 @@ INT WINAPI XTL::EmuXNetStartup
{ {
DbgPrintf("EmuXapi (0x%X): EmuXNetStartup\n" DbgFuncArgs(
"(\n" " pDummy : 0x%.08X\n",
" pDummy : 0x%.08X\n" pDummy);
");\n",
GetCurrentThreadId(), pDummy);
@ -101,7 +97,7 @@ DWORD WINAPI XTL::EmuXNetGetEthernetLinkStatus()
{ {
DbgPrintf("EmuXapi (0x%X): EmuXNetGetEthernetLinkStatus();\n", GetCurrentThreadId()); DbgFuncArgs();
@ -121,14 +117,12 @@ SOCKET XTL::EmuThis::Emusocket
{ {
DbgPrintf("EmuXapi (0x%X): EmuThis::Emusocket\n" DbgFuncArgs(
"(\n"
" this : 0x%.08X\n" " this : 0x%.08X\n"
" af : 0x%.08X\n" " af : 0x%.08X\n"
" type : 0x%.08X\n" " type : 0x%.08X\n"
" protocol : 0x%.08X\n" " protocol : 0x%.08X\n",
");\n", this, af, type, protocol);
GetCurrentThreadId(), this, af, type, protocol);
SOCKET ret = socket(af, type, protocol); SOCKET ret = socket(af, type, protocol);
@ -144,14 +138,12 @@ int XTL::EmuThis::Emubind(SOCKET s, const struct sockaddr FAR *name, int namelen
{ {
DbgPrintf("EmuXapi (0x%X): EmuThis::Emubind\n" DbgFuncArgs(
"(\n"
" this : 0x%.08X\n" " this : 0x%.08X\n"
" s : 0x%.08X\n" " s : 0x%.08X\n"
" name : 0x%.08X\n" " name : 0x%.08X\n"
" namelen : 0x%.08X\n" " namelen : 0x%.08X\n",
");\n", this, s, name, namelen);
GetCurrentThreadId(), this, s, name, namelen);
// TODO: Host-To-Network order if necessary (probably not?) // TODO: Host-To-Network order if necessary (probably not?)
@ -169,13 +161,11 @@ int XTL::EmuThis::Emulisten(SOCKET s, int backlog)
{ {
DbgPrintf("EmuXapi (0x%X): EmuThis::Emulisten\n" DbgFuncArgs(
"(\n"
" this : 0x%.08X\n" " this : 0x%.08X\n"
" s : 0x%.08X\n" " s : 0x%.08X\n"
" listen : 0x%.08X\n" " listen : 0x%.08X\n",
");\n", this, s, backlog);
GetCurrentThreadId(), this, s, backlog);
// TODO: Host-To-Network order if necessary (probably not?) // TODO: Host-To-Network order if necessary (probably not?)
@ -193,14 +183,12 @@ int XTL::EmuThis::Emuioctlsocket(SOCKET s, long cmd, u_long FAR *argp)
{ {
DbgPrintf("EmuXapi (0x%X): EmuThis::Emuioctlsocket\n" DbgFuncArgs(
"(\n"
" this : 0x%.08X\n" " this : 0x%.08X\n"
" s : 0x%.08X\n" " s : 0x%.08X\n"
" cmd : 0x%.08X\n" " cmd : 0x%.08X\n"
" argp : 0x%.08X\n" " argp : 0x%.08X\n",
");\n", this, s, cmd, argp);
GetCurrentThreadId(), this, s, cmd, argp);
int ret = ioctlsocket(s, cmd, argp); int ret = ioctlsocket(s, cmd, argp);
@ -220,12 +208,10 @@ HRESULT WINAPI XOnlineLaunchNewImage
{ {
DbgPrintf("XOnline (0x%X): EmuXOnlineLaunchNewImage\n" DbgFuncArgs(
"(\n"
" lpImagePath : 0x%.08X (%s)\n" " lpImagePath : 0x%.08X (%s)\n"
" pLaunchData : 0x%.08X\n" " pLaunchData : 0x%.08X\n",
");\n", lpImagePath, lpImagePath, pLaunchData);
GetCurrentThreadId(), lpImagePath, lpImagePath, pLaunchData);
// TODO: Launch another .xbe from Cxbx someday? // TODO: Launch another .xbe from Cxbx someday?
@ -248,15 +234,13 @@ HRESULT WINAPI XTL::EmuXOnlineLogon
{ {
DbgPrintf("XOnline (0x%X): EmuXOnlineLogon\n" DbgFuncArgs(
"(\n"
" pUsers : 0x%.08X\n" " pUsers : 0x%.08X\n"
" pdwServiceIDs : 0x%.08X\n" " pdwServiceIDs : 0x%.08X\n"
" dwServices : 0x%.08X\n" " dwServices : 0x%.08X\n"
" hEvent : 0x%.08X\n" " hEvent : 0x%.08X\n"
" pHandle : 0x%.08X\n" " pHandle : 0x%.08X\n",
");\n", pUsers, pdwServiceIDs, dwServices, hEvent, pHandle);
GetCurrentThreadId(), pUsers, pdwServiceIDs, dwServices, hEvent, pHandle);
// TODO: What will it take to log on to Xbox Live? // TODO: What will it take to log on to Xbox Live?

View File

@ -70,12 +70,10 @@ HRESULT WINAPI XTL::EmuXACTEngineCreate
{ {
DbgPrintf("EmuXactEng (0x%X): EmuXACTEngineCreate\n" DbgFuncArgs(
"(\n"
" pParams : 0x%.08X\n" " pParams : 0x%.08X\n"
" ppEngine : 0x%.08X\n" " ppEngine : 0x%.08X\n",
");\n", pParams, ppEngine);
GetCurrentThreadId(), pParams, ppEngine);
// TODO: Any other form of initialization? // TODO: Any other form of initialization?
@ -93,7 +91,7 @@ void WINAPI XTL::EmuXACTEngineDoWork()
{ {
DbgPrintf("EmuXactEng (0x%X): EmuXACTEngineCreate()\n", GetCurrentThreadId() ); DbgFuncArgs();
// TODO: Anything else required here? // TODO: Anything else required here?
// AFAIK, this function just calls DirectSoundDoWork() // AFAIK, this function just calls DirectSoundDoWork()
@ -118,14 +116,12 @@ HRESULT WINAPI XTL::EmuIXACTEngine_RegisterWaveBank
{ {
DbgPrintf("EmuXactEng (0x%X): EmuIXACTEngine_RegisterWaveBank\n" DbgFuncArgs(
"(\n"
" pThis : 0x%.08X\n" " pThis : 0x%.08X\n"
" pvData : 0x%.08X\n" " pvData : 0x%.08X\n"
" dwSize : 0x%.08X\n" " dwSize : 0x%.08X\n"
" ppWaveBank : 0x%.08X\n" " ppWaveBank : 0x%.08X\n",
");\n", pThis, pvData, dwSize, ppWaveBank);
GetCurrentThreadId(), pThis, pvData, dwSize, ppWaveBank);
// TODO: Implement // TODO: Implement
@ -148,13 +144,11 @@ HRESULT WINAPI XTL::EmuIXACTEngine_RegisterStreamedWaveBank
{ {
DbgPrintf("EmuXactEng (0x%X): EmuIXACTEngine_RegisterWaveBank\n" DbgFuncArgs(
"(\n"
" pThis : 0x%.08X\n" " pThis : 0x%.08X\n"
" pParams : 0x%.08X\n" " pParams : 0x%.08X\n"
" ppWaveBank : 0x%.08X\n" " ppWaveBank : 0x%.08X\n",
");\n", pThis, pParams, ppWaveBank);
GetCurrentThreadId(), pThis, pParams, ppWaveBank);
// TODO: Implement // TODO: Implement
@ -178,14 +172,12 @@ HRESULT WINAPI XTL::EmuIXACTEngine_CreateSoundBank
{ {
DbgPrintf("EmuXactEng (0x%X): EmuIXACTEngine_CreateSoundBank\n" DbgFuncArgs(
"(\n"
" pThis : 0x%.08X\n" " pThis : 0x%.08X\n"
" pvData : 0x%.08X\n" " pvData : 0x%.08X\n"
" dwSize : 0x%.08X\n" " dwSize : 0x%.08X\n"
" ppSoundBank : 0x%.08X\n" " ppSoundBank : 0x%.08X\n",
");\n", pThis, pvData, dwSize, ppSoundBank);
GetCurrentThreadId(), pThis, pvData, dwSize, ppSoundBank);
// TODO: Implement // TODO: Implement
@ -210,15 +202,13 @@ HRESULT WINAPI XTL::EmuIXACTEngine_DownloadEffectsImage
{ {
DbgPrintf("EmuXactEng (0x%X): EmuIXACTEngine_DownloadEffectsImage\n" DbgFuncArgs(
"(\n"
" pThis : 0x%.08X\n" " pThis : 0x%.08X\n"
" pvData : 0x%.08X\n" " pvData : 0x%.08X\n"
" dwSize : 0x%.08X\n" " dwSize : 0x%.08X\n"
" pEffectLoc : 0x%.08X\n" " pEffectLoc : 0x%.08X\n"
" ppImageDesc : 0x%.08X\n" " ppImageDesc : 0x%.08X\n",
");\n", pThis, pvData, dwSize, pEffectLoc, ppImageDesc);
GetCurrentThreadId(), pThis, pvData, dwSize, pEffectLoc, ppImageDesc);
// TODO: Implement // TODO: Implement
@ -239,13 +229,11 @@ HRESULT WINAPI XTL::EmuIXACTEngine_CreateSoundSource
{ {
DbgPrintf("EmuXactEng (0x%X): EmuIXACTEngine_CreateSoundSource\n" DbgFuncArgs(
"(\n"
" pThis : 0x%.08X\n" " pThis : 0x%.08X\n"
" dwFlags : 0x%.08X\n" " dwFlags : 0x%.08X\n"
" ppSoundSource : 0x%.08X\n" " ppSoundSource : 0x%.08X\n",
");\n", pThis, dwFlags, ppSoundSource);
GetCurrentThreadId(), pThis, dwFlags, ppSoundSource);
*ppSoundSource = (X_XACTSoundSource*) CxbxMalloc( sizeof( X_XACTSoundSource ) ); *ppSoundSource = (X_XACTSoundSource*) CxbxMalloc( sizeof( X_XACTSoundSource ) );
@ -265,12 +253,10 @@ HRESULT WINAPI XTL::EmuIXACTEngine_EnableHeadphones
{ {
DbgPrintf("EmuXactEng (0x%X): EmuIXACTEngine_EnableHeadphones\n" DbgFuncArgs(
"(\n"
" pThis : 0x%.08X\n" " pThis : 0x%.08X\n"
" fEnabled : 0x%.08X\n" " fEnabled : 0x%.08X\n",
");\n", pThis, fEnabled);
GetCurrentThreadId(), pThis, fEnabled);
@ -294,8 +280,7 @@ HRESULT WINAPI XTL::EmuIXACTEngine_SetListenerOrientation
{ {
DbgPrintf("EmuXactEng (0x%X): EmuIXACTEngine_SetListenerOrientation\n" DbgFuncArgs(
"(\n"
" pThis : 0x%.08X\n" " pThis : 0x%.08X\n"
" xFront : %f" " xFront : %f"
" yFront : %f" " yFront : %f"
@ -303,9 +288,8 @@ HRESULT WINAPI XTL::EmuIXACTEngine_SetListenerOrientation
" xTop : %f" " xTop : %f"
" yTop : %f" " yTop : %f"
" zTop : %f" " zTop : %f"
" dwApply : 0x%.08X" " dwApply : 0x%.08X",
");\n", pThis, xFront, yFront, zFront, xTop, yTop, zTop, dwApply);
GetCurrentThreadId(), pThis, xFront, yFront, zFront, xTop, yTop, zTop, dwApply);
@ -326,15 +310,13 @@ HRESULT WINAPI XTL::EmuIXACTEngine_SetListenerPosition
{ {
DbgPrintf("EmuXactEng (0x%X): EmuIXACTEngine_SetListenerPosition\n" DbgFuncArgs(
"(\n"
" pThis : 0x%.08X\n" " pThis : 0x%.08X\n"
" x : %f" " x : %f"
" y : %f" " y : %f"
" z : %f" " z : %f"
" dwApply : 0x%.08X\n" " dwApply : 0x%.08X\n",
");\n", pThis, x, y, z, dwApply);
GetCurrentThreadId(), pThis, x, y, z, dwApply);
@ -355,15 +337,13 @@ HRESULT WINAPI XTL::EmuIXACTEngine_SetListenerVelocity
{ {
DbgPrintf("EmuXactEng (0x%X): EmuIXACTEngine_SetListenerVelocity\n" DbgFuncArgs(
"(\n"
" pThis : 0x%.08X\n" " pThis : 0x%.08X\n"
" x : %f" " x : %f"
" y : %f" " y : %f"
" z : %f" " z : %f"
" dwApply : 0x%.08X\n" " dwApply : 0x%.08X\n",
");\n", pThis, x, y, z, dwApply);
GetCurrentThreadId(), pThis, x, y, z, dwApply);
@ -382,13 +362,11 @@ HRESULT WINAPI XTL::EmuIXACTEngine_SetMasterVolume
{ {
DbgPrintf("EmuXactEng (0x%X): EmuIXACTEngine_SetMasterVolume\n" DbgFuncArgs(
"(\n"
" pThis : 0x%.08X\n" " pThis : 0x%.08X\n"
" wCategory : 0x%.08X\n" " wCategory : 0x%.08X\n"
" lVolume : 0x%.08X\n" " lVolume : 0x%.08X\n",
");\n", pThis, wCategory, lVolume);
GetCurrentThreadId(), pThis, wCategory, lVolume);
@ -402,11 +380,9 @@ HRESULT WINAPI XTL::EmuIXACTEngine_CommitDeferredSettings(X_XACTEngine* pThis)
{ {
DbgPrintf("EmuXactEng (0x%X): EmuIXACTEngine_CommitDeferredSettings\n" DbgFuncArgs(
"(\n" " pThis : 0x%.08X\n",
" pThis : 0x%.08X\n" pThis);
");\n",
GetCurrentThreadId(), pThis);
@ -425,13 +401,11 @@ HRESULT WINAPI XTL::EmuIXACTSoundBank_GetSoundCueIndexFromFriendlyName
{ {
DbgPrintf("EmuXactEng (0x%X): EmuIXACTSoundBank_GetSoundCueIndexFromFriendlyName\n" DbgFuncArgs(
"(\n"
" pThis : 0x%.08X\n" " pThis : 0x%.08X\n"
" pFriendlyName : (%s)\n" " pFriendlyName : (%s)\n"
" pdwSoundCueIndex : 0x%.08X\n" " pdwSoundCueIndex : 0x%.08X\n",
");\n", pThis, pFriendlyName, pdwSoundCueIndex);
GetCurrentThreadId(), pThis, pFriendlyName, pdwSoundCueIndex);
@ -452,15 +426,13 @@ HRESULT WINAPI XTL::EmuIXACTSoundBank_Play
{ {
DbgPrintf("EmuXactEng (0x%X): EmuIXACTSoundBank_Play\n" DbgFuncArgs(
"(\n"
" pThis : 0x%.08X\n" " pThis : 0x%.08X\n"
" dwSoundCueIndex : 0x%.08X\n" " dwSoundCueIndex : 0x%.08X\n"
" pSoundSource : 0x%.08X\n" " pSoundSource : 0x%.08X\n"
" dwFlags : 0x%.08X\n" " dwFlags : 0x%.08X\n"
" ppSoundCue : 0x%.08X\n" " ppSoundCue : 0x%.08X\n",
");\n", pThis, dwSoundCueIndex, pSoundSource, dwFlags, ppSoundCue);
GetCurrentThreadId(), pThis, dwSoundCueIndex, pSoundSource, dwFlags, ppSoundCue);
@ -480,14 +452,12 @@ HRESULT WINAPI XTL::EmuIXACTSoundBank_Stop
{ {
DbgPrintf("EmuXactEng (0x%X): EmuIXACTSoundBank_Stop\n" DbgFuncArgs(
"(\n"
" pThis : 0x%.08X\n" " pThis : 0x%.08X\n"
" dwSoundCueIndex : 0x%.08X\n" " dwSoundCueIndex : 0x%.08X\n"
" dwFlags : 0x%.08X\n" " dwFlags : 0x%.08X\n"
" pSoundCue : 0x%.08X\n" " pSoundCue : 0x%.08X\n",
");\n", pThis, dwSoundCueIndex, dwFlags, pSoundCue);
GetCurrentThreadId(), pThis, dwSoundCueIndex, dwFlags, pSoundCue);
@ -508,15 +478,13 @@ HRESULT WINAPI XTL::EmuIXACTSoundSource_SetPosition
{ {
DbgPrintf("EmuXactEng (0x%X): EmuIXACTSoundSource_SetPosition\n" DbgFuncArgs(
"(\n"
" pThis : 0x%.08X\n" " pThis : 0x%.08X\n"
" x : %f\n" " x : %f\n"
" y : %f\n" " y : %f\n"
" z : %f\n" " z : %f\n"
" dwApply : 0x%.08X\n" " dwApply : 0x%.08X\n",
");\n", pThis, x, y, z, dwApply);
GetCurrentThreadId(), pThis, x, y, z, dwApply);
@ -537,15 +505,13 @@ HRESULT WINAPI XTL::EmuIXACTSoundSource_SetVelocity
{ {
DbgPrintf("EmuXactEng (0x%X): EmuIXACTSoundSource_SetVelocity\n" DbgFuncArgs(
"(\n"
" pThis : 0x%.08X\n" " pThis : 0x%.08X\n"
" x : %f\n" " x : %f\n"
" y : %f\n" " y : %f\n"
" z : %f\n" " z : %f\n"
" dwApply : 0x%.08X\n" " dwApply : 0x%.08X\n",
");\n", pThis, x, y, z, dwApply);
GetCurrentThreadId(), pThis, x, y, z, dwApply);
@ -563,12 +529,10 @@ HRESULT WINAPI XTL::EmuIXACTEngine_RegisterNotification
{ {
DbgPrintf("EmuXactEng (0x%X): EmuIXACTEngine_RegisterNotification\n" DbgFuncArgs(
"(\n"
" pThis : 0x%.08X\n" " pThis : 0x%.08X\n"
" pNotificationDesc : 0x%.08X\n" " pNotificationDesc : 0x%.08X\n",
");\n", pThis, pNotificationDesc);
GetCurrentThreadId(), pThis, pNotificationDesc);
@ -587,13 +551,11 @@ HRESULT WINAPI XTL::EmuIXACTEngine_GetNotification
{ {
DbgPrintf("EmuXactEng (0x%X): EmuIXACTEngine_GetNotification\n" DbgFuncArgs(
"(\n"
" pThis : 0x%.08X\n" " pThis : 0x%.08X\n"
" pNotificationDesc : 0x%.08X\n" " pNotificationDesc : 0x%.08X\n"
" pNotification : 0x%.08X\n" " pNotification : 0x%.08X\n",
");\n", pThis, pNotificationDesc, pNotification);
GetCurrentThreadId(), pThis, pNotificationDesc, pNotification);
// TODO: The contents of XACT_NOTIFICATION can vary from one XDK to the next. // TODO: The contents of XACT_NOTIFICATION can vary from one XDK to the next.
// The definition for 4627 is different than 5558. // The definition for 4627 is different than 5558.
@ -614,12 +576,10 @@ HRESULT WINAPI XTL::EmuIXACTEngine_UnRegisterWaveBank
{ {
DbgPrintf("EmuXactEng (0x%X): EmuIXACTEngine_UnRegisterWaveBank\n" DbgFuncArgs(
"(\n"
" pThis : 0x%.08X\n" " pThis : 0x%.08X\n"
" pWaveBank : 0x%.08X\n" " pWaveBank : 0x%.08X\n",
");\n", pThis, pWaveBank);
GetCurrentThreadId(), pThis, pWaveBank);
// Even though the documentation doesn't tell us much, I'm // Even though the documentation doesn't tell us much, I'm
// assuming that after this function is called, the pointer // assuming that after this function is called, the pointer

View File

@ -84,11 +84,7 @@ XTL::LAUNCH_DATA g_SavedLaunchData;
// ****************************************************************** // ******************************************************************
BOOL WINAPI XTL::EmuXFormatUtilityDrive() BOOL WINAPI XTL::EmuXFormatUtilityDrive()
{ {
#ifdef _DEBUG_TRACE DbgFuncArgs();
DbgPrintf("EmuXapi (0x%X): EmuXFormatUtilityDrive()\n", GetCurrentThreadId());
#endif
// TODO: yeah... we'll format... riiiiight // TODO: yeah... we'll format... riiiiight
@ -105,11 +101,9 @@ DWORD WINAPI XTL::EmuGetTimeZoneInformation
{ {
DbgPrintf("EmuXapi (0x%X): EmuGetTimeZoneInformation\n" DbgFuncArgs(
"(\n" " lpTimeZoneInformation : 0x%.08X\n",
" lpTimeZoneInformation : 0x%.08X\n" lpTimeZoneInformation);
");\n",
GetCurrentThreadId(), lpTimeZoneInformation);
DWORD dwRet = GetTimeZoneInformation(lpTimeZoneInformation); DWORD dwRet = GetTimeZoneInformation(lpTimeZoneInformation);
@ -128,11 +122,9 @@ BOOL WINAPI XTL::EmuQueryPerformanceCounter
{ {
DbgPrintf("EmuXapi (0x%X): EmuQueryPerformanceCounter\n" DbgFuncArgs(
"(\n" " lpPerformanceCount : 0x%.08X\n",
" lpPerformanceCount : 0x%.08X\n" lpPerformanceCount);
");\n",
GetCurrentThreadId(), lpPerformanceCount);
BOOL bRet = QueryPerformanceCounter(lpPerformanceCount); BOOL bRet = QueryPerformanceCounter(lpPerformanceCount);
@ -154,11 +146,9 @@ BOOL WINAPI XTL::EmuQueryPerformanceFrequency
{ {
DbgPrintf("EmuXapi (0x%X): EmuQueryPerformanceFrequency\n" DbgFuncArgs(
"(\n" " lpFrequency : 0x%.08X\n",
" lpFrequency : 0x%.08X\n" lpFrequency);
");\n",
GetCurrentThreadId(), lpFrequency);
BOOL bRet = QueryPerformanceFrequency(lpFrequency); BOOL bRet = QueryPerformanceFrequency(lpFrequency);
@ -175,17 +165,9 @@ BOOL WINAPI XTL::EmuXMountUtilityDrive
BOOL fFormatClean BOOL fFormatClean
) )
{ {
#ifdef _DEBUG_TRACE DbgFuncArgs(
{ " fFormatClean : 0x%.08X\n",
fFormatClean);
DbgPrintf("EmuXapi (0x%X): EmuXMountUtilityDrive\n"
"(\n"
" fFormatClean : 0x%.08X\n"
");\n",
GetCurrentThreadId(), fFormatClean);
}
#endif
CxbxMountUtilityDrive(fFormatClean); CxbxMountUtilityDrive(fFormatClean);
@ -203,12 +185,10 @@ VOID WINAPI XTL::EmuXInitDevices
{ {
DbgPrintf("EmuXapi (0x%X): EmuXInitDevices\n" DbgFuncArgs(
"(\n"
" dwPreallocTypeCount : 0x%.08X\n" " dwPreallocTypeCount : 0x%.08X\n"
" PreallocTypes : 0x%.08X\n" " PreallocTypes : 0x%.08X\n",
");\n", dwPreallocTypeCount, PreallocTypes);
GetCurrentThreadId(), dwPreallocTypeCount, PreallocTypes);
/*for( DWORD i = 0; i < dwPreallocTypeCount; i++ ) /*for( DWORD i = 0; i < dwPreallocTypeCount; i++ )
{ {
@ -247,11 +227,9 @@ DWORD WINAPI XTL::EmuXGetDevices
{ {
DbgPrintf("EmuXapi (0x%X): EmuXGetDevices\n" DbgFuncArgs(
"(\n" " DeviceType : 0x%.08X\n",
" DeviceType : 0x%.08X\n" DeviceType);
");\n",
GetCurrentThreadId(), DeviceType);
DWORD ret = 0; DWORD ret = 0;
@ -277,13 +255,11 @@ BOOL WINAPI XTL::EmuXGetDeviceChanges
{ {
DbgPrintf("EmuXapi (0x%X): EmuXGetDeviceChanges\n" DbgFuncArgs(
"(\n"
" DeviceType : 0x%.08X\n" " DeviceType : 0x%.08X\n"
" pdwInsertions : 0x%.08X\n" " pdwInsertions : 0x%.08X\n"
" pdwRemovals : 0x%.08X\n" " pdwRemovals : 0x%.08X\n",
");\n", DeviceType, pdwInsertions, pdwRemovals);
GetCurrentThreadId(), DeviceType, pdwInsertions, pdwRemovals);
BOOL bRet = FALSE; BOOL bRet = FALSE;
static BOOL bFirst = TRUE; static BOOL bFirst = TRUE;
@ -328,14 +304,12 @@ HANDLE WINAPI XTL::EmuXInputOpen
{ {
DbgPrintf("EmuXapi (0x%X): EmuXInputOpen\n" DbgFuncArgs(
"(\n"
" DeviceType : 0x%.08X\n" " DeviceType : 0x%.08X\n"
" dwPort : 0x%.08X\n" " dwPort : 0x%.08X\n"
" dwSlot : 0x%.08X\n" " dwSlot : 0x%.08X\n"
" pPollingParameters : 0x%.08X\n" " pPollingParameters : 0x%.08X\n",
");\n", DeviceType, dwPort, dwSlot, pPollingParameters);
GetCurrentThreadId(), DeviceType, dwPort, dwSlot, pPollingParameters);
POLLING_PARAMETERS_HANDLE *pph = 0; POLLING_PARAMETERS_HANDLE *pph = 0;
@ -402,11 +376,9 @@ VOID WINAPI XTL::EmuXInputClose
{ {
DbgPrintf("EmuXapi (0x%X): EmuXInputClose\n" DbgFuncArgs(
"(\n" " hDevice : 0x%.08X\n",
" hDevice : 0x%.08X\n" hDevice);
");\n",
GetCurrentThreadId(), hDevice);
POLLING_PARAMETERS_HANDLE *pph = (POLLING_PARAMETERS_HANDLE*)hDevice; POLLING_PARAMETERS_HANDLE *pph = (POLLING_PARAMETERS_HANDLE*)hDevice;
@ -450,11 +422,9 @@ DWORD WINAPI XTL::EmuXInputPoll
{ {
DbgPrintf("EmuXapi (0x%X): EmuXInputPoll\n" DbgFuncArgs(
"(\n" " hDevice : 0x%.08X\n",
" hDevice : 0x%.08X\n" hDevice);
");\n",
GetCurrentThreadId(), hDevice);
POLLING_PARAMETERS_HANDLE *pph = (POLLING_PARAMETERS_HANDLE*)hDevice; POLLING_PARAMETERS_HANDLE *pph = (POLLING_PARAMETERS_HANDLE*)hDevice;
@ -511,12 +481,10 @@ DWORD WINAPI XTL::EmuXInputGetCapabilities
{ {
DbgPrintf("EmuXapi (0x%X): EmuXInputGetCapabilities\n" DbgFuncArgs(
"(\n"
" hDevice : 0x%.08X\n" " hDevice : 0x%.08X\n"
" pCapabilities : 0x%.08X\n" " pCapabilities : 0x%.08X\n",
");\n", hDevice, pCapabilities);
GetCurrentThreadId(), hDevice, pCapabilities);
DWORD ret = ERROR_INVALID_HANDLE; DWORD ret = ERROR_INVALID_HANDLE;
@ -552,12 +520,10 @@ DWORD WINAPI XTL::EmuXInputGetState
{ {
DbgPrintf("EmuXapi (0x%X): EmuXInputGetState\n" DbgFuncArgs(
"(\n"
" hDevice : 0x%.08X\n" " hDevice : 0x%.08X\n"
" pState : 0x%.08X\n" " pState : 0x%.08X\n",
");\n", hDevice, pState);
GetCurrentThreadId(), hDevice, pState);
DWORD ret = ERROR_INVALID_HANDLE; DWORD ret = ERROR_INVALID_HANDLE;
@ -610,12 +576,10 @@ DWORD WINAPI XTL::EmuXInputSetState
{ {
DbgPrintf("EmuXapi (0x%X): EmuXInputSetState\n" DbgFuncArgs(
"(\n"
" hDevice : 0x%.08X\n" " hDevice : 0x%.08X\n"
" pFeedback : 0x%.08X\n" " pFeedback : 0x%.08X\n",
");\n", hDevice, pFeedback);
GetCurrentThreadId(), hDevice, pFeedback);
DWORD ret = ERROR_IO_PENDING; DWORD ret = ERROR_IO_PENDING;
@ -693,12 +657,10 @@ BOOL WINAPI XTL::EmuSetThreadPriorityBoost
{ {
DbgPrintf("EmuXapi (0x%X): EmuSetThreadPriorityBoost\n" DbgFuncArgs(
"(\n"
" hThread : 0x%.08X\n" " hThread : 0x%.08X\n"
" DisablePriorityBoost: 0x%.08X\n" " DisablePriorityBoost: 0x%.08X\n",
");\n", hThread, DisablePriorityBoost);
GetCurrentThreadId(), hThread, DisablePriorityBoost);
BOOL bRet = SetThreadPriorityBoost(hThread, DisablePriorityBoost); BOOL bRet = SetThreadPriorityBoost(hThread, DisablePriorityBoost);
@ -721,12 +683,10 @@ BOOL WINAPI XTL::EmuSetThreadPriority
{ {
DbgPrintf("EmuXapi (0x%X): EmuSetThreadPriority\n" DbgFuncArgs(
"(\n"
" hThread : 0x%.08X\n" " hThread : 0x%.08X\n"
" nPriority : 0x%.08X\n" " nPriority : 0x%.08X\n",
");\n", hThread, nPriority);
GetCurrentThreadId(), hThread, nPriority);
BOOL bRet = SetThreadPriority(hThread, nPriority); BOOL bRet = SetThreadPriority(hThread, nPriority);
@ -749,11 +709,9 @@ int WINAPI XTL::EmuGetThreadPriority
{ {
DbgPrintf("EmuXapi (0x%X): EmuGetThreadPriority\n" DbgFuncArgs(
"(\n" " hThread : 0x%.08X\n",
" hThread : 0x%.08X\n" hThread);
");\n",
GetCurrentThreadId(), hThread);
int iRet = GetThreadPriority(hThread); int iRet = GetThreadPriority(hThread);
@ -776,12 +734,10 @@ BOOL WINAPI XTL::EmuGetExitCodeThread
{ {
DbgPrintf("EmuXapi (0x%X): EmuGetExitCodeThread\n" DbgFuncArgs(
"(\n"
" hThread : 0x%.08X\n" " hThread : 0x%.08X\n"
" lpExitCode : 0x%.08X\n" " lpExitCode : 0x%.08X\n",
");\n", hThread, lpExitCode);
GetCurrentThreadId(), hThread, lpExitCode);
BOOL bRet = GetExitCodeThread(hThread, lpExitCode); BOOL bRet = GetExitCodeThread(hThread, lpExitCode);
@ -801,12 +757,10 @@ VOID WINAPI XTL::EmuXapiThreadStartup
{ {
DbgPrintf("EmuXapi (0x%X): EmuXapiThreadStartup\n" DbgFuncArgs(
"(\n"
" dwDummy1 : 0x%.08X\n" " dwDummy1 : 0x%.08X\n"
" dwDummy2 : 0x%.08X\n" " dwDummy2 : 0x%.08X\n",
");\n", dwDummy1, dwDummy2);
GetCurrentThreadId(), dwDummy1, dwDummy2);
@ -842,12 +796,10 @@ VOID WINAPI XTL::EmuXRegisterThreadNotifyRoutine
{ {
DbgPrintf("EmuXapi (0x%X): EmuXRegisterThreadNotifyRoutine\n" DbgFuncArgs(
"(\n"
" pThreadNotification : 0x%.08X (0x%.08X)\n" " pThreadNotification : 0x%.08X (0x%.08X)\n"
" fRegister : 0x%.08X\n" " fRegister : 0x%.08X\n",
");\n", pThreadNotification, pThreadNotification->pfnNotifyRoutine, fRegister);
GetCurrentThreadId(), pThreadNotification, pThreadNotification->pfnNotifyRoutine, fRegister);
if(fRegister) if(fRegister)
{ {
@ -898,13 +850,11 @@ DWORD WINAPI XTL::EmuQueueUserAPC
{ {
DbgPrintf("EmuXapi (0x%X): EmuQueueUserAPC\n" DbgFuncArgs(
"(\n"
" pfnAPC : 0x%.08X\n" " pfnAPC : 0x%.08X\n"
" hThread : 0x%.08X\n" " hThread : 0x%.08X\n"
" dwData : 0x%.08X\n" " dwData : 0x%.08X\n",
");\n", pfnAPC, hThread, dwData);
GetCurrentThreadId(), pfnAPC, hThread, dwData);
DWORD dwRet = 0; DWORD dwRet = 0;
@ -937,14 +887,12 @@ BOOL WINAPI XTL::EmuGetOverlappedResult
{ {
DbgPrintf("EmuXapi (0x%X): EmuGetOverlappedResult\n" DbgFuncArgs(
"(\n"
" hFile : 0x%.08X\n" " hFile : 0x%.08X\n"
" lpOverlapped : 0x%.08X\n" " lpOverlapped : 0x%.08X\n"
" lpNumberOfBytesTransformed : 0x%.08X\n" " lpNumberOfBytesTransformed : 0x%.08X\n"
" bWait : 0x%.08X\n" " bWait : 0x%.08X\n",
");\n", hFile, lpOverlapped, lpNumberOfBytesTransferred, bWait);
GetCurrentThreadId(), hFile, lpOverlapped, lpNumberOfBytesTransferred, bWait);
BOOL bRet = GetOverlappedResult( hFile, lpOverlapped, lpNumberOfBytesTransferred, bWait ); BOOL bRet = GetOverlappedResult( hFile, lpOverlapped, lpNumberOfBytesTransferred, bWait );
@ -967,12 +915,10 @@ DWORD WINAPI XTL::EmuXLaunchNewImage
{ {
DbgPrintf("EmuXapi (0x%X): EmuXLaunchNewImage\n" DbgFuncArgs(
"(\n"
" lpTitlePath : 0x%.08X (%s)\n" " lpTitlePath : 0x%.08X (%s)\n"
" pLaunchData : 0x%.08X\n" " pLaunchData : 0x%.08X\n",
");\n", lpTitlePath, lpTitlePath, pLaunchData);
GetCurrentThreadId(), lpTitlePath, lpTitlePath, pLaunchData);
// If this function succeeds, it doesn't get a chance to return anything. // If this function succeeds, it doesn't get a chance to return anything.
DWORD dwRet = ERROR_GEN_FAILURE; DWORD dwRet = ERROR_GEN_FAILURE;
@ -1052,12 +998,10 @@ DWORD WINAPI XTL::EmuXGetLaunchInfo
{ {
DbgPrintf("EmuXapi (0x%X): EmuXGetLaunchInfo\n" DbgFuncArgs(
"(\n"
" pdwLaunchDataType : 0x%.08X\n" " pdwLaunchDataType : 0x%.08X\n"
" pLaunchData : 0x%.08X\n" " pLaunchData : 0x%.08X\n",
");\n", pdwLaunchDataType, pLaunchData);
GetCurrentThreadId(), pdwLaunchDataType, pLaunchData);
// The title was launched by turning on the Xbox console with the title disc already in the DVD drive // The title was launched by turning on the Xbox console with the title disc already in the DVD drive
DWORD dwRet = ERROR_NOT_FOUND; DWORD dwRet = ERROR_NOT_FOUND;
@ -1121,11 +1065,9 @@ VOID WINAPI XTL::EmuXSetProcessQuantumLength
{ {
DbgPrintf("EmuXapi (0x%X): EmuXSetProcessQuantumLength\n" DbgFuncArgs(
"(\n" " dwMilliseconds : 0x%.08X\n",
" dwMilliseconds : 0x%.08X\n" dwMilliseconds);
");\n",
GetCurrentThreadId(), dwMilliseconds);
// TODO: Implement? // TODO: Implement?
EmuWarning("XSetProcessQuantumLength is being ignored!"); EmuWarning("XSetProcessQuantumLength is being ignored!");
@ -1140,7 +1082,7 @@ DWORD WINAPI XTL::EmuXGetFileCacheSize()
{ {
DbgPrintf("EmuXapi (0x%X): EmuXGetFileCacheSize()\n", GetCurrentThreadId()); DbgFuncArgs();
// Return the default cache size for now. // Return the default cache size for now.
// TODO: Save the file cache size if/when set. // TODO: Save the file cache size if/when set.
@ -1164,14 +1106,12 @@ DWORD WINAPI XTL::EmuSignalObjectAndWait
{ {
DbgPrintf("EmuXapi (0x%X): EmuSignalObjectAndWait\n" DbgFuncArgs(
"(\n"
" hObjectToSignal : 0x%.08X\n" " hObjectToSignal : 0x%.08X\n"
" hObjectToWaitOn : 0x%.08X\n" " hObjectToWaitOn : 0x%.08X\n"
" dwMilliseconds : 0x%.08X\n" " dwMilliseconds : 0x%.08X\n"
" bAlertable : 0x%.08X\n" " bAlertable : 0x%.08X\n",
");\n", hObjectToSignal, hObjectToWaitOn, dwMilliseconds, bAlertable);
GetCurrentThreadId(), hObjectToSignal, hObjectToWaitOn, dwMilliseconds, bAlertable);
DWORD dwRet = SignalObjectAndWait( hObjectToSignal, hObjectToWaitOn, dwMilliseconds, bAlertable ); DWORD dwRet = SignalObjectAndWait( hObjectToSignal, hObjectToWaitOn, dwMilliseconds, bAlertable );
@ -1187,11 +1127,9 @@ BOOL WINAPI XTL::EmuPulseEvent( HANDLE hEvent )
{ {
DbgPrintf("EmuXapi (0x%X): EmuPulseEvent\n" DbgFuncArgs(
"(\n" " hEvent : 0x%.08X\n",
" hEvent : 0x%.08X\n" hEvent);
");\n",
GetCurrentThreadId(), hEvent);
// TODO: This function might be a bit too high level. If it is, // TODO: This function might be a bit too high level. If it is,
// feel free to implement NtPulseEvent in EmuKrnl.cpp // feel free to implement NtPulseEvent in EmuKrnl.cpp
@ -1217,15 +1155,13 @@ MMRESULT WINAPI XTL::EmutimeSetEvent
{ {
DbgPrintf("EmuXapi (0x%X): EmutimeSetEvent\n" DbgFuncArgs(
"(\n"
" uDelay : 0x%.08X\n" " uDelay : 0x%.08X\n"
" uResolution : 0x%.08X\n" " uResolution : 0x%.08X\n"
" fptc : 0x%.08X\n" " fptc : 0x%.08X\n"
" dwUser : 0x%.08X\n" " dwUser : 0x%.08X\n"
" fuEvent : 0x%.08X\n" " fuEvent : 0x%.08X\n",
");\n", uDelay, uResolution, fptc, dwUser, fuEvent);
GetCurrentThreadId(), uDelay, uResolution, fptc, dwUser, fuEvent);
MMRESULT Ret = timeSetEvent( uDelay, uResolution, fptc, (DWORD_PTR) dwUser, fuEvent ); MMRESULT Ret = timeSetEvent( uDelay, uResolution, fptc, (DWORD_PTR) dwUser, fuEvent );
@ -1244,11 +1180,9 @@ MMRESULT WINAPI XTL::EmutimeKillEvent
{ {
DbgPrintf("EmuXapi (0x%X): EmuReleaseSemaphore\n" DbgFuncArgs(
"(\n" " uTimerID : 0x%.08X\n",
" uTimerID : 0x%.08X\n" uTimerID);
");\n",
GetCurrentThreadId(), uTimerID);
MMRESULT Ret = timeKillEvent( uTimerID ); MMRESULT Ret = timeKillEvent( uTimerID );
@ -1270,14 +1204,12 @@ VOID WINAPI XTL::EmuRaiseException
{ {
DbgPrintf("EmuXapi (0x%X): EmuRaiseException\n" DbgFuncArgs(
"(\n"
" dwExceptionCode : 0x%.08X\n" " dwExceptionCode : 0x%.08X\n"
" dwExceptionFlags : 0x%.08X\n" " dwExceptionFlags : 0x%.08X\n"
" nNumberOfArguments: 0x%.08X\n" " nNumberOfArguments: 0x%.08X\n"
" lpArguments : 0x%.08X\n" " lpArguments : 0x%.08X\n",
");\n", dwExceptionCode, dwExceptionFlags, nNumberOfArguments, lpArguments);
GetCurrentThreadId(), dwExceptionCode, dwExceptionFlags, nNumberOfArguments, lpArguments);
// TODO: Implement or not? // TODO: Implement or not?
// RaiseException(dwExceptionCode, dwExceptionFlags, nNumberOfArguments, (*(ULONG_PTR**) &lpArguments)); // RaiseException(dwExceptionCode, dwExceptionFlags, nNumberOfArguments, (*(ULONG_PTR**) &lpArguments));
@ -1295,11 +1227,9 @@ DWORD WINAPI XTL::EmuGetFileAttributesA
{ {
DbgPrintf("EmuXapi (0x%X): EmuGetFileAttributesA\n" DbgFuncArgs(
"(\n" " lpFileName : (%s)\n",
" lpFileName : (%s)\n" lpFileName);
");\n",
GetCurrentThreadId(), lpFileName);
// Dues Ex... // Dues Ex...
@ -1338,13 +1268,11 @@ DWORD WINAPI XTL::EmuXMountMUA
{ {
DbgPrintf("EmuXapi (0x%X): EmuXMountMUA\n" DbgFuncArgs(
"(\n"
" dwPort : 0x%.08X\n" " dwPort : 0x%.08X\n"
" dwSlot : 0x%.08X\n" " dwSlot : 0x%.08X\n"
" pchDrive : 0x%.08X (%s)\n" " pchDrive : 0x%.08X (%s)\n",
");\n", dwPort, dwSlot, pchDrive, pchDrive);
GetCurrentThreadId(), dwPort, dwSlot, pchDrive, pchDrive);
// TODO: Actually allow memory card emulation? This might make transferring // TODO: Actually allow memory card emulation? This might make transferring
// game saves a bit easier if the memory card directory was configurable. =] // game saves a bit easier if the memory card directory was configurable. =]
@ -1366,13 +1294,11 @@ HANDLE WINAPI XTL::EmuCreateWaitableTimerA
{ {
DbgPrintf("EmuXapi (0x%X): EmuCreateWaitableTimerA\n" DbgFuncArgs(
"(\n"
" lpTimerAttributes : 0x%.08X\n" " lpTimerAttributes : 0x%.08X\n"
" bManualReset : 0x%.08X\n" " bManualReset : 0x%.08X\n"
" lpTimerName : 0x%.08X (%s)\n" " lpTimerName : 0x%.08X (%s)\n",
");\n", lpTimerAttributes, bManualReset, lpTimerName, lpTimerName);
GetCurrentThreadId(), lpTimerAttributes, bManualReset, lpTimerName, lpTimerName);
// For Xbox titles, this param should always be NULL. // For Xbox titles, this param should always be NULL.
if(lpTimerAttributes) if(lpTimerAttributes)
@ -1401,16 +1327,14 @@ BOOL WINAPI XTL::EmuSetWaitableTimer
DbgPrintf("EmuXapi (0x%X): EmuSetWaitableTimer\n" DbgFuncArgs(
"(\n"
" hTimer : 0x%.08X\n" " hTimer : 0x%.08X\n"
" pDueTime : 0x%.08X\n" " pDueTime : 0x%.08X\n"
" lPeriod : 0x%.08X\n" " lPeriod : 0x%.08X\n"
" pfnCompletionRoutine : 0x%.08X\n" " pfnCompletionRoutine : 0x%.08X\n"
" lpArgToCompletionRoutine : 0x%.08X\n" " lpArgToCompletionRoutine : 0x%.08X\n"
" fResume : 0x%.08X\n" " fResume : 0x%.08X\n",
");\n", hTimer, pDueTime, lPeriod, pfnCompletionRoutine,
GetCurrentThreadId(), hTimer, pDueTime, lPeriod, pfnCompletionRoutine,
lpArgToCompletionRoutine, fResume); lpArgToCompletionRoutine, fResume);
BOOL Ret = SetWaitableTimer( hTimer, pDueTime, lPeriod, pfnCompletionRoutine, BOOL Ret = SetWaitableTimer( hTimer, pDueTime, lPeriod, pfnCompletionRoutine,
@ -1435,13 +1359,11 @@ DWORD WINAPI XTL::EmuXMountAlternateTitle
{ {
DbgPrintf("EmuXapi (0x%X): EmuXMountAlternateTitle\n" DbgFuncArgs(
"(\n"
" lpRootPath : 0x%.08X (%s)\n" " lpRootPath : 0x%.08X (%s)\n"
" dwAltTitleId : 0x%.08X\n" " dwAltTitleId : 0x%.08X\n"
" pchDrive : 0x%.08X (%s)\n" " pchDrive : 0x%.08X (%s)\n",
");\n", lpRootPath, lpRootPath, dwAltTitleId, pchDrive, pchDrive);
GetCurrentThreadId(), lpRootPath, lpRootPath, dwAltTitleId, pchDrive, pchDrive);
// TODO: Anything? // TODO: Anything?
@ -1457,11 +1379,9 @@ DWORD WINAPI XTL::EmuXUnmountAlternateTitle(CHAR chDrive)
{ {
DbgPrintf("EmuXapi (0x%X): EmuXUnmountAlternativeTitle\n" DbgFuncArgs(
"(\n" " chDrive : 0x%.08X (%c)\n",
" chDrive : 0x%.08X (%c)\n" chDrive, chDrive);
");\n",
GetCurrentThreadId(), chDrive, chDrive);
@ -1475,7 +1395,7 @@ DWORD WINAPI XTL::EmuXGetDeviceEnumerationStatus()
{ {
DbgPrintf("EmuXapi (0x%X): EmuXGetDeviceEnumerationStatus()\n", GetCurrentThreadId()); DbgFuncArgs();
@ -1493,12 +1413,10 @@ DWORD WINAPI XTL::EmuXInputGetDeviceDescription
{ {
DbgPrintf("EmuXapi (0x%X): EmuXInputGetDeviceDescription\n" DbgFuncArgs(
"(\n"
" hDevice : 0x%.08X\n" " hDevice : 0x%.08X\n"
" pDescription : 0x%.08X\n" " pDescription : 0x%.08X\n",
");\n", hDevice, pDescription);
GetCurrentThreadId(), hDevice, pDescription);
// TODO: Lightgun support? // TODO: Lightgun support?
@ -1514,8 +1432,8 @@ int WINAPI XTL::EmuXAutoPowerDownResetTimer()
{ {
DbgPrintf("EmuXapi (0x%X): EmuXAutoPowerDownResetTimer()\n", DbgFuncArgs();
GetCurrentThreadId());
// Meh, that's what the 'X' is for! =] // Meh, that's what the 'X' is for! =]
@ -1537,13 +1455,11 @@ DWORD WINAPI XTL::EmuXMountMURootA
DbgPrintf("EmuXapi (0x%X): EmuXMountMURootA\n" DbgFuncArgs(
"(\n"
" dwPort : 0x%.08X\n" " dwPort : 0x%.08X\n"
" dwSlot : 0x%.08X\n" " dwSlot : 0x%.08X\n"
" pchDrive : 0x%.08X (%s)\n" " pchDrive : 0x%.08X (%s)\n",
");\n", dwPort, dwSlot, pchDrive, pchDrive);
GetCurrentThreadId(), dwPort, dwSlot, pchDrive, pchDrive);
// TODO: The params are probably wrong... // TODO: The params are probably wrong...