Fix incorrect streamout buffer index in GS + refactor various code (#258)

This commit is contained in:
Herman Semenov 2022-09-17 04:45:18 +03:00 committed by GitHub
parent 4a3d02db55
commit 03f5967408
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 70 additions and 92 deletions

View file

@ -243,6 +243,7 @@ bool RPLLoader_ProcessHeaders(std::string_view moduleName, uint8* rplData, uint3
if (fileinfoSection->sectionSize < sizeof(RPLFileInfoData))
{
cemuLog_force("RPLLoader: FILEINFO section size is below expected size");
delete rplLoaderContext;
return false;
}
@ -1963,7 +1964,7 @@ void RPLLoader_AddDependency(const char* name)
if (rplLoader_currentTlsModuleIndex == 0x7FFF)
cemuLog_force("RPLLoader: Exhausted TLS module indices pool");
// convert name to path/filename if it isn't already one
if (strstr(name, "."))
if (strchr(name, '.'))
{
strcpy_s(newDependency->filepath, name);
}

View file

@ -10,7 +10,7 @@ template <typename T>
class PPCConcurrentQueue
{
public:
PPCConcurrentQueue() {}
PPCConcurrentQueue() = default;
PPCConcurrentQueue(const PPCConcurrentQueue&) = delete;
PPCConcurrentQueue& operator=(const PPCConcurrentQueue&) = delete;

View file

@ -54,9 +54,7 @@ namespace coreinit
{
}
~OSHostThread()
{
}
~OSHostThread() = default;
OSThread_t* m_thread;
Fiber m_fiber;
@ -1223,7 +1221,7 @@ namespace coreinit
{
struct DeallocatorQueueEntry
{
DeallocatorQueueEntry() {};
DeallocatorQueueEntry() = default;
DeallocatorQueueEntry(OSThread_t* thread, MEMPTR<void> stack, MEMPTR<void> deallocatorFunc) : thread(thread), stack(stack), deallocatorFunc(deallocatorFunc) {};
OSThread_t* thread{};

View file

@ -835,8 +835,11 @@ namespace H264
auto asyncTask = std::async(std::launch::async, _async_H264DECEnd, executeDoneEvent.GetPointer(), session, ctx, &results);
coreinit::OSWaitEvent(executeDoneEvent);
_ReleaseDecoderSession(session);
for (auto& itr : results)
H264DoFrameOutputCallback(ctx, itr);
if (!results.empty())
{
for (auto& itr : results)
H264DoFrameOutputCallback(ctx, itr);
}
return H264DEC_STATUS::SUCCESS;
}