From dfaaadbef7aa4b22a63daf402162a7efcfb23ecd Mon Sep 17 00:00:00 2001 From: mtabachenko Date: Tue, 29 Apr 2008 20:35:05 +0000 Subject: [PATCH] Windows port: - add solution and project files for VS2008 x64; - fixed for x64 compile; - fixed for DirectX9 compile; - fixed for future new audio core (for hardware Vista audio). --- desmume/src/windows/CWindow.h | 6 +++++- desmume/src/windows/snddx.c | 16 ++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/desmume/src/windows/CWindow.h b/desmume/src/windows/CWindow.h index 398fbf0af..70be571d5 100644 --- a/desmume/src/windows/CWindow.h +++ b/desmume/src/windows/CWindow.h @@ -24,7 +24,11 @@ #define WIN32_LEAN_AND_MEAN #include -#include "../types.h" +#include "types.h" + +#ifdef _x64 + #define DWL_USER DWLP_USER +#endif extern CRITICAL_SECTION section; diff --git a/desmume/src/windows/snddx.c b/desmume/src/windows/snddx.c index f893c479c..62a1cd8b7 100755 --- a/desmume/src/windows/snddx.c +++ b/desmume/src/windows/snddx.c @@ -25,9 +25,9 @@ const char* __stdcall DXGetErrorString8A(HRESULT hr); const char* __stdcall DXGetErrorDescription8A(HRESULT hr); #define DXGetErrorDescription8 DXGetErrorDescription8A #else -#include +#include #endif -#include "../SPU.h" +#include "SPU.h" #include "snddx.h" int SNDDXInit(int buffersize); @@ -71,14 +71,14 @@ int SNDDXInit(int buffersize) if ((ret = DirectSoundCreate8(NULL, &lpDS8, NULL)) != DS_OK) { - sprintf(tempstr, "DirectSound8Create error: %s - %s", DXGetErrorString8(ret), DXGetErrorDescription8(ret)); + sprintf(tempstr, "DirectSound8Create error: %s - %s", DXGetErrorString(ret), DXGetErrorDescription(ret)); MessageBox (NULL, tempstr, "Error", MB_OK | MB_ICONINFORMATION); return -1; } if ((ret = IDirectSound8_SetCooperativeLevel(lpDS8, hwnd, DSSCL_PRIORITY)) != DS_OK) { - sprintf(tempstr, "IDirectSound8_SetCooperativeLevel error: %s - %s", DXGetErrorString8(ret), DXGetErrorDescription8(ret)); + sprintf(tempstr, "IDirectSound8_SetCooperativeLevel error: %s - %s", DXGetErrorString(ret), DXGetErrorDescription(ret)); MessageBox (NULL, tempstr, "Error", MB_OK | MB_ICONINFORMATION); return -1; } @@ -91,7 +91,7 @@ int SNDDXInit(int buffersize) if ((ret = IDirectSound8_CreateSoundBuffer(lpDS8, &dsbdesc, &lpDSB, NULL)) != DS_OK) { - sprintf(tempstr, "Error when creating primary sound buffer: %s - %s", DXGetErrorString8(ret), DXGetErrorDescription8(ret)); + sprintf(tempstr, "Error when creating primary sound buffer: %s - %s", DXGetErrorString(ret), DXGetErrorDescription(ret)); MessageBox (NULL, tempstr, "Error", MB_OK | MB_ICONINFORMATION); return -1; } @@ -108,7 +108,7 @@ int SNDDXInit(int buffersize) if ((ret = IDirectSoundBuffer8_SetFormat(lpDSB, &wfx)) != DS_OK) { - sprintf(tempstr, "IDirectSoundBuffer8_SetFormat error: %s - %s", DXGetErrorString8(ret), DXGetErrorDescription8(ret)); + sprintf(tempstr, "IDirectSoundBuffer8_SetFormat error: %s - %s", DXGetErrorString(ret), DXGetErrorDescription(ret)); MessageBox (NULL, tempstr, "Error", MB_OK | MB_ICONINFORMATION); return -1; } @@ -135,14 +135,14 @@ int SNDDXInit(int buffersize) if ((ret = IDirectSound8_CreateSoundBuffer(lpDS8, &dsbdesc, &lpDSB2, NULL)) != DS_OK) { - sprintf(tempstr, "Error when creating secondary sound buffer: %s - %s", DXGetErrorString8(ret), DXGetErrorDescription8(ret)); + sprintf(tempstr, "Error when creating secondary sound buffer: %s - %s", DXGetErrorString(ret), DXGetErrorDescription(ret)); MessageBox (NULL, tempstr, "Error", MB_OK | MB_ICONINFORMATION); return -1; } } else { - sprintf(tempstr, "Error when creating secondary sound buffer: %s - %s", DXGetErrorString8(ret), DXGetErrorDescription8(ret)); + sprintf(tempstr, "Error when creating secondary sound buffer: %s - %s", DXGetErrorString(ret), DXGetErrorDescription(ret)); MessageBox (NULL, tempstr, "Error", MB_OK | MB_ICONINFORMATION); return -1; }