GSRunner: Warning fixes for clang-cl

This commit is contained in:
Stenzek 2022-12-25 18:32:05 +10:00 committed by refractionpcsx2
parent 30b1129d60
commit 6aeca2c1e3
2 changed files with 6 additions and 30 deletions

View File

@ -15,6 +15,7 @@
#include <chrono> #include <chrono>
#include <csignal> #include <csignal>
#include <cstdlib>
#include <condition_variable> #include <condition_variable>
#include <mutex> #include <mutex>
#include <thread> #include <thread>
@ -59,7 +60,6 @@
namespace GSRunner namespace GSRunner
{ {
static bool InitializeConfig(); static bool InitializeConfig();
static bool SetCriticalFolders();
static bool CreatePlatformWindow(); static bool CreatePlatformWindow();
static void DestroyPlatformWindow(); static void DestroyPlatformWindow();
@ -80,26 +80,6 @@ static std::optional<bool> s_use_window;
// Owned by the GS thread. // Owned by the GS thread.
static u32 s_dump_frame_number = 0; static u32 s_dump_frame_number = 0;
bool GSRunner::SetCriticalFolders()
{
EmuFolders::AppRoot = Path::Canonicalize(Path::GetDirectory(FileSystem::GetProgramPath()));
EmuFolders::Resources = Path::Combine(EmuFolders::AppRoot, "resources");
EmuFolders::DataRoot = EmuFolders::AppRoot;
// allow SetDataDirectory() to change settings directory (if we want to split config later on)
if (EmuFolders::Settings.empty())
EmuFolders::Settings = Path::Combine(EmuFolders::DataRoot, "inis");
// the resources directory should exist, bail out if not
if (!FileSystem::DirectoryExists(EmuFolders::Resources.c_str()))
{
Console.Error("Resources directory is missing, your installation is incomplete.");
return false;
}
return true;
}
bool GSRunner::InitializeConfig() bool GSRunner::InitializeConfig()
{ {
if (!CommonHost::InitializeCriticalFolders()) if (!CommonHost::InitializeCriticalFolders())
@ -629,24 +609,24 @@ int main(int argc, char* argv[])
if (!GSRunner::InitializeConfig()) if (!GSRunner::InitializeConfig())
{ {
Console.Error("Failed to initialize config."); Console.Error("Failed to initialize config.");
return false; return EXIT_FAILURE;
} }
VMBootParameters params; VMBootParameters params;
if (!ParseCommandLineArgs(argc, argv, params)) if (!ParseCommandLineArgs(argc, argv, params))
return false; return EXIT_FAILURE;
PerformanceMetrics::SetCPUThread(Threading::ThreadHandle::GetForCallingThread()); PerformanceMetrics::SetCPUThread(Threading::ThreadHandle::GetForCallingThread());
if (!VMManager::Internal::InitializeGlobals() || !VMManager::Internal::InitializeMemory()) if (!VMManager::Internal::InitializeGlobals() || !VMManager::Internal::InitializeMemory())
{ {
Console.Error("Failed to allocate globals/memory."); Console.Error("Failed to allocate globals/memory.");
return false; return EXIT_FAILURE;
} }
if (s_use_window.value_or(false) && !GSRunner::CreatePlatformWindow()) if (s_use_window.value_or(false) && !GSRunner::CreatePlatformWindow())
{ {
Console.Error("Failed to create window."); Console.Error("Failed to create window.");
return false; return EXIT_FAILURE;
} }
// apply new settings (e.g. pick up renderer change) // apply new settings (e.g. pick up renderer change)

View File

@ -36,7 +36,6 @@
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\xbyak;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)3rdparty\xbyak;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\freetype\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)3rdparty\freetype\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\xz\xz\src\liblzma\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)3rdparty\xz\xz\src\liblzma\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\baseclasses;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)3rdparty\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)3rdparty\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\glad\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)3rdparty\glad\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@ -74,9 +73,6 @@
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="$(SolutionDir)3rdparty\baseclasses\baseclasses.vcxproj">
<Project>{27f17499-a372-4408-8afa-4f9f4584fbd3}</Project>
</ProjectReference>
<ProjectReference Include="$(SolutionDir)3rdparty\fmt\fmt.vcxproj"> <ProjectReference Include="$(SolutionDir)3rdparty\fmt\fmt.vcxproj">
<Project>{449ad25e-424a-4714-babc-68706cdcc33b}</Project> <Project>{449ad25e-424a-4714-babc-68706cdcc33b}</Project>
</ProjectReference> </ProjectReference>