From 8cc4b10ce099a873ffedc3fe662d01b8983d6a86 Mon Sep 17 00:00:00 2001 From: ergo720 <45463469+ergo720@users.noreply.github.com> Date: Fri, 21 May 2021 19:25:22 +0200 Subject: [PATCH] Added test case + fixed a macro redefinition warning --- src/core/hle/DSOUND/DirectSound/XFileMediaObject.cpp | 4 +++- src/core/kernel/common/ob.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/hle/DSOUND/DirectSound/XFileMediaObject.cpp b/src/core/hle/DSOUND/DirectSound/XFileMediaObject.cpp index 70e721564..e4b0bc575 100644 --- a/src/core/hle/DSOUND/DirectSound/XFileMediaObject.cpp +++ b/src/core/hle/DSOUND/DirectSound/XFileMediaObject.cpp @@ -145,6 +145,8 @@ xbox::hresult_xt WINAPI xbox::EMUPATCH(XAudioDownloadEffectsImage) */ + LOG_TEST_CASE("Loading dsp images from xbe sections is currently not yet supported"); + result = S_OK;//this line should be removed once the section loading code was implemented. } else { // load from file @@ -157,7 +159,7 @@ xbox::hresult_xt WINAPI xbox::EMUPATCH(XAudioDownloadEffectsImage) ANSI_STRING file_name; IO_STATUS_BLOCK io_status_block; RtlInitAnsiString(&file_name, pszImageName); - XB_InitializeObjectAttributes(&obj, &file_name, OBJ_CASE_INSENSITIVE, ObDosDevicesDirectory()); + XB_InitializeObjectAttributes(&obj, &file_name, obj_case_insensitive, ObDosDevicesDirectory()); ntstatus_xt NtStatusCreateFile; //LARGE_INTEGER tmp_LargeInt; //tmp_LargeInt.QuadPart= dwImageSize; diff --git a/src/core/kernel/common/ob.h b/src/core/kernel/common/ob.h index d55bf4cc7..a63a1251e 100644 --- a/src/core/kernel/common/ob.h +++ b/src/core/kernel/common/ob.h @@ -35,7 +35,7 @@ typedef struct _OBJECT_HEADER_NAME_INFO { OBJECT_STRING Name; } OBJECT_HEADER_NAME_INFO, *POBJECT_HEADER_NAME_INFO; -#define OBJ_CASE_INSENSITIVE 0x40 +inline constexpr dword_xt obj_case_insensitive = 0x40; #define ObDosDevicesDirectory() ((HANDLE)-3) #define ObWin32NamedObjectsDirectory() ((HANDLE)-4)