summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml2
-rw-r--r--appveyor.yml2
m---------externals/catch0
-rw-r--r--src/common/telemetry.h4
-rw-r--r--src/core/hle/service/sm/controller.cpp8
-rw-r--r--src/core/hle/service/sm/controller.h1
-rw-r--r--src/core/hle/service/vi/vi.cpp46
-rw-r--r--src/core/loader/nro.cpp29
-rw-r--r--src/input_common/sdl/sdl.cpp2
-rw-r--r--src/yuzu/bootmanager.cpp3
-rw-r--r--src/yuzu/bootmanager.h10
-rw-r--r--src/yuzu/game_list.cpp4
-rw-r--r--src/yuzu/game_list.h2
-rw-r--r--src/yuzu/hotkeys.cpp1
14 files changed, 56 insertions, 58 deletions
diff --git a/.travis.yml b/.travis.yml
index 9edfc0809..7db6f297e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -32,7 +32,7 @@ matrix:
deploy:
provider: releases
api_key:
- secure: IuTT8DjxzNgOtaEsyOpz1JaSmtDtHSsWZnJKmSBwXAzgP2ZU4Ja3/q0z5PwbC5Ql7kuFahuYTE5oi7lbJBuu2P3y1Wj2zvFozGUkA3JUvEXDNOPS9QTJ1EYd6O+wenZoj7d/Pn+ZeIgyEafnnZsGBb8lMQnV9MfIHgYlZQ5EyF3n4XikT2h1UbDBYx74ciXZIxFEulx68kDr9Q4/U+zIYQmYv2N+lgXSLDkFrCJ046gRcujPYGPqE6jVw0kKni80CTTpuDF5prU8yIBeiffjkJ3Qx1a17G07eZ4r83P4XUOlaHbRBmA/8ywZvLF2Gep3wGKfSFgMWbPxBJk5ZSYcOOAgMsEcg0+gBK9gLTwO4pbmc2GvqP21yRQBzgtbFoEtAHLu5lVPBkZU7kZuRMJtRdqvFIwOLhpnRS8IknFOD5vjtaFiNdGWaK9ePdsGvplijnXcPafkumakc4+eVEiXb6/KzdX1zXdur5tuUPFytm0Oy6IJcGIf8FHXGvUlmWsnPzwfusij9JgeQOP+uegc9PdBfL+h7L5rk+ilELt3cXD5K7wgov/4hkl5istNJ2bm0IioIstWss8QQQTkyscGoeh/oXmUpOL4FdsTvsWhDR3QKeq8nSzgDkqLe0iSbplQGnC7o7ytNbldmxJvf3nylwglA8w3HlqLHtZLkUOcuQ0=
+ secure: ElsIAlbvVXBNKsP31nVPysh+mf0GQA4DiL/y5iJeQxKQYR6iRoNo+RfzOBmdswdo0bE/PGeBAlfzCkp15gjhWf6Je0N6dRpczmcmLq6SSQFn1Mpq00xMJB2AgQIlaHs6KFgoUA173EBKbPwgU/NubTFpJFm/Wa+NcSWAHQXKL9KT2M3qKpxNkPl3mKEVsbch4REP+T/46vsa+ikw0VE0kIs6V93LqUQZpI2F0Dhihx8Cxr5iedkE1QsNK+QSX9iItMHbfek9OH980gP7L3lkZltyAA1Pk0c37OAgz2PwczwNKwCT8jg9PMzdcKmWouvLyAkZFuA806ElzwHY3oEd91Zm6+Bk5n24yBKZ9027AZzw38NK2Z2m9Akb8+ar8PdsKU6N5pDutX9qSLayr0oMgJ0s7/xnGBGdL3gfkPCFc50xO/2DxlsOR+zAhPNM9Y76hhGy6A7/40+9uzrJvd4nAuDvIXRzi2Yl2L7mKBE4suMKbFLtk2LlgM0qY5JMVTQ8NliaEtqopfPur2KWFVJUpWDNLtNX8xGqhfwg7cLjIiGmnxSaJBTDuZI6dpEjkWkU0n1xYhGqEqit8DbehYzazozMJ+Vsr8hku7jGlUtlw+U6HG1e19O2y4aGeSwYPROcCNz+BLwmVM8oZE3Roy3qoaa2yiFf+sy6rUHznrhsfEM=
file_glob: true
file: "artifacts/*"
skip_cleanup: true
diff --git a/appveyor.yml b/appveyor.yml
index 954be4e8f..77d8c8554 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -163,7 +163,7 @@ deploy:
provider: GitHub
release: $(appveyor_repo_tag_name)
auth_token:
- secure: "argb6oi2TYLB4wDy+HoCC8PuGAmsnocSk12CQ5614XAPO+NVPndlkLv1utnDFfg2"
+ secure: QqePPnXbkzmXct5c8hZ2X5AbsthbI6cS1Sr+VBzcD8oUOIjfWJJKXVAQGUbQAbb0
artifact: update,build
draft: false
prerelease: false
diff --git a/externals/catch b/externals/catch
-Subproject 3dcc9233515ea69e45a11be369f867a944e72e7
+Subproject cd76f5730c9a3afa19f3b9c83608d9c7ab325a1
diff --git a/src/common/telemetry.h b/src/common/telemetry.h
index dd6bbd759..3694c76f2 100644
--- a/src/common/telemetry.h
+++ b/src/common/telemetry.h
@@ -53,10 +53,10 @@ template <typename T>
class Field : public FieldInterface {
public:
Field(FieldType type, std::string name, const T& value)
- : type(type), name(std::move(name)), value(value) {}
+ : name(std::move(name)), type(type), value(value) {}
Field(FieldType type, std::string name, T&& value)
- : type(type), name(std::move(name)), value(std::move(value)) {}
+ : name(std::move(name)), type(type), value(std::move(value)) {}
Field(const Field& other) : Field(other.type, other.name, other.value) {}
diff --git a/src/core/hle/service/sm/controller.cpp b/src/core/hle/service/sm/controller.cpp
index e8f5d0e4a..7b1c8ee37 100644
--- a/src/core/hle/service/sm/controller.cpp
+++ b/src/core/hle/service/sm/controller.cpp
@@ -32,6 +32,12 @@ void Controller::DuplicateSession(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service, "called");
}
+void Controller::DuplicateSessionEx(Kernel::HLERequestContext& ctx) {
+ DuplicateSession(ctx);
+
+ LOG_WARNING(Service, "(STUBBED) called, using DuplicateSession");
+}
+
void Controller::QueryPointerBufferSize(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb{ctx, 3};
rb.Push(RESULT_SUCCESS);
@@ -46,7 +52,7 @@ Controller::Controller() : ServiceFramework("IpcController") {
{0x00000001, nullptr, "ConvertDomainToSession"},
{0x00000002, &Controller::DuplicateSession, "DuplicateSession"},
{0x00000003, &Controller::QueryPointerBufferSize, "QueryPointerBufferSize"},
- {0x00000004, nullptr, "DuplicateSessionEx"},
+ {0x00000004, &Controller::DuplicateSessionEx, "DuplicateSessionEx"},
};
RegisterHandlers(functions);
}
diff --git a/src/core/hle/service/sm/controller.h b/src/core/hle/service/sm/controller.h
index 0b873b492..7b4bc4b75 100644
--- a/src/core/hle/service/sm/controller.h
+++ b/src/core/hle/service/sm/controller.h
@@ -17,6 +17,7 @@ public:
private:
void ConvertSessionToDomain(Kernel::HLERequestContext& ctx);
void DuplicateSession(Kernel::HLERequestContext& ctx);
+ void DuplicateSessionEx(Kernel::HLERequestContext& ctx);
void QueryPointerBufferSize(Kernel::HLERequestContext& ctx);
};
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp
index cae2c4466..108a635d7 100644
--- a/src/core/hle/service/vi/vi.cpp
+++ b/src/core/hle/service/vi/vi.cpp
@@ -26,7 +26,7 @@ public:
// This default size was chosen arbitrarily.
static constexpr size_t DefaultBufferSize = 0x40;
Parcel() : buffer(DefaultBufferSize) {}
- Parcel(std::vector<u8> data) : buffer(std::move(data)) {}
+ explicit Parcel(std::vector<u8> data) : buffer(std::move(data)) {}
virtual ~Parcel() = default;
template <typename T>
@@ -47,8 +47,9 @@ public:
}
std::vector<u8> ReadBlock(size_t length) {
- std::vector<u8> data(length);
- std::memcpy(data.data(), buffer.data() + read_index, length);
+ const u8* const begin = buffer.data() + read_index;
+ const u8* const end = begin + length;
+ std::vector<u8> data(begin, end);
read_index += length;
read_index = Common::AlignUp(read_index, 4);
return data;
@@ -101,9 +102,9 @@ public:
}
protected:
- virtual void SerializeData(){};
+ virtual void SerializeData() {}
- virtual void DeserializeData(){};
+ virtual void DeserializeData() {}
private:
struct Header {
@@ -121,7 +122,7 @@ private:
class NativeWindow : public Parcel {
public:
- NativeWindow(u32 id) : Parcel() {
+ explicit NativeWindow(u32 id) : Parcel() {
data.id = id;
}
~NativeWindow() override = default;
@@ -147,12 +148,12 @@ private:
class IGBPConnectRequestParcel : public Parcel {
public:
- IGBPConnectRequestParcel(const std::vector<u8>& buffer) : Parcel(buffer) {
+ explicit IGBPConnectRequestParcel(const std::vector<u8>& buffer) : Parcel(buffer) {
Deserialize();
}
~IGBPConnectRequestParcel() override = default;
- void DeserializeData() {
+ void DeserializeData() override {
std::u16string token = ReadInterfaceToken();
data = Read<Data>();
}
@@ -168,7 +169,7 @@ public:
class IGBPConnectResponseParcel : public Parcel {
public:
- IGBPConnectResponseParcel(u32 width, u32 height) : Parcel() {
+ explicit IGBPConnectResponseParcel(u32 width, u32 height) : Parcel() {
data.width = width;
data.height = height;
}
@@ -194,12 +195,13 @@ private:
class IGBPSetPreallocatedBufferRequestParcel : public Parcel {
public:
- IGBPSetPreallocatedBufferRequestParcel(const std::vector<u8>& buffer) : Parcel(buffer) {
+ explicit IGBPSetPreallocatedBufferRequestParcel(const std::vector<u8>& buffer)
+ : Parcel(buffer) {
Deserialize();
}
~IGBPSetPreallocatedBufferRequestParcel() override = default;
- void DeserializeData() {
+ void DeserializeData() override {
std::u16string token = ReadInterfaceToken();
data = Read<Data>();
ASSERT(data.graphic_buffer_length == sizeof(IGBPBuffer));
@@ -231,12 +233,12 @@ protected:
class IGBPDequeueBufferRequestParcel : public Parcel {
public:
- IGBPDequeueBufferRequestParcel(const std::vector<u8>& buffer) : Parcel(buffer) {
+ explicit IGBPDequeueBufferRequestParcel(const std::vector<u8>& buffer) : Parcel(buffer) {
Deserialize();
}
~IGBPDequeueBufferRequestParcel() override = default;
- void DeserializeData() {
+ void DeserializeData() override {
std::u16string token = ReadInterfaceToken();
data = Read<Data>();
}
@@ -254,7 +256,7 @@ public:
class IGBPDequeueBufferResponseParcel : public Parcel {
public:
- IGBPDequeueBufferResponseParcel(u32 slot) : Parcel(), slot(slot) {}
+ explicit IGBPDequeueBufferResponseParcel(u32 slot) : Parcel(), slot(slot) {}
~IGBPDequeueBufferResponseParcel() override = default;
protected:
@@ -271,12 +273,12 @@ protected:
class IGBPRequestBufferRequestParcel : public Parcel {
public:
- IGBPRequestBufferRequestParcel(const std::vector<u8>& buffer) : Parcel(buffer) {
+ explicit IGBPRequestBufferRequestParcel(const std::vector<u8>& buffer) : Parcel(buffer) {
Deserialize();
}
~IGBPRequestBufferRequestParcel() override = default;
- void DeserializeData() {
+ void DeserializeData() override {
std::u16string token = ReadInterfaceToken();
slot = Read<u32_le>();
}
@@ -286,7 +288,7 @@ public:
class IGBPRequestBufferResponseParcel : public Parcel {
public:
- IGBPRequestBufferResponseParcel(IGBPBuffer buffer) : Parcel(), buffer(buffer) {}
+ explicit IGBPRequestBufferResponseParcel(IGBPBuffer buffer) : Parcel(), buffer(buffer) {}
~IGBPRequestBufferResponseParcel() override = default;
protected:
@@ -307,12 +309,12 @@ protected:
class IGBPQueueBufferRequestParcel : public Parcel {
public:
- IGBPQueueBufferRequestParcel(const std::vector<u8>& buffer) : Parcel(buffer) {
+ explicit IGBPQueueBufferRequestParcel(const std::vector<u8>& buffer) : Parcel(buffer) {
Deserialize();
}
~IGBPQueueBufferRequestParcel() override = default;
- void DeserializeData() {
+ void DeserializeData() override {
std::u16string token = ReadInterfaceToken();
data = Read<Data>();
}
@@ -330,7 +332,7 @@ public:
class IGBPQueueBufferResponseParcel : public Parcel {
public:
- IGBPQueueBufferResponseParcel(u32 width, u32 height) : Parcel() {
+ explicit IGBPQueueBufferResponseParcel(u32 width, u32 height) : Parcel() {
data.width = width;
data.height = height;
}
@@ -356,7 +358,7 @@ private:
class IHOSBinderDriver final : public ServiceFramework<IHOSBinderDriver> {
public:
- IHOSBinderDriver(std::shared_ptr<NVFlinger> nv_flinger)
+ explicit IHOSBinderDriver(std::shared_ptr<NVFlinger> nv_flinger)
: ServiceFramework("IHOSBinderDriver"), nv_flinger(std::move(nv_flinger)) {
static const FunctionInfo functions[] = {
{0, &IHOSBinderDriver::TransactParcel, "TransactParcel"},
@@ -506,7 +508,7 @@ private:
class IManagerDisplayService final : public ServiceFramework<IManagerDisplayService> {
public:
- IManagerDisplayService(std::shared_ptr<NVFlinger> nv_flinger)
+ explicit IManagerDisplayService(std::shared_ptr<NVFlinger> nv_flinger)
: ServiceFramework("IManagerDisplayService"), nv_flinger(std::move(nv_flinger)) {
static const FunctionInfo functions[] = {
{1020, &IManagerDisplayService::CloseDisplay, "CloseDisplay"},
diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp
index 66c61b038..6864a1926 100644
--- a/src/core/loader/nro.cpp
+++ b/src/core/loader/nro.cpp
@@ -62,20 +62,6 @@ static constexpr u32 PageAlignSize(u32 size) {
return (size + Memory::PAGE_MASK) & ~Memory::PAGE_MASK;
}
-static std::vector<u8> ReadSegment(FileUtil::IOFile& file, const NroSegmentHeader& header) {
- std::vector<u8> data;
- data.resize(header.size);
-
- file.Seek(header.offset + sizeof(NroHeader), SEEK_SET);
- size_t bytes_read{file.ReadBytes(data.data(), header.size)};
- if (header.size != PageAlignSize(static_cast<u32>(bytes_read))) {
- LOG_CRITICAL(Loader, "Failed to read NRO segment bytes", header.size);
- return {};
- }
-
- return data;
-}
-
bool AppLoader_NRO::LoadNro(const std::string& path, VAddr load_base) {
FileUtil::IOFile file(path, "rb");
if (!file.IsOpen()) {
@@ -95,7 +81,7 @@ bool AppLoader_NRO::LoadNro(const std::string& path, VAddr load_base) {
// Build program image
Kernel::SharedPtr<Kernel::CodeSet> codeset = Kernel::CodeSet::Create("", 0);
std::vector<u8> program_image;
- program_image.resize(PageAlignSize(nro_header.file_size + nro_header.bss_size));
+ program_image.resize(PageAlignSize(nro_header.file_size));
file.Seek(0, SEEK_SET);
file.ReadBytes(program_image.data(), nro_header.file_size);
@@ -107,15 +93,16 @@ bool AppLoader_NRO::LoadNro(const std::string& path, VAddr load_base) {
// Read MOD header
ModHeader mod_header{};
- u32 bss_size{Memory::PAGE_SIZE}; // Default .bss to page size if MOD0 section doesn't exist
+ // Default .bss to NRO header bss size if MOD0 section doesn't exist
+ u32 bss_size{PageAlignSize(nro_header.bss_size)};
std::memcpy(&mod_header, program_image.data() + nro_header.module_header_offset,
sizeof(ModHeader));
const bool has_mod_header{mod_header.magic == Common::MakeMagic('M', 'O', 'D', '0')};
if (has_mod_header) {
// Resize program image to include .bss section and page align each section
bss_size = PageAlignSize(mod_header.bss_end_offset - mod_header.bss_start_offset);
- codeset->data.size += bss_size;
}
+ codeset->data.size += bss_size;
program_image.resize(PageAlignSize(static_cast<u32>(program_image.size()) + bss_size));
// Load codeset for current process
@@ -134,9 +121,11 @@ ResultStatus AppLoader_NRO::Load(Kernel::SharedPtr<Kernel::Process>& process) {
return ResultStatus::Error;
}
- // Load and relocate "main" and "sdk" NSO
- static constexpr VAddr base_addr{Memory::PROCESS_IMAGE_VADDR};
process = Kernel::Process::Create("main");
+
+ // Load NRO
+ static constexpr VAddr base_addr{Memory::PROCESS_IMAGE_VADDR};
+
if (!LoadNro(filepath, base_addr)) {
return ResultStatus::ErrorInvalidFormat;
}
@@ -145,7 +134,7 @@ ResultStatus AppLoader_NRO::Load(Kernel::SharedPtr<Kernel::Process>& process) {
process->address_mappings = default_address_mappings;
process->resource_limit =
Kernel::ResourceLimit::GetForCategory(Kernel::ResourceLimitCategory::APPLICATION);
- process->Run(base_addr, 48, Kernel::DEFAULT_STACK_SIZE);
+ process->Run(base_addr + sizeof(NroHeader), 48, Kernel::DEFAULT_STACK_SIZE);
is_loaded = true;
return ResultStatus::Success;
diff --git a/src/input_common/sdl/sdl.cpp b/src/input_common/sdl/sdl.cpp
index 88b557c5d..3b87d6b65 100644
--- a/src/input_common/sdl/sdl.cpp
+++ b/src/input_common/sdl/sdl.cpp
@@ -425,7 +425,7 @@ std::vector<std::unique_ptr<InputCommon::Polling::DevicePoller>> GetPollers(
pollers.push_back(std::make_unique<SDLButtonPoller>());
break;
}
- return std::move(pollers);
+ return pollers;
}
} // namespace Polling
} // namespace SDL
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index 61d678c9b..b9dc4943a 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -15,8 +15,7 @@
#include "input_common/motion_emu.h"
#include "yuzu/bootmanager.h"
-EmuThread::EmuThread(GRenderWindow* render_window)
- : exec_step(false), running(false), stop_run(false), render_window(render_window) {}
+EmuThread::EmuThread(GRenderWindow* render_window) : render_window(render_window) {}
void EmuThread::run() {
render_window->MakeCurrent();
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h
index 6974edcbb..130bc613b 100644
--- a/src/yuzu/bootmanager.h
+++ b/src/yuzu/bootmanager.h
@@ -58,7 +58,7 @@ public:
* @return True if the emulation thread is running, otherwise false
* @note This function is thread-safe
*/
- bool IsRunning() {
+ bool IsRunning() const {
return running;
}
@@ -68,12 +68,12 @@ public:
void RequestStop() {
stop_run = true;
SetRunning(false);
- };
+ }
private:
- bool exec_step;
- bool running;
- std::atomic<bool> stop_run;
+ bool exec_step = false;
+ bool running = false;
+ std::atomic<bool> stop_run{false};
std::mutex running_mutex;
std::condition_variable running_cv;
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp
index 679c89828..6d7c409d0 100644
--- a/src/yuzu/game_list.cpp
+++ b/src/yuzu/game_list.cpp
@@ -137,8 +137,8 @@ GameList::SearchField::SearchField(GameList* parent) : QWidget{parent} {
* Checks if all words separated by spaces are contained in another string
* This offers a word order insensitive search function
*
- * @param String that gets checked if it contains all words of the userinput string
- * @param String containing all words getting checked
+ * @param haystack String that gets checked if it contains all words of the userinput string
+ * @param userinput String containing all words getting checked
* @return true if the haystack contains all words of userinput
*/
bool GameList::containsAllWords(QString haystack, QString userinput) {
diff --git a/src/yuzu/game_list.h b/src/yuzu/game_list.h
index 4823a1296..7aff597b7 100644
--- a/src/yuzu/game_list.h
+++ b/src/yuzu/game_list.h
@@ -49,7 +49,7 @@ public:
QString edit_filter_text_old;
protected:
- bool eventFilter(QObject* obj, QEvent* event);
+ bool eventFilter(QObject* obj, QEvent* event) override;
};
QHBoxLayout* layout_filter = nullptr;
QTreeView* tree_view = nullptr;
diff --git a/src/yuzu/hotkeys.cpp b/src/yuzu/hotkeys.cpp
index 42f026464..61acb38ee 100644
--- a/src/yuzu/hotkeys.cpp
+++ b/src/yuzu/hotkeys.cpp
@@ -5,6 +5,7 @@
#include <map>
#include <QKeySequence>
#include <QShortcut>
+#include <QTreeWidgetItem>
#include <QtGlobal>
#include "yuzu/hotkeys.h"
#include "yuzu/ui_settings.h"