Review changes
This commit is contained in:
parent
86600e90d3
commit
8f164a16ce
|
@ -1,6 +1,7 @@
|
||||||
# CMake 3.8 required for 17 to be a valid value for CXX_STANDARD
|
# CMake 3.8 required for 17 to be a valid value for CXX_STANDARD
|
||||||
cmake_minimum_required(VERSION 3.8)
|
cmake_minimum_required(VERSION 3.8)
|
||||||
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.15)
|
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.15)
|
||||||
|
# Don't override the warning flags in MSVC:
|
||||||
cmake_policy(SET CMP0092 NEW)
|
cmake_policy(SET CMP0092 NEW)
|
||||||
endif ()
|
endif ()
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Definitions for all external bundled libraries
|
# Definitions for all external bundled libraries
|
||||||
|
|
||||||
# Suppress warnings from external libraries
|
# Suppress warnings from external libraries
|
||||||
if (CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||||
add_compile_options(/W0)
|
add_compile_options(/W0)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ if (MSVC)
|
||||||
/Zc:externConstexpr
|
/Zc:externConstexpr
|
||||||
/Zc:inline
|
/Zc:inline
|
||||||
)
|
)
|
||||||
if (CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||||
add_compile_options(
|
add_compile_options(
|
||||||
/MP
|
/MP
|
||||||
/Zc:throwingNew
|
/Zc:throwingNew
|
||||||
|
|
|
@ -1438,7 +1438,7 @@ void GMainWindow::OnCIAInstallFinished() {
|
||||||
|
|
||||||
void GMainWindow::OnMenuRecentFile() {
|
void GMainWindow::OnMenuRecentFile() {
|
||||||
QAction* action = qobject_cast<QAction*>(sender());
|
QAction* action = qobject_cast<QAction*>(sender());
|
||||||
assert(action);
|
ASSERT(action);
|
||||||
|
|
||||||
const QString filename = action->data().toString();
|
const QString filename = action->data().toString();
|
||||||
if (QFileInfo::exists(filename)) {
|
if (QFileInfo::exists(filename)) {
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "core/hle/kernel/thread.h"
|
#include "core/hle/kernel/thread.h"
|
||||||
#include "core/hle/service/fs/archive.h"
|
#include "core/hle/service/fs/archive.h"
|
||||||
#include "core/hle/service/gsp/gsp.h"
|
#include "core/hle/service/gsp/gsp.h"
|
||||||
|
#include "core/hle/service/pm/pm_app.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
#include "core/hle/service/sm/sm.h"
|
#include "core/hle/service/sm/sm.h"
|
||||||
#include "core/hw/gpu.h"
|
#include "core/hw/gpu.h"
|
||||||
|
@ -45,8 +46,6 @@
|
||||||
#include "network/network.h"
|
#include "network/network.h"
|
||||||
#include "video_core/video_core.h"
|
#include "video_core/video_core.h"
|
||||||
|
|
||||||
#include "core/hle/service/pm/pm_app.h"
|
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
/*static*/ System System::s_instance;
|
/*static*/ System System::s_instance;
|
||||||
|
@ -183,15 +182,11 @@ System::ResultStatus System::RunLoop(bool tight_loop) {
|
||||||
case Signal::Load: {
|
case Signal::Load: {
|
||||||
LOG_INFO(Core, "Begin load");
|
LOG_INFO(Core, "Begin load");
|
||||||
System::LoadState(param);
|
System::LoadState(param);
|
||||||
// auto stream = std::ifstream("save0.citrasave", std::fstream::binary);
|
|
||||||
// System::Load(stream, FileUtil::GetSize("save0.citrasave"));
|
|
||||||
LOG_INFO(Core, "Load completed");
|
LOG_INFO(Core, "Load completed");
|
||||||
} break;
|
} break;
|
||||||
case Signal::Save: {
|
case Signal::Save: {
|
||||||
LOG_INFO(Core, "Begin save");
|
LOG_INFO(Core, "Begin save");
|
||||||
System::SaveState(param);
|
System::SaveState(param);
|
||||||
// auto stream = std::ofstream("save0.citrasave", std::fstream::binary);
|
|
||||||
// System::Save(stream);
|
|
||||||
LOG_INFO(Core, "Save completed");
|
LOG_INFO(Core, "Save completed");
|
||||||
} break;
|
} break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -102,7 +102,7 @@ private:
|
||||||
template <class Archive>
|
template <class Archive>
|
||||||
void serialize(Archive& ar, const unsigned int) {
|
void serialize(Archive& ar, const unsigned int) {
|
||||||
ar& boost::serialization::base_object<FileBackend>(*this);
|
ar& boost::serialization::base_object<FileBackend>(*this);
|
||||||
ar& file_buffer; // TODO: See about a more efficient way to do this
|
ar& file_buffer;
|
||||||
}
|
}
|
||||||
friend class boost::serialization::access;
|
friend class boost::serialization::access;
|
||||||
};
|
};
|
||||||
|
|
|
@ -29,7 +29,6 @@ public:
|
||||||
ResultVal<ArchiveFormatInfo> GetFormatInfo(const Path& path, u64 program_id) const override;
|
ResultVal<ArchiveFormatInfo> GetFormatInfo(const Path& path, u64 program_id) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string mount_point; // TODO: Remove, unused?
|
|
||||||
std::shared_ptr<ArchiveSource_SDSaveData> sd_savedata_source;
|
std::shared_ptr<ArchiveSource_SDSaveData> sd_savedata_source;
|
||||||
|
|
||||||
ArchiveFactory_OtherSaveDataPermitted() = default;
|
ArchiveFactory_OtherSaveDataPermitted() = default;
|
||||||
|
@ -57,7 +56,6 @@ public:
|
||||||
ResultVal<ArchiveFormatInfo> GetFormatInfo(const Path& path, u64 program_id) const override;
|
ResultVal<ArchiveFormatInfo> GetFormatInfo(const Path& path, u64 program_id) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string mount_point; // TODO: Remove, unused?
|
|
||||||
std::shared_ptr<ArchiveSource_SDSaveData> sd_savedata_source;
|
std::shared_ptr<ArchiveSource_SDSaveData> sd_savedata_source;
|
||||||
|
|
||||||
ArchiveFactory_OtherSaveDataGeneral() = default;
|
ArchiveFactory_OtherSaveDataGeneral() = default;
|
||||||
|
|
|
@ -28,7 +28,6 @@ public:
|
||||||
ResultVal<ArchiveFormatInfo> GetFormatInfo(const Path& path, u64 program_id) const override;
|
ResultVal<ArchiveFormatInfo> GetFormatInfo(const Path& path, u64 program_id) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string mount_point; // TODO: Remove this? seems unused
|
|
||||||
std::shared_ptr<ArchiveSource_SDSaveData> sd_savedata_source;
|
std::shared_ptr<ArchiveSource_SDSaveData> sd_savedata_source;
|
||||||
|
|
||||||
ArchiveFactory_SaveData() = default;
|
ArchiveFactory_SaveData() = default;
|
||||||
|
|
|
@ -58,12 +58,12 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// Mapping of ProgramId -> NCCHData
|
/// Mapping of ProgramId -> NCCHData
|
||||||
std::unordered_map<u64, NCCHData>
|
std::unordered_map<u64, NCCHData> ncch_data;
|
||||||
ncch_data; // TODO: Remove this, or actually set the values here
|
|
||||||
|
|
||||||
template <class Archive>
|
template <class Archive>
|
||||||
void serialize(Archive& ar, const unsigned int) {
|
void serialize(Archive& ar, const unsigned int) {
|
||||||
ar& boost::serialization::base_object<ArchiveFactory>(*this);
|
ar& boost::serialization::base_object<ArchiveFactory>(*this);
|
||||||
|
// NOTE: ncch_data is never written to, so we don't serialize it here
|
||||||
}
|
}
|
||||||
friend class boost::serialization::access;
|
friend class boost::serialization::access;
|
||||||
};
|
};
|
||||||
|
|
|
@ -57,11 +57,11 @@ public:
|
||||||
Handler();
|
Handler();
|
||||||
ConfigMemDef& GetConfigMem();
|
ConfigMemDef& GetConfigMem();
|
||||||
|
|
||||||
virtual u8* GetPtr() {
|
u8* GetPtr() override {
|
||||||
return static_cast<u8*>(static_cast<void*>(&config_mem));
|
return static_cast<u8*>(static_cast<void*>(&config_mem));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual u32 GetSize() const {
|
u32 GetSize() const override {
|
||||||
return sizeof(config_mem);
|
return sizeof(config_mem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,12 +99,12 @@ protected:
|
||||||
|
|
||||||
struct SessionInfo {
|
struct SessionInfo {
|
||||||
SessionInfo(std::shared_ptr<ServerSession> session, std::unique_ptr<SessionDataBase> data);
|
SessionInfo(std::shared_ptr<ServerSession> session, std::unique_ptr<SessionDataBase> data);
|
||||||
SessionInfo() = default;
|
|
||||||
|
|
||||||
std::shared_ptr<ServerSession> session;
|
std::shared_ptr<ServerSession> session;
|
||||||
std::unique_ptr<SessionDataBase> data;
|
std::unique_ptr<SessionDataBase> data;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
SessionInfo() = default;
|
||||||
template <class Archive>
|
template <class Archive>
|
||||||
void serialize(Archive& ar, const unsigned int file_version) {
|
void serialize(Archive& ar, const unsigned int file_version) {
|
||||||
ar& session;
|
ar& session;
|
||||||
|
|
|
@ -15,7 +15,8 @@
|
||||||
#include "core/hle/ipc_helpers.h"
|
#include "core/hle/ipc_helpers.h"
|
||||||
#include "core/hle/result.h"
|
#include "core/hle/result.h"
|
||||||
#include "core/hle/service/err_f.h"
|
#include "core/hle/service/err_f.h"
|
||||||
#undef exception_info
|
#undef exception_info // We use 'exception_info' as a plain identifier, but MSVC defines this in one
|
||||||
|
// of its many headers.
|
||||||
|
|
||||||
SERIALIZE_EXPORT_IMPL(Service::ERR::ERR_F)
|
SERIALIZE_EXPORT_IMPL(Service::ERR::ERR_F)
|
||||||
|
|
||||||
|
|
Reference in New Issue