diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/loader/nro.cpp | 9 | ||||
-rw-r--r-- | src/core/loader/nso.cpp | 10 | ||||
-rw-r--r-- | src/core/loader/nso.h | 2 | ||||
-rw-r--r-- | src/yuzu/bootmanager.cpp | 14 |
4 files changed, 3 insertions, 32 deletions
diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp index a5d09512b..66c61b038 100644 --- a/src/core/loader/nro.cpp +++ b/src/core/loader/nro.cpp @@ -118,13 +118,6 @@ bool AppLoader_NRO::LoadNro(const std::string& path, VAddr load_base) { } program_image.resize(PageAlignSize(static_cast<u32>(program_image.size()) + bss_size)); - // Relocate symbols if there was a proper MOD header - This must happen after the image has been - // loaded into memory - if (has_mod_header) { - Relocate(program_image, nro_header.module_header_offset + mod_header.dynamic_offset, - load_base); - } - // Load codeset for current process codeset->name = path; codeset->memory = std::make_shared<std::vector<u8>>(std::move(program_image)); @@ -154,8 +147,6 @@ ResultStatus AppLoader_NRO::Load(Kernel::SharedPtr<Kernel::Process>& process) { Kernel::ResourceLimit::GetForCategory(Kernel::ResourceLimitCategory::APPLICATION); process->Run(base_addr, 48, Kernel::DEFAULT_STACK_SIZE); - ResolveImports(); - is_loaded = true; return ResultStatus::Success; } diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp index ff96e129b..ef769dd91 100644 --- a/src/core/loader/nso.cpp +++ b/src/core/loader/nso.cpp @@ -88,7 +88,7 @@ static constexpr u32 PageAlignSize(u32 size) { return (size + Memory::PAGE_MASK) & ~Memory::PAGE_MASK; } -VAddr AppLoader_NSO::LoadNso(const std::string& path, VAddr load_base, bool relocate) { +VAddr AppLoader_NSO::LoadNso(const std::string& path, VAddr load_base) { FileUtil::IOFile file(path, "rb"); if (!file.IsOpen()) { return {}; @@ -135,12 +135,6 @@ VAddr AppLoader_NSO::LoadNso(const std::string& path, VAddr load_base, bool relo const u32 image_size{PageAlignSize(static_cast<u32>(program_image.size()) + bss_size)}; program_image.resize(image_size); - // Relocate symbols if there was a proper MOD header - This must happen after the image has been - // loaded into memory - if (has_mod_header && relocate) { - Relocate(program_image, module_offset + mod_header.dynamic_offset, load_base); - } - // Load codeset for current process codeset->name = path; codeset->memory = std::make_shared<std::vector<u8>>(std::move(program_image)); @@ -181,8 +175,6 @@ ResultStatus AppLoader_NSO::Load(Kernel::SharedPtr<Kernel::Process>& process) { Kernel::ResourceLimit::GetForCategory(Kernel::ResourceLimitCategory::APPLICATION); process->Run(Memory::PROCESS_IMAGE_VADDR, 48, Kernel::DEFAULT_STACK_SIZE); - ResolveImports(); - is_loaded = true; return ResultStatus::Success; } diff --git a/src/core/loader/nso.h b/src/core/loader/nso.h index 03424e70d..a24bcdc24 100644 --- a/src/core/loader/nso.h +++ b/src/core/loader/nso.h @@ -34,7 +34,7 @@ public: ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override; private: - VAddr LoadNso(const std::string& path, VAddr load_base, bool relocate = false); + VAddr LoadNso(const std::string& path, VAddr load_base); std::string filepath; }; diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index 843ac6ad7..61d678c9b 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp @@ -1,12 +1,8 @@ #include <QApplication> #include <QHBoxLayout> #include <QKeyEvent> - -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) -// Required for screen DPI information #include <QScreen> #include <QWindow> -#endif #include "common/microprofile.h" #include "common/scm_rev.h" @@ -120,15 +116,13 @@ GRenderWindow::~GRenderWindow() { void GRenderWindow::moveContext() { DoneCurrent(); -// We need to move GL context to the swapping thread in Qt5 -#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0) + // If the thread started running, move the GL Context to the new thread. Otherwise, move it // back. auto thread = (QThread::currentThread() == qApp->thread() && emu_thread != nullptr) ? emu_thread : qApp->thread(); child->context()->moveToThread(thread); -#endif } void GRenderWindow::SwapBuffers() { @@ -191,12 +185,8 @@ QByteArray GRenderWindow::saveGeometry() { } qreal GRenderWindow::windowPixelRatio() { -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) // windowHandle() might not be accessible until the window is displayed to screen. return windowHandle() ? windowHandle()->screen()->devicePixelRatio() : 1.0f; -#else - return 1.0f; -#endif } void GRenderWindow::closeEvent(QCloseEvent* event) { @@ -299,9 +289,7 @@ void GRenderWindow::OnEmulationStopping() { void GRenderWindow::showEvent(QShowEvent* event) { QWidget::showEvent(event); -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) // windowHandle() is not initialized until the Window is shown, so we connect it here. connect(this->windowHandle(), SIGNAL(screenChanged(QScreen*)), this, SLOT(OnFramebufferSizeChanged()), Qt::UniqueConnection); -#endif } |