Support loading polyphase resampling coeffs from User and Sys in HLE
This commit is contained in:
parent
e3b0a2c9bf
commit
a813f9e13c
|
@ -55,13 +55,30 @@ void CUCode_AX::LoadResamplingCoefficients()
|
|||
{
|
||||
m_coeffs_available = false;
|
||||
|
||||
std::string filename = File::GetUserPath(D_GCUSER_IDX) + "dsp_coef.bin";
|
||||
std::string filenames[] = {
|
||||
File::GetUserPath(D_GCUSER_IDX) + "dsp_coef.bin",
|
||||
File::GetSysDirectory() + "/GC/dsp_coef.bin"
|
||||
};
|
||||
|
||||
size_t fidx;
|
||||
std::string filename;
|
||||
for (fidx = 0; fidx < sizeof (filenames) / sizeof (filenames[0]); ++fidx)
|
||||
{
|
||||
filename = filenames[fidx];
|
||||
if (!File::Exists(filename))
|
||||
return;
|
||||
continue;
|
||||
|
||||
if (File::GetSize(filename) != 0x1000)
|
||||
continue;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (fidx >= sizeof (filenames) / sizeof (filenames[0]))
|
||||
return;
|
||||
|
||||
WARN_LOG(DSPHLE, "Loading polyphase resampling coeffs from %s", filename.c_str());
|
||||
|
||||
FILE* fp = fopen(filename.c_str(), "rb");
|
||||
fread(m_coeffs, 1, 0x1000, fp);
|
||||
fclose(fp);
|
||||
|
|
Loading…
Reference in New Issue