Skip to content

Commit

Permalink
PostProcessing: Refactor config to use separate sections
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Aug 29, 2023
1 parent 8db8baf commit b217f64
Show file tree
Hide file tree
Showing 37 changed files with 1,623 additions and 1,548 deletions.
8 changes: 4 additions & 4 deletions src/common/file_system.cpp
Expand Up @@ -743,9 +743,9 @@ s64 FileSystem::GetPathFileSize(const char* Path)
return sd.Size;
}

std::optional<std::vector<u8>> FileSystem::ReadBinaryFile(const char* filename)
std::optional<std::vector<u8>> FileSystem::ReadBinaryFile(const char* filename, Error* error)
{
ManagedCFilePtr fp = OpenManagedCFile(filename, "rb");
ManagedCFilePtr fp = OpenManagedCFile(filename, "rb", error);
if (!fp)
return std::nullopt;

Expand All @@ -767,9 +767,9 @@ std::optional<std::vector<u8>> FileSystem::ReadBinaryFile(std::FILE* fp)
return res;
}

std::optional<std::string> FileSystem::ReadFileToString(const char* filename)
std::optional<std::string> FileSystem::ReadFileToString(const char* filename, Error* error)
{
ManagedCFilePtr fp = OpenManagedCFile(filename, "rb");
ManagedCFilePtr fp = OpenManagedCFile(filename, "rb", error);
if (!fp)
return std::nullopt;

Expand Down
4 changes: 2 additions & 2 deletions src/common/file_system.h
Expand Up @@ -140,9 +140,9 @@ class POSIXLock
};
#endif

std::optional<std::vector<u8>> ReadBinaryFile(const char* filename);
std::optional<std::vector<u8>> ReadBinaryFile(const char* filename, Error* error = nullptr);
std::optional<std::vector<u8>> ReadBinaryFile(std::FILE* fp);
std::optional<std::string> ReadFileToString(const char* filename);
std::optional<std::string> ReadFileToString(const char* filename, Error* error = nullptr);
std::optional<std::string> ReadFileToString(std::FILE* fp);
bool WriteBinaryFile(const char* filename, const void* data, size_t data_length);
bool WriteStringToFile(const char* filename, const std::string_view& sv);
Expand Down
2 changes: 1 addition & 1 deletion src/core/core.vcxproj
Expand Up @@ -190,4 +190,4 @@
</ClCompile>
</ItemDefinitionGroup>
<Import Project="..\..\dep\msvc\vsprops\Targets.props" />
</Project>
</Project>
2 changes: 1 addition & 1 deletion src/core/core.vcxproj.filters
Expand Up @@ -121,4 +121,4 @@
<ClInclude Include="fullscreen_ui.h" />
<ClInclude Include="shader_cache_version.h" />
</ItemGroup>
</Project>
</Project>

0 comments on commit b217f64

Please sign in to comment.