Skip to content

Commit e152fc2

Browse files
author
N3xoX1
committed
Some small code clean ups
1 parent 7ae25b5 commit e152fc2

3 files changed

Lines changed: 17 additions & 12 deletions

File tree

‎src/nxemu-os/core/hle/service/vi/application_display_service.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ Result IApplicationDisplayService::CreateStrayLayer(
215215
std::min(out_native_window.size(), buffer.size()));
216216

217217
*out_size = buffer.size();
218+
218219
R_SUCCEED();
219220
}
220221

‎src/nxemu-os/core/hle/service/vi/conductor.cpp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
22
// SPDX-License-Identifier: GPL-2.0-or-later
33

4-
#include "yuzu_common/yuzu_assert.h"
54
#include "yuzu_common/settings.h"
65
#include "core/core.h"
76
#include "core/core_timing.h"

‎src/nxemu-video/video_manager.cpp‎

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,21 @@ struct VideoManager::Impl
2323
return true;
2424
}
2525

26+
void EmulationStarting(void)
27+
{
28+
Layout::FramebufferLayout layout;
29+
if (m_emuWindow)
30+
{
31+
layout = m_emuWindow->GetFramebufferLayout();
32+
}
33+
m_emuWindow = nullptr;
34+
m_emuWindow = std::make_unique<RenderWindow>(m_window);
35+
m_emuWindow->UpdateCurrentFramebufferLayout(layout.width, layout.height);
36+
m_gpuCore = nullptr;
37+
m_gpuCore = VideoCore::CreateGPU(m_system, *(m_emuWindow.get()), *m_host1x);
38+
39+
m_gpuCore->Start();
40+
}
2641
std::shared_ptr<Tegra::MemoryManager> m_gmmu;
2742
std::unique_ptr<Tegra::Host1x::Host1x> m_host1x;
2843
std::unique_ptr<RenderWindow> m_emuWindow;
@@ -43,17 +58,7 @@ VideoManager::~VideoManager()
4358

4459
void VideoManager::EmulationStarting(void)
4560
{
46-
Layout::FramebufferLayout layout;
47-
if (impl->m_emuWindow)
48-
{
49-
layout = impl->m_emuWindow->GetFramebufferLayout();
50-
}
51-
impl->m_emuWindow = nullptr;
52-
impl->m_emuWindow = std::make_unique<RenderWindow>(impl->m_window);
53-
impl->m_emuWindow->UpdateCurrentFramebufferLayout(layout.width, layout.height);
54-
impl->m_gpuCore = nullptr;
55-
impl->m_gpuCore = VideoCore::CreateGPU(impl->m_system, *(impl->m_emuWindow.get()), *impl->m_host1x);
56-
impl->m_gpuCore->Start();
61+
impl->EmulationStarting();
5762
}
5863

5964
bool VideoManager::Initialize(void)

0 commit comments

Comments
 (0)