mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-21 18:22:33 +01:00
File utility improved
+ minor fixes
This commit is contained in:
parent
5029dff73a
commit
b3e3c68f15
File diff suppressed because it is too large
Load Diff
160
Utilities/File.h
160
Utilities/File.h
@ -1,15 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
enum class fsm : u32 // file seek mode
|
||||
{
|
||||
begin,
|
||||
cur,
|
||||
end,
|
||||
};
|
||||
|
||||
namespace fom // file open mode
|
||||
{
|
||||
enum : u32
|
||||
enum open_mode : u32
|
||||
{
|
||||
read = 1 << 0, // enable reading
|
||||
write = 1 << 1, // enable writing
|
||||
@ -18,19 +11,18 @@ namespace fom // file open mode
|
||||
trunc = 1 << 4, // clear opened file if it's not empty
|
||||
excl = 1 << 5, // failure if the file already exists (used with `create`)
|
||||
|
||||
rewrite = write | create | trunc, // write + create + trunc
|
||||
rewrite = write | create | trunc,
|
||||
};
|
||||
};
|
||||
|
||||
enum class fse : u32 // filesystem (file or dir) error
|
||||
{
|
||||
ok, // no error
|
||||
invalid_arguments,
|
||||
};
|
||||
|
||||
namespace fs
|
||||
{
|
||||
thread_local extern fse g_tls_error;
|
||||
enum seek_mode : u32 // file seek mode
|
||||
{
|
||||
seek_set,
|
||||
seek_cur,
|
||||
seek_end,
|
||||
};
|
||||
|
||||
struct stat_t
|
||||
{
|
||||
@ -42,6 +34,9 @@ namespace fs
|
||||
s64 ctime;
|
||||
};
|
||||
|
||||
// Get parent directory for the path (returns empty string on failure)
|
||||
std::string get_parent_dir(const std::string& path);
|
||||
|
||||
// Get file information
|
||||
bool stat(const std::string& path, stat_t& info);
|
||||
|
||||
@ -49,16 +44,16 @@ namespace fs
|
||||
bool exists(const std::string& path);
|
||||
|
||||
// Check whether the file exists and is NOT a directory
|
||||
bool is_file(const std::string& file);
|
||||
bool is_file(const std::string& path);
|
||||
|
||||
// Check whether the directory exists and is NOT a file
|
||||
bool is_dir(const std::string& dir);
|
||||
bool is_dir(const std::string& path);
|
||||
|
||||
// Delete empty directory
|
||||
bool remove_dir(const std::string& dir);
|
||||
bool remove_dir(const std::string& path);
|
||||
|
||||
// Create directory
|
||||
bool create_dir(const std::string& dir);
|
||||
bool create_dir(const std::string& path);
|
||||
|
||||
// Create directories
|
||||
bool create_path(const std::string& path);
|
||||
@ -70,10 +65,10 @@ namespace fs
|
||||
bool copy_file(const std::string& from, const std::string& to, bool overwrite);
|
||||
|
||||
// Delete file
|
||||
bool remove_file(const std::string& file);
|
||||
bool remove_file(const std::string& path);
|
||||
|
||||
// Change file size (possibly appending zeros)
|
||||
bool truncate_file(const std::string& file, u64 length);
|
||||
bool truncate_file(const std::string& path, u64 length);
|
||||
|
||||
class file final
|
||||
{
|
||||
@ -83,14 +78,15 @@ namespace fs
|
||||
|
||||
handle_type m_fd = null;
|
||||
|
||||
friend class file_ptr;
|
||||
friend class file_read_map;
|
||||
friend class file_write_map;
|
||||
|
||||
public:
|
||||
file() = default;
|
||||
|
||||
explicit file(const std::string& filename, u32 mode = fom::read)
|
||||
explicit file(const std::string& path, u32 mode = fom::read)
|
||||
{
|
||||
open(filename, mode);
|
||||
open(path, mode);
|
||||
}
|
||||
|
||||
file(file&& other)
|
||||
@ -120,7 +116,7 @@ namespace fs
|
||||
}
|
||||
|
||||
// Open specified file with specified mode
|
||||
bool open(const std::string& filename, u32 mode = fom::read);
|
||||
bool open(const std::string& path, u32 mode = fom::read);
|
||||
|
||||
// Change file size (possibly appending zero bytes)
|
||||
bool trunc(u64 size) const;
|
||||
@ -129,7 +125,7 @@ namespace fs
|
||||
bool stat(stat_t& info) const;
|
||||
|
||||
// Close the file explicitly (destructor automatically closes the file)
|
||||
bool close();
|
||||
void close();
|
||||
|
||||
// Read the data from the file and return the amount of data written in buffer
|
||||
u64 read(void* buffer, u64 count) const;
|
||||
@ -138,92 +134,102 @@ namespace fs
|
||||
u64 write(const void* buffer, u64 count) const;
|
||||
|
||||
// Move file pointer
|
||||
u64 seek(s64 offset, fsm seek_mode = fsm::begin) const;
|
||||
u64 seek(s64 offset, seek_mode whence = seek_set) const;
|
||||
|
||||
// Get file size
|
||||
u64 size() const;
|
||||
|
||||
// Write std::string
|
||||
const file& operator <<(const std::string& str) const
|
||||
// Write std::string unconditionally
|
||||
const file& write(const std::string& str) const
|
||||
{
|
||||
CHECK_ASSERTION(write(str.data(), str.size()) == str.size());
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Write POD
|
||||
// Write POD unconditionally
|
||||
template<typename T>
|
||||
std::enable_if_t<std::is_pod<T>::value && !std::is_pointer<T>::value, const file&> operator <<(const T& data) const
|
||||
std::enable_if_t<std::is_pod<T>::value && !std::is_pointer<T>::value, const file&> write(const T& data) const
|
||||
{
|
||||
CHECK_ASSERTION(write(std::addressof(data), sizeof(T)) == sizeof(T));
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Write POD std::vector
|
||||
// Write POD std::vector unconditionally
|
||||
template<typename T>
|
||||
std::enable_if_t<std::is_pod<T>::value && !std::is_pointer<T>::value, const file&> operator <<(const std::vector<T>& vec) const
|
||||
std::enable_if_t<std::is_pod<T>::value && !std::is_pointer<T>::value, const file&> write(const std::vector<T>& vec) const
|
||||
{
|
||||
CHECK_ASSERTION(write(vec.data(), vec.size() * sizeof(T)) == vec.size() * sizeof(T));
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Read std::string
|
||||
// Read std::string, size must be set by resize() method
|
||||
bool read(std::string& str) const
|
||||
{
|
||||
return read(&str[0], str.size()) == str.size();
|
||||
}
|
||||
|
||||
// Read POD
|
||||
// Read POD, sizeof(T) is used
|
||||
template<typename T>
|
||||
std::enable_if_t<std::is_pod<T>::value && !std::is_pointer<T>::value, bool> read(T& data) const
|
||||
{
|
||||
return read(&data, sizeof(T)) == sizeof(T);
|
||||
}
|
||||
|
||||
// Read POD std::vector
|
||||
// Read POD std::vector, size must be set by resize() method
|
||||
template<typename T>
|
||||
std::enable_if_t<std::is_pod<T>::value && !std::is_pointer<T>::value, bool> read(std::vector<T>& vec) const
|
||||
{
|
||||
return read(vec.data(), sizeof(T) * vec.size()) == sizeof(T) * vec.size();
|
||||
}
|
||||
|
||||
// Convert to std::string
|
||||
operator std::string() const
|
||||
// Read POD (experimental)
|
||||
template<typename T>
|
||||
std::enable_if_t<std::is_pod<T>::value && !std::is_pointer<T>::value, T> read() const
|
||||
{
|
||||
T result;
|
||||
CHECK_ASSERTION(read(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
// Read full file to std::string
|
||||
std::string to_string() const
|
||||
{
|
||||
std::string result;
|
||||
result.resize(size() - seek(0, fsm::cur));
|
||||
CHECK_ASSERTION(read(result));
|
||||
result.resize(size());
|
||||
CHECK_ASSERTION(seek(0) != -1 && read(result));
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
class file_ptr final
|
||||
// TODO
|
||||
class file_read_map final
|
||||
{
|
||||
char* m_ptr = nullptr;
|
||||
u64 m_size;
|
||||
|
||||
public:
|
||||
file_ptr() = default;
|
||||
file_read_map() = default;
|
||||
|
||||
file_ptr(file_ptr&& right)
|
||||
file_read_map(file_read_map&& right)
|
||||
: m_ptr(right.m_ptr)
|
||||
, m_size(right.m_size)
|
||||
{
|
||||
right.m_ptr = 0;
|
||||
}
|
||||
|
||||
file_ptr& operator =(file_ptr&& right)
|
||||
file_read_map& operator =(file_read_map&& right)
|
||||
{
|
||||
std::swap(m_ptr, right.m_ptr);
|
||||
std::swap(m_size, right.m_size);
|
||||
return *this;
|
||||
}
|
||||
|
||||
file_ptr(const file& f)
|
||||
file_read_map(const file& f)
|
||||
{
|
||||
reset(f);
|
||||
}
|
||||
|
||||
~file_ptr()
|
||||
~file_read_map()
|
||||
{
|
||||
reset();
|
||||
}
|
||||
@ -234,6 +240,52 @@ namespace fs
|
||||
// Close file mapping
|
||||
void reset();
|
||||
|
||||
// Get pointer
|
||||
operator const char*() const
|
||||
{
|
||||
return m_ptr;
|
||||
}
|
||||
};
|
||||
|
||||
// TODO
|
||||
class file_write_map final
|
||||
{
|
||||
char* m_ptr = nullptr;
|
||||
u64 m_size;
|
||||
|
||||
public:
|
||||
file_write_map() = default;
|
||||
|
||||
file_write_map(file_write_map&& right)
|
||||
: m_ptr(right.m_ptr)
|
||||
, m_size(right.m_size)
|
||||
{
|
||||
right.m_ptr = 0;
|
||||
}
|
||||
|
||||
file_write_map& operator =(file_write_map&& right)
|
||||
{
|
||||
std::swap(m_ptr, right.m_ptr);
|
||||
std::swap(m_size, right.m_size);
|
||||
return *this;
|
||||
}
|
||||
|
||||
file_write_map(const file& f)
|
||||
{
|
||||
reset(f);
|
||||
}
|
||||
|
||||
~file_write_map()
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
||||
// Open file mapping
|
||||
void reset(const file& f);
|
||||
|
||||
// Close file mapping
|
||||
void reset();
|
||||
|
||||
// Get pointer
|
||||
operator char*() const
|
||||
{
|
||||
@ -285,7 +337,7 @@ namespace fs
|
||||
bool open(const std::string& dirname);
|
||||
|
||||
// Close the directory explicitly (destructor automatically closes the directory)
|
||||
bool close();
|
||||
void close();
|
||||
|
||||
// Get next directory entry (UTF-8 name and file stat)
|
||||
bool read(std::string& name, stat_t& info);
|
||||
@ -318,18 +370,16 @@ namespace fs
|
||||
return;
|
||||
}
|
||||
|
||||
bool is_ok;
|
||||
|
||||
if (mode_ == mode::from_first)
|
||||
{
|
||||
is_ok = m_parent->first(m_entry.name, m_entry.info);
|
||||
m_parent->first(m_entry.name, m_entry.info);
|
||||
}
|
||||
else
|
||||
{
|
||||
is_ok = m_parent->read(m_entry.name, m_entry.info);
|
||||
m_parent->read(m_entry.name, m_entry.info);
|
||||
}
|
||||
|
||||
if (!is_ok)
|
||||
if (m_entry.name.empty())
|
||||
{
|
||||
m_parent = nullptr;
|
||||
}
|
||||
@ -364,8 +414,8 @@ namespace fs
|
||||
};
|
||||
|
||||
// Get configuration directory
|
||||
std::string get_config_dir();
|
||||
const std::string& get_config_dir();
|
||||
|
||||
// Get executable directory
|
||||
std::string get_executable_dir();
|
||||
const std::string& get_executable_dir();
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ struct FileListener : LogListener
|
||||
}
|
||||
}
|
||||
|
||||
mFile << text;
|
||||
mFile.write(text);
|
||||
}
|
||||
};
|
||||
|
||||
@ -261,25 +261,5 @@ void log_message(Log::LogType type, Log::Severity sev, const char* text)
|
||||
|
||||
void log_message(Log::LogType type, Log::Severity sev, std::string text)
|
||||
{
|
||||
if (g_log_manager)
|
||||
{
|
||||
g_log_manager->log({ type, sev, std::move(text) });
|
||||
}
|
||||
else
|
||||
{
|
||||
const auto severity =
|
||||
sev == Severity::Notice ? "Notice" :
|
||||
sev == Severity::Warning ? "Warning" :
|
||||
sev == Severity::Success ? "Success" :
|
||||
sev == Severity::Error ? "Error" : "Unknown";
|
||||
|
||||
#ifdef _WIN32
|
||||
MessageBoxA(0, text.c_str(), severity,
|
||||
sev == Severity::Notice ? MB_ICONINFORMATION :
|
||||
sev == Severity::Warning ? MB_ICONEXCLAMATION :
|
||||
sev == Severity::Error ? MB_ICONERROR : MB_ICONINFORMATION);
|
||||
#else
|
||||
std::printf("[Log:%s] %s\n", severity, text.c_str());
|
||||
#endif
|
||||
}
|
||||
g_log_manager->log({ type, sev, std::move(text) });
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <ucontext.h>
|
||||
#endif
|
||||
|
||||
void report_fatal_error(const std::string& msg)
|
||||
static void report_fatal_error(const std::string& msg)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
const auto& text = msg + "\n\nPlease report this error to the developers. Press (Ctrl+C) to copy this message.";
|
||||
@ -1148,7 +1148,7 @@ void prepare_throw_access_violation(x64_context* context, const char* cause, u32
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
const auto g_exception_handler = AddVectoredExceptionHandler(1, [](PEXCEPTION_POINTERS pExp) -> LONG
|
||||
static LONG exception_handler(PEXCEPTION_POINTERS pExp)
|
||||
{
|
||||
const u64 addr64 = pExp->ExceptionRecord->ExceptionInformation[1] - (u64)vm::base(0);
|
||||
const bool is_writing = pExp->ExceptionRecord->ExceptionInformation[0] != 0;
|
||||
@ -1161,9 +1161,9 @@ const auto g_exception_handler = AddVectoredExceptionHandler(1, [](PEXCEPTION_PO
|
||||
{
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const auto g_exception_filter = SetUnhandledExceptionFilter([](PEXCEPTION_POINTERS pExp) -> LONG
|
||||
static LONG exception_filter(PEXCEPTION_POINTERS pExp)
|
||||
{
|
||||
std::string msg = fmt::format("Unhandled Win32 exception 0x%08X.\n", pExp->ExceptionRecord->ExceptionCode);
|
||||
|
||||
@ -1191,16 +1191,36 @@ const auto g_exception_filter = SetUnhandledExceptionFilter([](PEXCEPTION_POINTE
|
||||
}
|
||||
}
|
||||
|
||||
msg += fmt::format("Instruction address: %p.\n", pExp->ContextRecord->Rip);
|
||||
msg += fmt::format("Image base: %p.", GetModuleHandle(NULL));
|
||||
|
||||
// TODO: print registers and the callstack
|
||||
|
||||
// Report fatal error
|
||||
report_fatal_error(msg);
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
});
|
||||
}
|
||||
|
||||
const bool g_exception_handler_set = []() -> bool
|
||||
{
|
||||
if (!AddVectoredExceptionHandler(1, (PVECTORED_EXCEPTION_HANDLER)exception_handler))
|
||||
{
|
||||
report_fatal_error("AddVectoredExceptionHandler() failed.");
|
||||
std::abort();
|
||||
}
|
||||
|
||||
if (!SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER)exception_filter))
|
||||
{
|
||||
report_fatal_error("SetUnhandledExceptionFilter() failed.");
|
||||
std::abort();
|
||||
}
|
||||
|
||||
return true;
|
||||
}();
|
||||
|
||||
#else
|
||||
|
||||
void signal_handler(int sig, siginfo_t* info, void* uct)
|
||||
static void signal_handler(int sig, siginfo_t* info, void* uct)
|
||||
{
|
||||
x64_context* context = (ucontext_t*)uct;
|
||||
|
||||
@ -1230,17 +1250,21 @@ void signal_handler(int sig, siginfo_t* info, void* uct)
|
||||
}
|
||||
}
|
||||
|
||||
int setup_signal_handler()
|
||||
const bool g_exception_handler_set = []() -> bool
|
||||
{
|
||||
struct sigaction sa;
|
||||
|
||||
struct ::sigaction sa;
|
||||
sa.sa_flags = SA_SIGINFO;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sa.sa_sigaction = signal_handler;
|
||||
return sigaction(SIGSEGV, &sa, NULL);
|
||||
}
|
||||
|
||||
const int g_sigaction_result = setup_signal_handler();
|
||||
if (::sigaction(SIGSEGV, &sa, NULL) == -1)
|
||||
{
|
||||
std::printf("sigaction() failed (0x%x).", errno);
|
||||
std::abort();
|
||||
}
|
||||
|
||||
return true;
|
||||
}();
|
||||
|
||||
#endif
|
||||
|
||||
@ -1253,16 +1277,6 @@ void thread_ctrl::initialize()
|
||||
{
|
||||
SetCurrentThreadDebugName(g_tls_this_thread->m_name().c_str());
|
||||
|
||||
#ifdef _WIN32
|
||||
if (!g_exception_handler || !g_exception_filter)
|
||||
#else
|
||||
if (g_sigaction_result == -1)
|
||||
#endif
|
||||
{
|
||||
report_fatal_error("Exception handler is not set correctly.");
|
||||
std::abort();
|
||||
}
|
||||
|
||||
// TODO
|
||||
g_thread_count++;
|
||||
}
|
||||
|
@ -30,14 +30,14 @@ namespace convert
|
||||
{
|
||||
static bool func(const std::string& value)
|
||||
{
|
||||
return value == "true" ? true : false;
|
||||
return value == "true" ? true : value == "false" ? false : throw std::invalid_argument(__FUNCTION__);
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct to_impl_t<std::string, char>
|
||||
struct to_impl_t<std::string, signed char>
|
||||
{
|
||||
static std::string func(char value)
|
||||
static std::string func(signed char value)
|
||||
{
|
||||
return std::to_string(value);
|
||||
}
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
#include "rPlatform.h"
|
||||
|
@ -139,12 +139,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xrc", "wxWidgets\build\msw\
|
||||
{24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "stblib", "stblib", "{9D839DFB-76E6-4F10-8EED-BA2AC7CC3FB6}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
stblib\stb_image.c = stblib\stb_image.c
|
||||
stblib\stb_image.h = stblib\stb_image.h
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ribbon", "wxWidgets\build\msw\wx_ribbon.vcxproj", "{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79}
|
||||
@ -181,8 +175,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_custom_build", "wxWidgets\
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "copy_setup_h", "rpcs3\copy_setup_h.vcxproj", "{00D36322-6188-4A66-B514-3B3F183E998D}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GSRender", "GSRender", "{1A43FD7A-C7DD-4D04-A4D6-FAA194AAD9D2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "D3D12GSRender", "rpcs3\D3D12GSRender.vcxproj", "{FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3-tests", "rpcs3-tests\rpcs3-tests.vcxproj", "{AB222E8A-00CA-4ACF-A87E-5251C16C0587}"
|
||||
|
@ -156,6 +156,7 @@ GLOB_RECURSE
|
||||
RPCS3_SRC
|
||||
"${RPCS3_SRC_DIR}/rpcs3.cpp"
|
||||
"${RPCS3_SRC_DIR}/config.cpp"
|
||||
"${RPCS3_SRC_DIR}/stb_image.cpp"
|
||||
"${RPCS3_SRC_DIR}/../Utilities/GNU.cpp"
|
||||
"${RPCS3_SRC_DIR}/Emu/*"
|
||||
"${RPCS3_SRC_DIR}/Gui/*"
|
||||
|
@ -62,7 +62,7 @@ bool pkg_install(const fs::file& pkg_f, const std::string& dir, volatile f64& pr
|
||||
const std::size_t BUF_SIZE = 8192 * 1024; // 8 MB
|
||||
|
||||
// Save current file offset (probably zero)
|
||||
const u64 start_offset = pkg_f.seek(0, fsm::cur);
|
||||
const u64 start_offset = pkg_f.seek(0, fs::seek_cur);
|
||||
|
||||
// Get basic PKG information
|
||||
PKGHeader header;
|
||||
|
@ -1330,6 +1330,8 @@ bool CheckDebugSelf(const std::string& self, const std::string& elf)
|
||||
|
||||
bool DecryptSelf(const std::string& elf, const std::string& self)
|
||||
{
|
||||
LOG_NOTICE(GENERAL, "Decrypting %s", self);
|
||||
|
||||
// Check for a debug SELF first.
|
||||
if (!CheckDebugSelf(self, elf))
|
||||
{
|
||||
|
@ -61,66 +61,7 @@
|
||||
<Import Project="..\rpcs3_llvm.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - MemLeak|x64'">
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - MemLeak|x64'">
|
||||
<Lib>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Lib>
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">
|
||||
<Lib>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
<AdditionalDependencies />
|
||||
<AdditionalLibraryDirectories />
|
||||
</Lib>
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Lib>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Lib>
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Lib>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Lib>
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">
|
||||
<Lib>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
<AdditionalDependencies />
|
||||
<AdditionalLibraryDirectories />
|
||||
</Lib>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
|
@ -1,24 +1,10 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "AudioManager.h"
|
||||
#include "Emu/state.h"
|
||||
|
||||
AudioManager::AudioManager() : m_audio_out(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
AudioManager::~AudioManager()
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
void AudioManager::Init()
|
||||
{
|
||||
if (m_audio_out) return;
|
||||
|
||||
m_audio_info.Init();
|
||||
|
||||
m_audio_out = Emu.GetCallbacks().get_audio();
|
||||
if (!m_audio_out) m_audio_out = Emu.GetCallbacks().get_audio();
|
||||
}
|
||||
|
||||
void AudioManager::Close()
|
||||
|
@ -2,29 +2,13 @@
|
||||
|
||||
#include "AudioThread.h"
|
||||
|
||||
// it cannot be configured currently, and it must NOT use cellSysutil definitions
|
||||
struct AudioInfo
|
||||
{
|
||||
AudioInfo()
|
||||
{
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class AudioManager
|
||||
{
|
||||
AudioInfo m_audio_info;
|
||||
std::shared_ptr<AudioThread> m_audio_out;
|
||||
public:
|
||||
AudioManager();
|
||||
~AudioManager();
|
||||
|
||||
public:
|
||||
void Init();
|
||||
void Close();
|
||||
|
||||
AudioThread& GetAudioOut() { assert(m_audio_out); return *m_audio_out; }
|
||||
AudioInfo& GetInfo() { return m_audio_info; }
|
||||
AudioThread& GetAudioOut() { return *m_audio_out; }
|
||||
};
|
||||
|
@ -3,9 +3,11 @@
|
||||
|
||||
#include "Emu/Audio/AudioThread.h"
|
||||
|
||||
#pragma push_macro("_WIN32_WINNT")
|
||||
#undef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0601 // This is to be sure that correct (2.7) header is included
|
||||
#include "minidx9/Include/XAudio2.h" // XAudio2 2.8 available only on Win8+, used XAudio2 2.7 from dxsdk
|
||||
#undef _WIN32_WINNT
|
||||
#pragma pop_macro("_WIN32_WINNT")
|
||||
|
||||
class XAudio2Thread : public AudioThread
|
||||
{
|
||||
|
@ -1017,6 +1017,8 @@ enum : u32
|
||||
{
|
||||
MFF_FORCED_HLE = (1 << 0), // always call HLE function
|
||||
MFF_NO_RETURN = (1 << 1), // uses EIF_USE_BRANCH flag with LLE, ignored with MFF_FORCED_HLE
|
||||
|
||||
MFF_PERFECT = /* 0 */ MFF_FORCED_HLE, // can be set for fully implemented functions with LLE compatibility
|
||||
};
|
||||
|
||||
// flags passed with index
|
||||
@ -1026,5 +1028,5 @@ enum : u32
|
||||
EIF_PERFORM_BLR = (1 << 24), // do BLR after calling HLE/LLE function
|
||||
EIF_USE_BRANCH = (1 << 23), // do only branch, LLE must be set, last_syscall must be zero
|
||||
|
||||
EIF_FLAGS = 0x3800000, // all flags
|
||||
EIF_FLAGS = 0x3800000, // all flags
|
||||
};
|
||||
|
@ -31,7 +31,7 @@ spu_recompiler::spu_recompiler()
|
||||
|
||||
LOG_SUCCESS(SPU, "SPU Recompiler (ASMJIT) created...");
|
||||
|
||||
fs::file(fs::get_config_dir() + "SPUJIT.log", fom::rewrite) << fmt::format("SPU JIT initialization...\n\nTitle: %s\nTitle ID: %s\n\n", Emu.GetTitle().c_str(), Emu.GetTitleID().c_str());
|
||||
fs::file(fs::get_config_dir() + "SPUJIT.log", fom::rewrite).write(fmt::format("SPU JIT initialization...\n\nTitle: %s\nTitle ID: %s\n\n", Emu.GetTitle().c_str(), Emu.GetTitleID().c_str()));
|
||||
}
|
||||
|
||||
void spu_recompiler::compile(spu_function_t& f)
|
||||
@ -216,7 +216,7 @@ void spu_recompiler::compile(spu_function_t& f)
|
||||
log += "\n\n\n";
|
||||
|
||||
// Append log file
|
||||
fs::file(fs::get_config_dir() + "SPUJIT.log", fom::write | fom::append) << log;
|
||||
fs::file(fs::get_config_dir() + "SPUJIT.log", fom::write | fom::append).write(log);
|
||||
}
|
||||
|
||||
spu_recompiler::XmmLink spu_recompiler::XmmAlloc() // get empty xmm register
|
||||
|
@ -26,11 +26,9 @@ bool vfsFile::Open(const std::string& path, u32 mode)
|
||||
return m_stream && m_stream->IsOpened();
|
||||
}
|
||||
|
||||
bool vfsFile::Close()
|
||||
void vfsFile::Close()
|
||||
{
|
||||
m_stream.reset();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
u64 vfsFile::GetSize() const
|
||||
@ -48,9 +46,9 @@ u64 vfsFile::Read(void* dst, u64 size)
|
||||
return m_stream->Read(dst, size);
|
||||
}
|
||||
|
||||
u64 vfsFile::Seek(s64 offset, fsm mode)
|
||||
u64 vfsFile::Seek(s64 offset, fs::seek_mode whence)
|
||||
{
|
||||
return m_stream->Seek(offset, mode);
|
||||
return m_stream->Seek(offset, whence);
|
||||
}
|
||||
|
||||
u64 vfsFile::Tell() const
|
||||
|
@ -12,14 +12,14 @@ public:
|
||||
vfsFile(const std::string& path, u32 mode = fom::read);
|
||||
|
||||
virtual bool Open(const std::string& path, u32 mode = fom::read) override;
|
||||
virtual bool Close() override;
|
||||
virtual void Close() override;
|
||||
|
||||
virtual u64 GetSize() const override;
|
||||
|
||||
virtual u64 Write(const void* src, u64 size) override;
|
||||
virtual u64 Read(void* dst, u64 size) override;
|
||||
|
||||
virtual u64 Seek(s64 offset, fsm seek_mode = fsm::begin) override;
|
||||
virtual u64 Seek(s64 offset, fs::seek_mode whence = fs::seek_set) override;
|
||||
virtual u64 Tell() const override;
|
||||
|
||||
virtual bool IsOpened() const override;
|
||||
|
@ -20,11 +20,10 @@ bool vfsFileBase::Open(const std::string& path, u32 mode)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool vfsFileBase::Close()
|
||||
void vfsFileBase::Close()
|
||||
{
|
||||
m_path = "";
|
||||
|
||||
return vfsStream::Close();
|
||||
vfsStream::Close();
|
||||
}
|
||||
|
||||
std::string vfsFileBase::GetPath() const
|
||||
|
@ -16,7 +16,7 @@ public:
|
||||
virtual ~vfsFileBase() override;
|
||||
|
||||
virtual bool Open(const std::string& path, u32 mode);
|
||||
virtual bool Close() override;
|
||||
virtual void Close() override;
|
||||
virtual bool IsOpened() const override { return !m_path.empty(); }
|
||||
|
||||
std::string GetPath() const;
|
||||
|
@ -20,7 +20,7 @@ bool vfsLocalDir::Open(const std::string& path)
|
||||
std::string name;
|
||||
fs::stat_t file_info;
|
||||
|
||||
while (m_dir.read(name, file_info))
|
||||
while (m_dir.read(name, file_info) && name.size())
|
||||
{
|
||||
m_entries.emplace_back();
|
||||
|
||||
|
@ -12,9 +12,10 @@ bool vfsLocalFile::Open(const std::string& path, u32 mode)
|
||||
return m_file.open(path, mode) && vfsFileBase::Open(path, mode);
|
||||
}
|
||||
|
||||
bool vfsLocalFile::Close()
|
||||
void vfsLocalFile::Close()
|
||||
{
|
||||
return m_file.close() && vfsFileBase::Close();
|
||||
m_file.close();
|
||||
vfsFileBase::Close();
|
||||
}
|
||||
|
||||
u64 vfsLocalFile::GetSize() const
|
||||
@ -32,14 +33,14 @@ u64 vfsLocalFile::Read(void* dst, u64 size)
|
||||
return m_file.read(dst, size);
|
||||
}
|
||||
|
||||
u64 vfsLocalFile::Seek(s64 offset, fsm mode)
|
||||
u64 vfsLocalFile::Seek(s64 offset, fs::seek_mode whence)
|
||||
{
|
||||
return m_file.seek(offset, mode);
|
||||
return m_file.seek(offset, whence);
|
||||
}
|
||||
|
||||
u64 vfsLocalFile::Tell() const
|
||||
{
|
||||
return m_file.seek(0, fsm::cur);
|
||||
return m_file.seek(0, fs::seek_cur);
|
||||
}
|
||||
|
||||
bool vfsLocalFile::IsOpened() const
|
||||
|
@ -11,14 +11,14 @@ public:
|
||||
vfsLocalFile(vfsDevice* device);
|
||||
|
||||
virtual bool Open(const std::string& path, u32 mode = fom::read) override;
|
||||
virtual bool Close() override;
|
||||
virtual void Close() override;
|
||||
|
||||
virtual u64 GetSize() const override;
|
||||
|
||||
virtual u64 Write(const void* src, u64 size) override;
|
||||
virtual u64 Read(void* dst, u64 size) override;
|
||||
|
||||
virtual u64 Seek(s64 offset, fsm seek_mode = fsm::begin) override;
|
||||
virtual u64 Seek(s64 offset, fs::seek_mode whence = fs::seek_set) override;
|
||||
virtual u64 Tell() const override;
|
||||
|
||||
virtual bool IsOpened() const override;
|
||||
|
@ -9,9 +9,8 @@ struct vfsStream
|
||||
Close();
|
||||
}
|
||||
|
||||
virtual bool Close()
|
||||
virtual void Close()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual u64 GetSize() const = 0;
|
||||
@ -30,7 +29,7 @@ struct vfsStream
|
||||
return Read(&data, count) == count;
|
||||
}
|
||||
|
||||
virtual u64 Seek(s64 offset, fsm seek_mode = fsm::begin) = 0;
|
||||
virtual u64 Seek(s64 offset, fs::seek_mode whence = fs::seek_set) = 0;
|
||||
|
||||
virtual u64 Tell() const = 0;
|
||||
|
||||
|
@ -31,16 +31,16 @@ public:
|
||||
|
||||
virtual u64 Read(void* dst, u64 count) override;
|
||||
|
||||
virtual u64 Seek(s64 offset, fsm seek_mode = fsm::begin) override
|
||||
virtual u64 Seek(s64 offset, fs::seek_mode whence) override
|
||||
{
|
||||
switch (seek_mode)
|
||||
switch (whence)
|
||||
{
|
||||
case fsm::begin: return m_pos = offset;
|
||||
case fsm::cur: return m_pos += offset;
|
||||
case fsm::end: return m_pos = m_size + offset;
|
||||
case fs::seek_set: return m_pos = offset;
|
||||
case fs::seek_cur: return m_pos += offset;
|
||||
case fs::seek_end: return m_pos = m_size + offset;
|
||||
}
|
||||
|
||||
throw EXCEPTION("Unknown seek_mode (0x%x)", seek_mode);
|
||||
throw EXCEPTION("Unknown seek_mode (0x%x)", whence);
|
||||
}
|
||||
|
||||
virtual u64 Tell() const override
|
||||
|
@ -787,16 +787,16 @@ u64 vfsHDD::Read(void* dst, u64 size)
|
||||
return m_file.Read(dst, size); // ???
|
||||
}
|
||||
|
||||
u64 vfsHDD::Seek(s64 offset, fsm seek_mode)
|
||||
u64 vfsHDD::Seek(s64 offset, fs::seek_mode whence)
|
||||
{
|
||||
switch (seek_mode)
|
||||
switch (whence)
|
||||
{
|
||||
case fsm::begin: return m_file.Seek(offset);
|
||||
case fsm::cur: return m_file.Seek(Tell() + offset);
|
||||
case fsm::end: return m_file.Seek(m_file.GetSize() + offset);
|
||||
case fs::seek_set: return m_file.Seek(offset);
|
||||
case fs::seek_cur: return m_file.Seek(Tell() + offset);
|
||||
case fs::seek_end: return m_file.Seek(m_file.GetSize() + offset);
|
||||
}
|
||||
|
||||
throw EXCEPTION("Unknown seek_mode(0x%x)", seek_mode);
|
||||
throw EXCEPTION("Unknown whence (0x%x)", whence);
|
||||
}
|
||||
|
||||
u64 vfsHDD::Tell() const
|
||||
@ -817,4 +817,4 @@ bool vfsHDD::IsOpened() const
|
||||
u64 vfsHDD::GetSize() const
|
||||
{
|
||||
return m_file.GetSize();
|
||||
}
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ public:
|
||||
|
||||
virtual u64 Read(void* dst, u64 count) override;
|
||||
|
||||
virtual u64 Seek(s64 offset, fsm seek_mode = fsm::begin) override;
|
||||
virtual u64 Seek(s64 offset, fs::seek_mode whence = fs::seek_set) override;
|
||||
|
||||
virtual u64 Tell() const override;
|
||||
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* OS X uses MAP_ANON instead of MAP_ANONYMOUS */
|
||||
#ifndef MAP_ANONYMOUS
|
||||
@ -239,13 +238,10 @@ namespace vm
|
||||
catch (...)
|
||||
{
|
||||
// capture any exception possibly thrown by predicate
|
||||
pred = [exception = std::current_exception()]
|
||||
pred = [exception = std::current_exception()]() -> bool
|
||||
{
|
||||
// new predicate will throw the captured exception from the original thread
|
||||
std::rethrow_exception(exception);
|
||||
|
||||
// dummy return value, remove when std::rethrow_exception gains [[noreturn]] attribute in MSVC
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -166,7 +166,7 @@ struct D3D12Traits
|
||||
}
|
||||
}
|
||||
|
||||
fs::file(fs::get_config_dir() + "FragmentProgram" + std::to_string(ID) + ".hlsl", fom::rewrite) << shader;
|
||||
fs::file(fs::get_config_dir() + "FragmentProgram" + std::to_string(ID) + ".hlsl", fom::rewrite).write(shader);
|
||||
fragmentProgramData.id = (u32)ID;
|
||||
}
|
||||
|
||||
@ -177,7 +177,7 @@ struct D3D12Traits
|
||||
std::string shaderCode = VS.Decompile();
|
||||
vertexProgramData.Compile(shaderCode, Shader::SHADER_TYPE::SHADER_TYPE_VERTEX);
|
||||
vertexProgramData.vertex_shader_inputs = VS.input_slots;
|
||||
fs::file(fs::get_config_dir() + "VertexProgram" + std::to_string(ID) + ".hlsl", fom::rewrite) << shaderCode;
|
||||
fs::file(fs::get_config_dir() + "VertexProgram" + std::to_string(ID) + ".hlsl", fom::rewrite).write(shaderCode);
|
||||
vertexProgramData.id = (u32)ID;
|
||||
}
|
||||
|
||||
|
@ -979,7 +979,7 @@ namespace rsx
|
||||
template<typename AT, typename ...T>
|
||||
static size_t make_command(vm::ps3::ptr<u32, AT> &dst, u32 start_register, T... values)
|
||||
{
|
||||
for (u32 command : { (start_register << 2) | u32(sizeof...(values) << 18), u32(values)... })
|
||||
for (u32 command : { (start_register << 2) | u32(sizeof...(values) << 18), static_cast<u32>(values)... })
|
||||
{
|
||||
*dst++ = command;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ struct GLTraits
|
||||
fragmentProgramData.Compile();
|
||||
//checkForGlError("m_fragment_prog.Compile");
|
||||
|
||||
fs::file(fs::get_config_dir() + "FragmentProgram.txt", fom::rewrite) << fragmentProgramData.shader;
|
||||
fs::file(fs::get_config_dir() + "FragmentProgram.txt", fom::rewrite).write(fragmentProgramData.shader);
|
||||
}
|
||||
|
||||
static
|
||||
@ -27,7 +27,7 @@ struct GLTraits
|
||||
vertexProgramData.Compile();
|
||||
//checkForGlError("m_vertex_prog.Compile");
|
||||
|
||||
fs::file(fs::get_config_dir() + "VertexProgram.txt", fom::rewrite) << vertexProgramData.shader;
|
||||
fs::file(fs::get_config_dir() + "VertexProgram.txt", fom::rewrite).write(vertexProgramData.shader);
|
||||
}
|
||||
|
||||
static
|
||||
|
@ -53,14 +53,14 @@ namespace rsx
|
||||
if (fmt::match(entry.name, "*.fs." + lang_name))
|
||||
{
|
||||
fs::file file{ path + entry.name };
|
||||
decompiled_fragment_shaders.insert(hash, { (const std::string)file });
|
||||
decompiled_fragment_shaders.insert(hash, { file.to_string() });
|
||||
continue;
|
||||
}
|
||||
|
||||
if (fmt::match(entry.name, "*.vs." + lang_name))
|
||||
{
|
||||
fs::file file{ path + entry.name };
|
||||
decompiled_vertex_shaders.insert(hash, { (const std::string)file });
|
||||
decompiled_vertex_shaders.insert(hash, { file.to_string() });
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -1058,24 +1058,24 @@ Module<> cellFs("cellFs", []()
|
||||
REG_FUNC(cellFs, cellFsOpen);
|
||||
REG_FUNC(cellFs, cellFsSdataOpen);
|
||||
REG_FUNC(cellFs, cellFsSdataOpenByFd);
|
||||
REG_FUNC(cellFs, cellFsRead);
|
||||
REG_FUNC(cellFs, cellFsWrite);
|
||||
REG_FUNC(cellFs, cellFsClose);
|
||||
REG_FUNC(cellFs, cellFsRead, MFF_PERFECT);
|
||||
REG_FUNC(cellFs, cellFsWrite, MFF_PERFECT);
|
||||
REG_FUNC(cellFs, cellFsClose, MFF_PERFECT);
|
||||
REG_FUNC(cellFs, cellFsOpendir);
|
||||
REG_FUNC(cellFs, cellFsReaddir);
|
||||
REG_FUNC(cellFs, cellFsClosedir);
|
||||
REG_FUNC(cellFs, cellFsReaddir, MFF_PERFECT);
|
||||
REG_FUNC(cellFs, cellFsClosedir, MFF_PERFECT);
|
||||
REG_FUNC(cellFs, cellFsStat);
|
||||
REG_FUNC(cellFs, cellFsFstat);
|
||||
REG_FUNC(cellFs, cellFsFstat, MFF_PERFECT);
|
||||
REG_FUNC(cellFs, cellFsMkdir);
|
||||
REG_FUNC(cellFs, cellFsRename);
|
||||
REG_FUNC(cellFs, cellFsChmod);
|
||||
REG_FUNC(cellFs, cellFsFsync);
|
||||
REG_FUNC(cellFs, cellFsRmdir);
|
||||
REG_FUNC(cellFs, cellFsUnlink);
|
||||
REG_FUNC(cellFs, cellFsLseek);
|
||||
REG_FUNC(cellFs, cellFsFtruncate);
|
||||
REG_FUNC(cellFs, cellFsLseek, MFF_PERFECT);
|
||||
REG_FUNC(cellFs, cellFsFtruncate, MFF_PERFECT);
|
||||
REG_FUNC(cellFs, cellFsTruncate);
|
||||
REG_FUNC(cellFs, cellFsFGetBlockSize);
|
||||
REG_FUNC(cellFs, cellFsFGetBlockSize, MFF_PERFECT);
|
||||
REG_FUNC(cellFs, cellFsAioInit);
|
||||
REG_FUNC(cellFs, cellFsAioFinish);
|
||||
REG_FUNC(cellFs, cellFsAioRead);
|
||||
|
@ -7,7 +7,6 @@
|
||||
extern "C"
|
||||
{
|
||||
#include "stblib/stb_image.h"
|
||||
#include "stblib/stb_image.c"
|
||||
}
|
||||
|
||||
#include "Emu/FS/VFS.h"
|
||||
|
@ -593,7 +593,7 @@ never_inline s32 savedata_op(PPUThread& ppu, u32 operation, u32 version, vm::cpt
|
||||
fs::file file(local_path, fom::write | fom::create);
|
||||
file.seek(fileSet->fileOffset);
|
||||
fileGet->excSize = static_cast<u32>(file.write(fileSet->fileBuf.get_ptr(), std::min<u32>(fileSet->fileSize, fileSet->fileBufSize)));
|
||||
file.trunc(file.seek(0, fsm::cur)); // truncate
|
||||
file.trunc(file.seek(0, fs::seek_cur)); // truncate
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,8 @@
|
||||
#include "sys_net.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#undef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0601
|
||||
#include <winsock2.h>
|
||||
#include <WS2tcpip.h>
|
||||
#else
|
||||
|
@ -430,7 +430,7 @@ s32 sys_fs_lseek(u32 fd, s64 offset, s32 whence, vm::ptr<u64> pos)
|
||||
|
||||
std::lock_guard<std::mutex> lock(file->mutex);
|
||||
|
||||
*pos = file->file->Seek(offset, (fsm)whence);
|
||||
*pos = file->file->Seek(offset, (fs::seek_mode)whence);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -122,36 +122,31 @@ void Emulator::CreateConfig(const std::string& name)
|
||||
|
||||
bool Emulator::BootGame(const std::string& path, bool direct)
|
||||
{
|
||||
static const char* elf_path[6] =
|
||||
static const char* boot_list[] =
|
||||
{
|
||||
"/PS3_GAME/USRDIR/BOOT.BIN",
|
||||
"/USRDIR/BOOT.BIN",
|
||||
"/BOOT.BIN",
|
||||
"/PS3_GAME/USRDIR/EBOOT.BIN",
|
||||
"/USRDIR/EBOOT.BIN",
|
||||
"/EBOOT.BIN"
|
||||
"/EBOOT.BIN",
|
||||
};
|
||||
|
||||
auto curpath = path;
|
||||
|
||||
if (direct)
|
||||
if (direct && fs::is_file(path))
|
||||
{
|
||||
if (fs::is_file(curpath))
|
||||
{
|
||||
SetPath(curpath);
|
||||
Load();
|
||||
SetPath(path);
|
||||
Load();
|
||||
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
for (int i = 0; i < sizeof(elf_path) / sizeof(*elf_path); i++)
|
||||
for (std::string elf : boot_list)
|
||||
{
|
||||
curpath = path + elf_path[i];
|
||||
|
||||
if (fs::is_file(curpath))
|
||||
elf = path + elf;
|
||||
|
||||
if (fs::is_file(elf))
|
||||
{
|
||||
SetPath(curpath);
|
||||
SetPath(elf);
|
||||
Load();
|
||||
|
||||
return true;
|
||||
@ -171,36 +166,28 @@ void Emulator::Load()
|
||||
return;
|
||||
}
|
||||
|
||||
const std::string elf_dir = m_path.substr(0, m_path.find_last_of("/\\", std::string::npos, 2) + 1);
|
||||
const std::string& elf_dir = fs::get_parent_dir(m_path);
|
||||
|
||||
if (IsSelf(m_path))
|
||||
{
|
||||
const std::string full_name = m_path.substr(elf_dir.length());
|
||||
const std::size_t elf_ext_pos = m_path.find_last_of('.');
|
||||
const std::string& elf_ext = fmt::toupper(m_path.substr(elf_ext_pos != -1 ? elf_ext_pos : m_path.size()));
|
||||
const std::string& elf_name = m_path.substr(elf_dir.size());
|
||||
|
||||
const std::string base_name = full_name.substr(0, full_name.find_last_of('.', std::string::npos));
|
||||
|
||||
const std::string ext = full_name.substr(base_name.length());
|
||||
|
||||
if (fmt::toupper(full_name) == "EBOOT.BIN")
|
||||
if (elf_name.compare(elf_name.find_last_of("/\\", -1, 2) + 1, 9, "EBOOT.BIN", 9) == 0)
|
||||
{
|
||||
m_path = elf_dir + "BOOT.BIN";
|
||||
m_path.erase(m_path.size() - 9, 1); // change EBOOT.BIN to BOOT.BIN
|
||||
}
|
||||
else if (fmt::toupper(ext) == ".SELF")
|
||||
else if (elf_ext == ".SELF" || elf_ext == ".SPRX")
|
||||
{
|
||||
m_path = elf_dir + base_name + ".elf";
|
||||
}
|
||||
else if (fmt::toupper(ext) == ".SPRX")
|
||||
{
|
||||
m_path = elf_dir + base_name + ".prx";
|
||||
m_path.erase(m_path.size() - 4, 1); // change *.self to *.elf, *.sprx to *.prx
|
||||
}
|
||||
else
|
||||
{
|
||||
m_path = elf_dir + base_name + ".decrypted" + ext;
|
||||
m_path += ".decrypted.elf";
|
||||
}
|
||||
|
||||
LOG_NOTICE(LOADER, "Decrypting '%s%s'...", elf_dir, full_name);
|
||||
|
||||
if (!DecryptSelf(m_path, elf_dir + full_name))
|
||||
if (!DecryptSelf(m_path, elf_dir + elf_name))
|
||||
{
|
||||
m_status = Stopped;
|
||||
return;
|
||||
@ -223,7 +210,7 @@ void Emulator::Load()
|
||||
|
||||
Emu.GetVFS().Mount("/dev_bdvd/", bdvd, new vfsDeviceLocalFile());
|
||||
}
|
||||
else if (fs::is_file(elf_dir + "../../PS3_DISC.SFB")) // guess loading disc game
|
||||
else if (fs::is_file(elf_dir + "/../../PS3_DISC.SFB")) // guess loading disc game
|
||||
{
|
||||
const auto dir_list = fmt::split(elf_dir, { "/", "\\" });
|
||||
|
||||
@ -242,27 +229,6 @@ void Emulator::Load()
|
||||
LOG_NOTICE(LOADER, "%s -> %s", GetVFS().m_devices[i]->GetPs3Path().c_str(), GetVFS().m_devices[i]->GetLocalPath().c_str());
|
||||
}
|
||||
|
||||
LOG_NOTICE(LOADER, "");
|
||||
|
||||
/*LOG_NOTICE(LOADER, "Settings:");
|
||||
LOG_NOTICE(LOADER, "CPU: %s", Ini.CPUIdToString(Ini.CPUDecoderMode.GetValue()));
|
||||
LOG_NOTICE(LOADER, "SPU: %s", Ini.SPUIdToString(Ini.SPUDecoderMode.GetValue()));
|
||||
LOG_NOTICE(LOADER, "Renderer: %s", Ini.RendererIdToString(Ini.GSRenderMode.GetValue()));
|
||||
|
||||
if (Ini.GSRenderMode.GetValue() == 2)
|
||||
{
|
||||
LOG_NOTICE(LOADER, "D3D Adapter: %s", Ini.AdapterIdToString(Ini.GSD3DAdaptater.GetValue()));
|
||||
}
|
||||
|
||||
LOG_NOTICE(LOADER, "Resolution: %s", Ini.ResolutionIdToString(Ini.GSResolution.GetValue()));
|
||||
LOG_NOTICE(LOADER, "Write Depth Buffer: %s", Ini.GSDumpDepthBuffer.GetValue() ? "Yes" : "No");
|
||||
LOG_NOTICE(LOADER, "Write Color Buffers: %s", Ini.GSDumpColorBuffers.GetValue() ? "Yes" : "No");
|
||||
LOG_NOTICE(LOADER, "Read Color Buffers: %s", Ini.GSReadColorBuffers.GetValue() ? "Yes" : "No");
|
||||
LOG_NOTICE(LOADER, "Read Depth Buffer: %s", Ini.GSReadDepthBuffer.GetValue() ? "Yes" : "No");
|
||||
LOG_NOTICE(LOADER, "Audio Out: %s", Ini.AudioOutIdToString(Ini.AudioOutMode.GetValue()));
|
||||
LOG_NOTICE(LOADER, "Log Everything: %s", Ini.HLELogging.GetValue() ? "Yes" : "No");
|
||||
LOG_NOTICE(LOADER, "RSX Logging: %s", Ini.RSXLogging.GetValue() ? "Yes" : "No");*/
|
||||
|
||||
LOG_NOTICE(LOADER, "");
|
||||
f.Open("/app_home/../PARAM.SFO");
|
||||
const PSFLoader psf(f);
|
||||
@ -505,11 +471,11 @@ void Emulator::SavePoints(const std::string& path)
|
||||
const u32 marked_count = size32(m_marked_points);
|
||||
|
||||
fs::file(path, fom::rewrite)
|
||||
<< bpdb_version
|
||||
<< break_count
|
||||
<< marked_count
|
||||
<< m_break_points
|
||||
<< m_marked_points;
|
||||
.write(bpdb_version)
|
||||
.write(break_count)
|
||||
.write(marked_count)
|
||||
.write(m_break_points)
|
||||
.write(m_marked_points);
|
||||
}
|
||||
|
||||
bool Emulator::LoadPoints(const std::string& path)
|
||||
|
@ -7,4 +7,4 @@ namespace rpcs3
|
||||
event<void> onstart;
|
||||
event<void> onstop;
|
||||
event<void> onpause;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "config.h"
|
||||
|
||||
namespace rpcs3
|
||||
|
@ -61,55 +61,6 @@
|
||||
<Import Project="..\rpcs3_llvm.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - MemLeak|x64'">
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - MemLeak|x64'">
|
||||
<Lib>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">
|
||||
<Lib>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
<AdditionalDependencies />
|
||||
<AdditionalLibraryDirectories />
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Lib>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Lib>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">
|
||||
<Lib>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
<AdditionalDependencies />
|
||||
<AdditionalLibraryDirectories />
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="emucore.vcxproj">
|
||||
<Project>{c4a10229-4712-4bd2-b63e-50d93c67a038}</Project>
|
||||
|
@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <wx/wx.h>
|
||||
|
||||
enum CgDisasmIds
|
||||
{
|
||||
id_open_file,
|
||||
@ -22,4 +20,4 @@ public:
|
||||
virtual void OnSize(wxSizeEvent& event);
|
||||
void OnRightClick(wxMouseEvent& event);
|
||||
void OnContextMenu(wxCommandEvent& event);
|
||||
};
|
||||
};
|
||||
|
@ -1,9 +1,6 @@
|
||||
#include "stdafx.h"
|
||||
#include "stdafx_gui.h"
|
||||
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/clipbrd.h>
|
||||
|
||||
#include "Emu/state.h"
|
||||
#include "Gui/ConLogFrame.h"
|
||||
|
||||
@ -204,4 +201,4 @@ void LogFrame::OnContextMenu(wxCommandEvent& event)
|
||||
default:
|
||||
event.Skip();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#include <wx/dataobj.h>
|
||||
|
||||
namespace Log
|
||||
{
|
||||
@ -31,4 +30,4 @@ private:
|
||||
void OnContextMenu(wxCommandEvent& event); //After select
|
||||
|
||||
DECLARE_EVENT_TABLE();
|
||||
};
|
||||
};
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "stdafx.h"
|
||||
#include "stdafx_gui.h"
|
||||
#include <wx/statline.h>
|
||||
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/System.h"
|
||||
|
@ -41,4 +41,4 @@ void GLGSFrame::OnSize(wxSizeEvent& event)
|
||||
m_canvas->SetSize(GetClientSize());
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include "GameViewer.h"
|
||||
#include "Loader/PSF.h"
|
||||
#include "SettingsDialog.h"
|
||||
#include <wx/dir.h>
|
||||
|
||||
static const std::string m_class_name = "GameViewer";
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/imaglist.h>
|
||||
#include <wx/log.h>
|
||||
|
||||
#include "Emu/GameInfo.h"
|
||||
#include "Emu/state.h"
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <wx/treectrl.h>
|
||||
|
||||
class KernelExplorer : public wxDialog
|
||||
{
|
||||
wxTreeCtrl* m_tree;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "Gui/FrameBase.h"
|
||||
#include <wx/checklst.h>
|
||||
|
||||
class LLEModulesManagerFrame : public wxDialog
|
||||
{
|
||||
|
@ -24,8 +24,6 @@
|
||||
#include "Gui/LLEModulesManager.h"
|
||||
#include "Gui/CgDisasm.h"
|
||||
#include "Crypto/unpkg.h"
|
||||
#include <wx/dynlib.h>
|
||||
#include <wx/progdlg.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include "frame_icon.xpm"
|
||||
@ -255,7 +253,7 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event))
|
||||
fs::file pkg_f(ctrl.GetPath().ToStdString());
|
||||
|
||||
// Open file mapping (test)
|
||||
fs::file_ptr pkg_ptr(pkg_f);
|
||||
fs::file_read_map pkg_ptr(pkg_f);
|
||||
|
||||
if (!pkg_f || !pkg_ptr)
|
||||
{
|
||||
@ -265,7 +263,7 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
// Append title ID to the path
|
||||
local_path += '/';
|
||||
local_path += { pkg_ptr + 55, 9 };
|
||||
local_path.append(pkg_ptr + 55, 9);
|
||||
|
||||
if (!fs::create_dir(local_path))
|
||||
{
|
||||
@ -289,7 +287,7 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event))
|
||||
volatile f64 progress = 0.0;
|
||||
|
||||
// Run PKG unpacking asynchronously
|
||||
auto result = std::async(std::launch::async, WRAP_EXPR(pkg_install(pkg_f, local_path + "/", progress)));
|
||||
auto result = std::async(std::launch::async, WRAP_EXPR(pkg_install(pkg_f, local_path + '/', progress)));
|
||||
|
||||
// Wait for the completion
|
||||
while (result.wait_for(15ms) != std::future_status::ready)
|
||||
|
@ -4,8 +4,6 @@
|
||||
#include "Gui/ConLogFrame.h"
|
||||
#include "Gui/FrameBase.h"
|
||||
|
||||
#include <wx/aui/aui.h>
|
||||
|
||||
class GameViewer;
|
||||
|
||||
class MainFrame : public FrameBase
|
||||
|
@ -6,8 +6,6 @@
|
||||
|
||||
#include "MemoryStringSearcher.h"
|
||||
|
||||
#include <wx/notebook.h>
|
||||
|
||||
MemoryStringSearcher::MemoryStringSearcher(wxWindow* parent)
|
||||
: wxDialog(parent, wxID_ANY, "String Searcher", wxDefaultPosition, wxSize(545, 64))
|
||||
, exit(false)
|
||||
|
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#include <wx/listctrl.h>
|
||||
|
||||
class MemoryStringSearcher : public wxDialog
|
||||
{
|
||||
|
@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <wx/listctrl.h>
|
||||
|
||||
class MemoryViewerPanel : public wxDialog
|
||||
{
|
||||
u32 m_addr;
|
||||
|
@ -15,8 +15,6 @@
|
||||
|
||||
#include "MemoryViewer.h"
|
||||
|
||||
#include <wx/notebook.h>
|
||||
|
||||
// TODO: Clear the object when restarting the emulator
|
||||
std::vector<RSXDebuggerProgram> m_debug_programs;
|
||||
|
||||
@ -569,7 +567,7 @@ void RSXDebugger::GetMemory()
|
||||
dump += '\n';
|
||||
}
|
||||
|
||||
fs::file(fs::get_config_dir() + "command_dump.log", fom::rewrite) << dump;
|
||||
fs::file(fs::get_config_dir() + "command_dump.log", fom::rewrite).write(dump);
|
||||
|
||||
for (u32 i = 0;i < frame_debug.draw_calls.size(); i++)
|
||||
m_list_captured_draw_calls->InsertItem(i, frame_debug.draw_calls[i].name);
|
||||
|
@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <wx/listctrl.h>
|
||||
|
||||
class RSXDebugger : public wxDialog
|
||||
{
|
||||
u32 m_addr;
|
||||
|
@ -5,7 +5,6 @@
|
||||
#include "Emu/state.h"
|
||||
#include "Emu/SysCalls/Modules/cellVideoOut.h"
|
||||
#include "SettingsDialog.h"
|
||||
#include <wx/radiobox.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
|
@ -3,7 +3,6 @@
|
||||
#include "VHDDManager.h"
|
||||
#include "TextInputDialog.h"
|
||||
#include "Emu/state.h"
|
||||
#include <wx/busyinfo.h>
|
||||
|
||||
VHDDListDropTarget::VHDDListDropTarget(wxListView* parent) : m_parent(parent)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <wx/dnd.h>
|
||||
|
||||
#include "Emu/HDD/HDD.h"
|
||||
|
||||
class VHDDListDropTarget : public wxDropTarget
|
||||
|
@ -239,14 +239,12 @@ bool TROPUSRLoader::UnlockTrophy(u32 id, u64 timestamp1, u64 timestamp2)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TROPUSRLoader::Close()
|
||||
void TROPUSRLoader::Close()
|
||||
{
|
||||
if (m_file && m_file->Close())
|
||||
if (m_file)
|
||||
{
|
||||
m_file->Close();
|
||||
delete m_file;
|
||||
m_file = nullptr;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ public:
|
||||
|
||||
virtual bool Load(const std::string& filepath, const std::string& configpath);
|
||||
virtual bool Save(const std::string& filepath);
|
||||
virtual bool Close();
|
||||
virtual void Close();
|
||||
|
||||
virtual u32 GetTrophiesCount();
|
||||
|
||||
|
@ -124,7 +124,7 @@ void TRPLoader::RenameEntry(const char *oldname, const char *newname)
|
||||
}
|
||||
}
|
||||
|
||||
bool TRPLoader::Close()
|
||||
void TRPLoader::Close()
|
||||
{
|
||||
return trp_f.Close();
|
||||
trp_f.Close();
|
||||
}
|
||||
|
@ -39,5 +39,5 @@ public:
|
||||
virtual void RemoveEntry(const char *filename);
|
||||
virtual void RenameEntry(const char *oldname, const char *newname);
|
||||
|
||||
virtual bool Close();
|
||||
virtual void Close();
|
||||
};
|
||||
|
@ -62,54 +62,9 @@
|
||||
<Import Project="..\rpcs3_llvm.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - MemLeak|x64'">
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - MemLeak|x64'">
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>.\OpenAL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>.\OpenAL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>.\OpenAL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>.\OpenAL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>.\OpenAL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
@ -61,55 +61,11 @@
|
||||
<Import Project="..\rpcs3_llvm.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - MemLeak|x64'">
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'" Label="Configuration">
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - MemLeak|x64'">
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\minidx9\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\minidx9\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\minidx9\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\minidx9\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\minidx9\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'" Label="Configuration">
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug - MemLeak|x64'">
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="emucore.vcxproj">
|
||||
<Project>{c4a10229-4712-4bd2-b63e-50d93c67a038}</Project>
|
||||
|
@ -1,19 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Fichiers sources">
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\rpcs3\Emu\Audio\XAudio2\XAudio2Thread.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\rpcs3\Emu\Audio\XAudio2\XAudio2Thread.h">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -34,12 +34,12 @@ namespace rpcs3
|
||||
fs::file file(m_path, fom::create | fom::read);
|
||||
|
||||
if (file)
|
||||
from_string((const std::string)file);
|
||||
from_string(file.to_string());
|
||||
}
|
||||
|
||||
void config_t::save() const
|
||||
{
|
||||
fs::file(m_path, fom::rewrite) << to_string();
|
||||
fs::file(m_path, fom::rewrite).write(to_string());
|
||||
}
|
||||
|
||||
config_t config{ fs::get_config_dir() + "rpcs3.new.ini" };
|
||||
|
@ -58,47 +58,8 @@
|
||||
<Import Project="..\rpcs3_release.props" />
|
||||
<Import Project="..\rpcs3_llvm.props" />
|
||||
</ImportGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - MemLeak|x64'">
|
||||
<Lib>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Lib>
|
||||
<ClCompile>
|
||||
<MultiProcessorCompilation>false</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">
|
||||
<Lib>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Lib>
|
||||
<ClCompile>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Lib>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Lib>
|
||||
<ClCompile>
|
||||
<MultiProcessorCompilation>false</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Lib>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Lib>
|
||||
<ClCompile>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">
|
||||
<Lib>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Lib>
|
||||
<ClCompile>
|
||||
<MultiProcessorCompilation>false</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\stblib\stb_image.c" />
|
||||
<ClCompile Include="..\Utilities\AutoPause.cpp" />
|
||||
<ClCompile Include="..\Utilities\config_context.cpp" />
|
||||
<ClCompile Include="..\Utilities\Log.cpp" />
|
||||
@ -150,11 +111,7 @@
|
||||
<ClCompile Include="Crypto\ec.cpp" />
|
||||
<ClCompile Include="Crypto\key_vault.cpp" />
|
||||
<ClCompile Include="Crypto\lz.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug - MemLeak|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Crypto\sha1.cpp" />
|
||||
<ClCompile Include="Crypto\unedat.cpp" />
|
||||
@ -391,15 +348,13 @@
|
||||
<ClCompile Include="Loader\TROPUSR.cpp" />
|
||||
<ClCompile Include="Loader\TRP.cpp" />
|
||||
<ClCompile Include="Emu\Cell\PPULLVMRecompiler.cpp" />
|
||||
<ClCompile Include="stb_image.cpp" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug - MemLeak|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\stblib\stb_image.h" />
|
||||
<ClInclude Include="..\Utilities\Atomic.h" />
|
||||
<ClInclude Include="..\Utilities\AutoPause.h" />
|
||||
<ClInclude Include="..\Utilities\BEType.h" />
|
||||
@ -686,26 +641,6 @@
|
||||
<ClInclude Include="stdafx.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - MemLeak|x64'">
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
@ -930,6 +930,9 @@
|
||||
<ClCompile Include="Emu\RSX\rsx_methods.cpp">
|
||||
<Filter>Emu\GPU\RSX</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="stb_image.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -1788,5 +1791,11 @@
|
||||
<ClInclude Include="Emu\RSX\rsx_methods.h">
|
||||
<Filter>Emu\GPU\RSX</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\stblib\stb_image.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\stblib\stb_image.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -61,43 +61,26 @@
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<IncludePath>.\;..\wxWidgets\include;..\SDL-1.3.0-5538\include;..\SDL_image-1.2.10;..\pthreads-2.8.0;..\;..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86_64\Include;.\OpenAL\include;$(IncludePath);..\asmjit\src\asmjit;$(UniversalCRT_IncludePath);..\minidx12\Include</IncludePath>
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<LibraryPath>$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath)</LibraryPath>
|
||||
<TargetName>$(ProjectName)-dbg</TargetName>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">
|
||||
<IncludePath>.\;..\wxWidgets\include;..\SDL-1.3.0-5538\include;..\SDL_image-1.2.10;..\pthreads-2.8.0;..\;..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86_64\Include;.\OpenAL\include;$(IncludePath);..\asmjit\src\asmjit;$(UniversalCRT_IncludePath);..\minidx12\Include</IncludePath>
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<LibraryPath>$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(SolutionDir)lib\Debug-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath);$(SolutionDir)lib\$(Configuration)-$(Platform)\</LibraryPath>
|
||||
<TargetName>$(ProjectName)-dbg</TargetName>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - MemLeak|x64'">
|
||||
<IncludePath>.\;..\wxWidgets\include;..\SDL-1.3.0-5538\include;..\SDL_image-1.2.10;..\pthreads-2.8.0;..\;..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86_64\Include;.\OpenAL\include;$(UniversalCRT_IncludePath);$(IncludePath);..\minidx12\Include</IncludePath>
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<LibraryPath>$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(SolutionDir)lib\Debug-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath);$(SolutionDir)lib\$(Configuration)-$(Platform)\</LibraryPath>
|
||||
<TargetName>$(ProjectName)-dbg</TargetName>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>.\;..\wxWidgets\include;..\SDL-1.3.0-5538\include;..\SDL_image-1.2.10;..\pthreads-2.8.0;..\;..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86_64\Include;.\OpenAL\include;$(IncludePath);..\asmjit\src\asmjit;$(UniversalCRT_IncludePath);..\minidx12\Include</IncludePath>
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<LibraryPath>$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath)</LibraryPath>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<RunCodeAnalysis>false</RunCodeAnalysis>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>.\;..\wxWidgets\include;..\SDL-1.3.0-5538\include;..\SDL_image-1.2.10;..\pthreads-2.8.0;..\;..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86_64\Include;.\OpenAL\include;$(IncludePath);..\asmjit\src\asmjit;$(UniversalCRT_IncludePath);..\minidx12\Include</IncludePath>
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<LibraryPath>$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(SolutionDir)lib\Release-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath)</LibraryPath>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<RunCodeAnalysis>false</RunCodeAnalysis>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<PreBuildEvent>
|
||||
@ -108,34 +91,10 @@
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug - MemLeak|x64'">..\minidx9\Include;..\OpenAL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">..\minidx9\Include;..\OpenAL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\minidx9\Include;..\OpenAL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\minidx9\Include;..\OpenAL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">..\minidx9\Include;..\OpenAL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\minidx9\Include;..\OpenAL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories Condition="'$(Configuration)|$(Platform)'=='Debug - MemLeak|x64'">..\OpenAL\libs\Win64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">..\OpenAL\libs\Win64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\OpenAL\libs\Win64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\OpenAL\libs\Win64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">..\OpenAL\libs\Win64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories>..\OpenAL\libs\Win64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
9
rpcs3/stb_image.cpp
Normal file
9
rpcs3/stb_image.cpp
Normal file
@ -0,0 +1,9 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#pragma warning(push, 0)
|
||||
#include "stblib/stb_image.h"
|
||||
#include "stblib/stb_image.c"
|
||||
#pragma warning(pop)
|
||||
}
|
@ -25,6 +25,7 @@
|
||||
#include <cstdint>
|
||||
#include <climits>
|
||||
#include <cmath>
|
||||
#include <cerrno>
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
@ -78,7 +79,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
operator bool() const //template<typename T, typename = std::enable_if_t<std::is_integral<T>::value>> operator T() const
|
||||
operator bool() const
|
||||
{
|
||||
return m_value != 0;
|
||||
}
|
||||
@ -86,13 +87,15 @@ public:
|
||||
|
||||
CHECK_SIZE_ALIGN(b8, 1, 1);
|
||||
|
||||
template<typename T, typename = std::enable_if_t<std::is_integral<T>::value>> inline T align(const T& value, u64 align)
|
||||
template<typename T, typename = std::enable_if_t<std::is_integral<T>::value>>
|
||||
inline T align(const T& value, u64 align)
|
||||
{
|
||||
return static_cast<T>((value + (align - 1)) & ~(align - 1));
|
||||
}
|
||||
|
||||
// copy null-terminated string from std::string to char array with truncation
|
||||
template<std::size_t N> inline void strcpy_trunc(char(&dst)[N], const std::string& src)
|
||||
template<std::size_t N>
|
||||
inline void strcpy_trunc(char(&dst)[N], const std::string& src)
|
||||
{
|
||||
const std::size_t count = src.size() >= N ? N - 1 : src.size();
|
||||
std::memcpy(dst, src.c_str(), count);
|
||||
@ -100,7 +103,8 @@ template<std::size_t N> inline void strcpy_trunc(char(&dst)[N], const std::strin
|
||||
}
|
||||
|
||||
// copy null-terminated string from char array to char array with truncation
|
||||
template<std::size_t N, std::size_t N2> inline void strcpy_trunc(char(&dst)[N], const char(&src)[N2])
|
||||
template<std::size_t N, std::size_t N2>
|
||||
inline void strcpy_trunc(char(&dst)[N], const char(&src)[N2])
|
||||
{
|
||||
const std::size_t count = N2 >= N ? N - 1 : N2;
|
||||
std::memcpy(dst, src, count);
|
||||
@ -108,13 +112,15 @@ template<std::size_t N, std::size_t N2> inline void strcpy_trunc(char(&dst)[N],
|
||||
}
|
||||
|
||||
// returns true if all array elements are unique and sorted in ascending order
|
||||
template<typename T, std::size_t N> constexpr bool is_ascending(const T(&array)[N], std::size_t from = 0)
|
||||
template<typename T, std::size_t N>
|
||||
constexpr bool is_ascending(const T(&array)[N], std::size_t from = 0)
|
||||
{
|
||||
return from >= N - 1 ? true : array[from] < array[from + 1] ? is_ascending(array, from + 1) : false;
|
||||
}
|
||||
|
||||
// get (first) array element equal to `value` or nullptr if not found
|
||||
template<typename T, std::size_t N, typename T2> constexpr const T* static_search(const T(&array)[N], const T2& value, std::size_t from = 0)
|
||||
template<typename T, std::size_t N, typename T2>
|
||||
constexpr const T* static_search(const T(&array)[N], const T2& value, std::size_t from = 0)
|
||||
{
|
||||
return from >= N ? nullptr : array[from] == value ? array + from : static_search(array, value, from + 1);
|
||||
}
|
||||
@ -135,7 +141,8 @@ struct explicit_bool_t
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T1, typename T2, typename T3 = const char*> struct triplet_t
|
||||
template<typename T1, typename T2, typename T3 = const char*>
|
||||
struct triplet_t
|
||||
{
|
||||
T1 first;
|
||||
T2 second;
|
||||
@ -154,18 +161,28 @@ template<typename T1, typename T2, typename T3 = const char*> struct triplet_t
|
||||
#define alignof32(type) static_cast<u32>(alignof(type))
|
||||
|
||||
// return 32 bit .size() for container
|
||||
template<typename T> inline auto size32(const T& container) -> decltype(static_cast<u32>(container.size()))
|
||||
template<typename T>
|
||||
inline auto size32(const T& container) -> decltype(static_cast<u32>(container.size()))
|
||||
{
|
||||
const auto size = container.size();
|
||||
return size >= 0 && size <= UINT32_MAX ? static_cast<u32>(size) : throw std::length_error(__FUNCTION__);
|
||||
}
|
||||
|
||||
// return 32 bit size for an array
|
||||
template<typename T, std::size_t Size> constexpr u32 size32(const T(&)[Size])
|
||||
template<typename T, std::size_t Size>
|
||||
constexpr u32 size32(const T(&)[Size])
|
||||
{
|
||||
return Size >= 0 && Size <= UINT32_MAX ? static_cast<u32>(Size) : throw std::length_error(__FUNCTION__);
|
||||
}
|
||||
|
||||
#define CONCATENATE_DETAIL(x, y) x ## y
|
||||
#define CONCATENATE(x, y) CONCATENATE_DETAIL(x, y)
|
||||
|
||||
#define SWITCH(expr) for (const auto& CONCATENATE(_switch_, __LINE__) = (expr);;) { const auto& _switch_ = CONCATENATE(_switch_, __LINE__);
|
||||
#define CCASE(value) } constexpr std::remove_reference_t<decltype(_switch_)> CONCATENATE(_value_, __LINE__) = value; if (_switch_ == CONCATENATE(_value_, __LINE__)) {
|
||||
#define VCASE(value) } if (_switch_ == (value)) {
|
||||
#define DEFAULT } /* must be the last one */
|
||||
|
||||
#define WRAP_EXPR(expr) [&]{ return expr; }
|
||||
#define COPY_EXPR(expr) [=]{ return expr; }
|
||||
#define PURE_EXPR(expr) [] { return expr; }
|
||||
@ -174,8 +191,8 @@ template<typename T, std::size_t Size> constexpr u32 size32(const T(&)[Size])
|
||||
#define IS_INTEGRAL(t) (std::is_integral<t>::value || std::is_same<std::decay_t<t>, u128>::value)
|
||||
#define IS_INTEGER(t) (std::is_integral<t>::value || std::is_enum<t>::value || std::is_same<std::decay_t<t>, u128>::value)
|
||||
#define IS_BINARY_COMPARABLE(t1, t2) (IS_INTEGER(t1) && IS_INTEGER(t2) && sizeof(t1) == sizeof(t2))
|
||||
#define CHECK_ASSERTION(expr) if (expr) {} else throw EXCEPTION("Assertion failed: " #expr)
|
||||
#define CHECK_SUCCESS(expr) if (s32 _r = (expr)) throw EXCEPTION(#expr " failed (0x%x)", _r)
|
||||
#define CHECK_ASSERTION(expr) if (expr) {} else throw EXCEPTION("Assertion failed: %s", #expr)
|
||||
#define CHECK_SUCCESS(expr) if (s32 _r = (expr)) throw EXCEPTION("Failure: %s -> 0x%x", #expr, _r)
|
||||
|
||||
// Some forward declarations for the ID manager
|
||||
template<typename T> struct id_traits;
|
||||
|
@ -3,9 +3,13 @@
|
||||
#include "restore_new.h"
|
||||
|
||||
#ifndef QT_UI
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push, 0)
|
||||
#else
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
#include <wx/wx.h>
|
||||
#include <wx/wxprec.h>
|
||||
#include <wx/config.h>
|
||||
#include <wx/string.h>
|
||||
@ -22,12 +26,26 @@
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/gauge.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/scrolbar.h>
|
||||
#include <wx/frame.h>
|
||||
#include <wx/combobox.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/checklst.h>
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/treectrl.h>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/radiobox.h>
|
||||
#include <wx/aui/aui.h>
|
||||
#include <wx/aui/auibook.h>
|
||||
#include <wx/dataobj.h>
|
||||
#include <wx/imaglist.h>
|
||||
#include <wx/log.h>
|
||||
#include <wx/dynlib.h>
|
||||
#include <wx/progdlg.h>
|
||||
#include <wx/busyinfo.h>
|
||||
#include <wx/dnd.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
@ -2,8 +2,15 @@
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets" />
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<LibraryPath>$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath)</LibraryPath>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<Lib>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Lib>
|
||||
<ClCompile>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalIncludeDirectories>.\;..\;..\asmjit\src\asmjit;..\wxWidgets\include\msvc;..\wxWidgets\include;..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);..\llvm\include;..\llvm_build\include;$(UniversalCRT_IncludePath);..\minidx12\Include;..\glm;..\GSL\include</AdditionalIncludeDirectories>
|
||||
|
Loading…
Reference in New Issue
Block a user