Update mxdiskstreamprovider.cpp

This commit is contained in:
Misha 2023-10-28 15:44:18 -04:00
parent f3de3db4a2
commit 054616ebf8
No known key found for this signature in database
GPG Key ID: 8441D12AEF33FED8

View File

@ -1,9 +1,9 @@
#include "mxdiskstreamprovider.h" #include "mxdiskstreamprovider.h"
#include "mxthread.h"
#include "mxomni.h" #include "mxomni.h"
#include "mxstring.h"
#include "mxstreamcontroller.h" #include "mxstreamcontroller.h"
#include "mxstring.h"
#include "mxthread.h"
DECOMP_SIZE_ASSERT(MxDiskStreamProvider, 0x60); DECOMP_SIZE_ASSERT(MxDiskStreamProvider, 0x60);
@ -57,24 +57,20 @@ MxResult MxDiskStreamProvider::SetResourceToGet(MxStreamController* p_resource)
MxDSFile* file = new MxDSFile(path.GetData(), 0); MxDSFile* file = new MxDSFile(path.GetData(), 0);
m_pFile = file; m_pFile = file;
if (file != NULL) if (file != NULL) {
{ if (file->Open(0) != 0) {
if (file->Open(0) != 0)
{
path = MxString(MxOmni::GetCD()) + p_resource->GetAtom().GetInternal() + ".si"; path = MxString(MxOmni::GetCD()) + p_resource->GetAtom().GetInternal() + ".si";
file->SetFileName(path); file->SetFileName(path);
if (file->Open(0) != 0) if (file->Open(0) != 0) {
{
return FAILURE; return FAILURE;
} }
} }
m_remainingWork = 1; m_remainingWork = 1;
MxResult success = m_busySemaphore.Init(0, 100); MxResult success = m_busySemaphore.Init(0, 100);
//m_thread.Start(); // m_thread.Start();
if (success == SUCCESS && p_resource != NULL) if (success == SUCCESS && p_resource != NULL) {
{
return SUCCESS; return SUCCESS;
} }
} }