diff --git a/Core/MIPS/IR/IRCompVFPU.cpp b/Core/MIPS/IR/IRCompVFPU.cpp index 412e8484f9..f28eba53d6 100644 --- a/Core/MIPS/IR/IRCompVFPU.cpp +++ b/Core/MIPS/IR/IRCompVFPU.cpp @@ -833,6 +833,8 @@ namespace MIPSComp { ir.Write(IROp::FNeg, tempregs[i], tempregs[i]); break; case 28: // d[i] = 1.0f / expf(s[i] * (float)M_LOG2E); break; // vrexp2 + DISABLE; + break; default: INVALIDOP; } @@ -1276,7 +1278,7 @@ namespace MIPSComp { } // Otherwise, n should already be ins + 1. else if (n != ins + 1) { - DISABLE; + INVALIDOP; } u8 sregs[16], dregs[4], tregs[4]; @@ -1895,7 +1897,7 @@ namespace MIPSComp { int n = GetNumVectorElements(sz); if (n != 2 && n != 4) { // Bad instructions - DISABLE; + INVALIDOP; } u8 sregs[4], dregs[4]; diff --git a/Core/PSPLoaders.cpp b/Core/PSPLoaders.cpp index d94a102fb8..0a7fd9b16c 100644 --- a/Core/PSPLoaders.cpp +++ b/Core/PSPLoaders.cpp @@ -255,7 +255,7 @@ static std::string NormalizePath(const std::string &path) { #ifdef _WIN32 wchar_t buf[512] = {0}; std::wstring wpath = ConvertUTF8ToWString(path); - if (GetFullPathName(wpath.c_str(), sizeof(buf) - 1, buf, NULL) == 0) + if (GetFullPathName(wpath.c_str(), (int)ARRAY_SIZE(buf) - 1, buf, NULL) == 0) return ""; return ConvertWStringToUTF8(buf); #else diff --git a/headless/Headless.cpp b/headless/Headless.cpp index 264973bea7..3bc2ac03dc 100644 --- a/headless/Headless.cpp +++ b/headless/Headless.cpp @@ -9,6 +9,7 @@ #include "file/zip_read.h" #include "profiler/profiler.h" #include "Common/FileUtil.h" +#include "Common/GraphicsContext.h" #include "Core/Config.h" #include "Core/Core.h" #include "Core/CoreTiming.h" @@ -292,7 +293,7 @@ int main(int argc, const char* argv[]) host = headlessHost; std::string error_string; - GraphicsContext *graphicsContext; + GraphicsContext *graphicsContext = nullptr; bool glWorking = host->InitGraphics(&error_string, &graphicsContext); LogManager::Init(); @@ -311,6 +312,7 @@ int main(int argc, const char* argv[]) coreParameter.cpuCore = cpuCore; coreParameter.gpuCore = glWorking ? gpuCore : GPUCORE_NULL; coreParameter.graphicsContext = graphicsContext; + coreParameter.thin3d = graphicsContext ? graphicsContext->GetDrawContext() : nullptr; coreParameter.enableSound = false; coreParameter.mountIso = mountIso ? mountIso : ""; coreParameter.mountRoot = mountRoot ? mountRoot : "";