mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-04-28 13:27:58 +03:00
Fix a bunch of warnings.
This commit is contained in:
parent
882f371de4
commit
24d257d421
10 changed files with 30 additions and 23 deletions
|
@ -2,9 +2,17 @@ project("UnleashedRecomp")
|
|||
set(TARGET_NAME "SWA")
|
||||
|
||||
add_compile_options(
|
||||
"/fp:strict"
|
||||
"-march=sandybridge"
|
||||
"-fno-strict-aliasing")
|
||||
/fp:strict
|
||||
-march=sandybridge
|
||||
-fno-strict-aliasing
|
||||
|
||||
-Wno-switch
|
||||
-Wno-unused-function
|
||||
-Wno-unused-variable
|
||||
-Wno-unused-but-set-variable
|
||||
-Wno-void-pointer-to-int-cast
|
||||
-Wno-int-to-void-pointer-cast
|
||||
)
|
||||
|
||||
add_compile_definitions(
|
||||
SWA_IMPL
|
||||
|
@ -127,7 +135,8 @@ target_link_libraries(UnleashedRecomp PRIVATE
|
|||
)
|
||||
|
||||
target_include_directories(UnleashedRecomp PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/api
|
||||
${SWA_THIRDPARTY_ROOT}/ddspp
|
||||
${Stb_INCLUDE_DIR}
|
||||
)
|
||||
|
|
|
@ -26,19 +26,19 @@ uint32_t g_audioFrameIndex = 0;
|
|||
|
||||
class VoiceCallback : public IXAudio2VoiceCallback
|
||||
{
|
||||
void OnVoiceProcessingPassStart(UINT32 BytesRequired) override {}
|
||||
void OnVoiceProcessingPassEnd() override {}
|
||||
STDMETHOD_(void, OnVoiceProcessingPassStart)(UINT32 BytesRequired) override {}
|
||||
STDMETHOD_(void, OnVoiceProcessingPassEnd)() override {}
|
||||
|
||||
void OnBufferStart(void* pBufferContext) override {}
|
||||
void OnBufferEnd(void* pBufferContext) override
|
||||
STDMETHOD_(void, OnBufferStart)(void* pBufferContext) override {}
|
||||
STDMETHOD_(void, OnBufferEnd)(void* pBufferContext) override
|
||||
{
|
||||
ReleaseSemaphore(g_audioSemaphore, 1, nullptr);
|
||||
}
|
||||
|
||||
void OnStreamEnd() override {}
|
||||
STDMETHOD_(void, OnStreamEnd)() override {}
|
||||
|
||||
void OnLoopEnd(void* pBufferContext) override {}
|
||||
void OnVoiceError(void* pBufferContext, HRESULT Error) override {}
|
||||
STDMETHOD_(void, OnLoopEnd)(void* pBufferContext) override {}
|
||||
STDMETHOD_(void, OnVoiceError)(void* pBufferContext, HRESULT Error) override {}
|
||||
} gVoiceCallback;
|
||||
|
||||
PPC_FUNC(DriverLoop)
|
||||
|
@ -57,7 +57,7 @@ PPC_FUNC(DriverLoop)
|
|||
WaitForSingleObject(g_audioSemaphore, INFINITE);
|
||||
|
||||
ctx.r3.u64 = g_clientCallbackParam;
|
||||
GuestCode::Run(g_clientCallback, &ctx);
|
||||
GuestCode::Run((void*)g_clientCallback, &ctx);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ void CodeCache::Init()
|
|||
if (PPCFuncMappings[i].host != nullptr)
|
||||
{
|
||||
VirtualAlloc(bucket + PPCFuncMappings[i].guest * 2, sizeof(void*), MEM_COMMIT, PAGE_READWRITE);
|
||||
*(void**)(bucket + PPCFuncMappings[i].guest * 2) = PPCFuncMappings[i].host;
|
||||
*(void**)(bucket + PPCFuncMappings[i].guest * 2) = (void*)PPCFuncMappings[i].host;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,10 +38,10 @@ void* CodeCache::Find(uint32_t guest) const
|
|||
|
||||
SWA_API PPCFunc* KeFindHostFunction(uint32_t guest)
|
||||
{
|
||||
return static_cast<PPCFunc*>(g_codeCache.Find(guest));
|
||||
return reinterpret_cast<PPCFunc*>(g_codeCache.Find(guest));
|
||||
}
|
||||
|
||||
SWA_API void KeInsertHostFunction(uint32_t guest, PPCFunc* function)
|
||||
{
|
||||
g_codeCache.Insert(guest, function);
|
||||
g_codeCache.Insert(guest, (const void*)function);
|
||||
}
|
||||
|
|
|
@ -993,7 +993,7 @@ static uint32_t CreateDevice(uint32_t a1, uint32_t a2, uint32_t a3, uint32_t a4,
|
|||
auto device = g_userHeap.AllocPhysical<GuestDevice>();
|
||||
memset(device, 0, sizeof(*device));
|
||||
|
||||
uint32_t functionOffset = 'D3D';
|
||||
uint32_t functionOffset = 0x443344; // D3D
|
||||
g_codeCache.Insert(functionOffset, reinterpret_cast<void*>(GuestFunction<SetRenderStateUnimplemented>));
|
||||
|
||||
for (size_t i = 0; i < _countof(device->setRenderStateFunctions); i++)
|
||||
|
|
|
@ -119,7 +119,6 @@ constexpr std::array<Argument, arg_count_t<Func>::value> GatherFunctionArguments
|
|||
{
|
||||
std::array<Argument, arg_count_t<Func>::value> args{};
|
||||
|
||||
int intOrdinal{};
|
||||
int floatOrdinal{};
|
||||
size_t i{};
|
||||
|
||||
|
@ -135,7 +134,6 @@ constexpr std::array<Argument, arg_count_t<Func>::value> GatherFunctionArguments
|
|||
}
|
||||
else
|
||||
{
|
||||
intOrdinal++;
|
||||
args[i] = { 0, static_cast<int>(i) }; // what the fuck
|
||||
}
|
||||
|
||||
|
|
|
@ -1336,7 +1336,7 @@ void ExTerminateThread()
|
|||
|
||||
uint32_t ExCreateThread(XLPDWORD handle, uint32_t stackSize, XLPDWORD threadId, uint32_t xApiThreadStartup, uint32_t startAddress, uint32_t startContext, uint32_t creationFlags)
|
||||
{
|
||||
printf("ExCreateThread(): %x %x %x %x %x %x %x\n", handle, stackSize, threadId, xApiThreadStartup, startAddress, startContext, creationFlags);
|
||||
printf("ExCreateThread(): %p %x %p %x %x %x %x\n", handle, stackSize, threadId, xApiThreadStartup, startAddress, startContext, creationFlags);
|
||||
DWORD hostThreadId;
|
||||
|
||||
*handle = (uint32_t)GuestThread::Start(startAddress, startContext, creationFlags, &hostThreadId);
|
||||
|
|
|
@ -29,7 +29,7 @@ SWA_API uint32_t XCreateFileA(
|
|||
nullptr);
|
||||
|
||||
GuestThread::SetLastError(GetLastError());
|
||||
printf("CreateFileA(%s, %x, %x, %x, %x, %x): %x\n", lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, handle);
|
||||
printf("CreateFileA(%s, %lx, %lx, %p, %lx, %lx): %x\n", lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, handle);
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ void* Memory::Reserve(size_t offset, size_t size)
|
|||
return Alloc(offset, size, MEM_RESERVE);
|
||||
}
|
||||
|
||||
SWA_API void* MmGetHostAddress(uint32_t ptr)
|
||||
void* MmGetHostAddress(uint32_t ptr)
|
||||
{
|
||||
return g_memory.Translate(ptr);
|
||||
}
|
||||
|
|
|
@ -25,5 +25,5 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
SWA_API void* MmGetHostAddress(uint32_t ptr);
|
||||
extern "C" void* MmGetHostAddress(uint32_t ptr);
|
||||
extern Memory g_memory;
|
||||
|
|
2
thirdparty/PowerRecomp
vendored
2
thirdparty/PowerRecomp
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 6810be731556182e939ad29f51c3e7b13d7ab491
|
||||
Subproject commit a7c970d32497b7f1624a2871fdd67435d724b1ef
|
Loading…
Add table
Add a link
Reference in a new issue