From a7f2f09a446b124e1fd9b3079b0ea6588c8270dc Mon Sep 17 00:00:00 2001 From: Xphalnos <164882787+Xphalnos@users.noreply.github.com> Date: Wed, 31 Jul 2024 12:25:55 +0200 Subject: [PATCH] Reorganization of includes (#348) * Reorganization of includes * fix --- src/audio_core/sdl_audio.cpp | 4 ++-- src/emulator.cpp | 14 ++++---------- src/emulator.h | 2 +- src/input/controller.cpp | 1 + src/main.cpp | 2 +- src/qt_gui/elf_viewer.cpp | 1 + src/qt_gui/elf_viewer.h | 2 +- src/qt_gui/main.cpp | 5 ++--- src/qt_gui/main_window.h | 2 +- 9 files changed, 14 insertions(+), 19 deletions(-) diff --git a/src/audio_core/sdl_audio.cpp b/src/audio_core/sdl_audio.cpp index 0d494707..141d338e 100644 --- a/src/audio_core/sdl_audio.cpp +++ b/src/audio_core/sdl_audio.cpp @@ -4,8 +4,8 @@ #include #include #include -#include -#include +#include "common/assert.h" +#include "core/libraries/error_codes.h" #include "sdl_audio.h" namespace Audio { diff --git a/src/emulator.cpp b/src/emulator.cpp index 5b162e05..374e0e84 100644 --- a/src/emulator.cpp +++ b/src/emulator.cpp @@ -1,14 +1,8 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include -#include -#include -#include -#include -#include -#include -#include +#include + #include "common/config.h" #include "common/debug.h" #include "common/logging/backend.h" @@ -18,6 +12,7 @@ #include "common/polyfill_thread.h" #include "common/singleton.h" #include "common/version.h" +#include "core/file_format/playgo_chunk.h" #include "core/file_format/psf.h" #include "core/file_format/splash.h" #include "core/file_sys/fs.h" @@ -27,13 +22,12 @@ #include "core/libraries/libc_internal/libc_internal.h" #include "core/libraries/libs.h" #include "core/libraries/rtc/rtc.h" +#include "core/libraries/videoout/video_out.h" #include "core/linker.h" #include "core/memory.h" #include "emulator.h" #include "video_core/renderdoc.h" -#include - Frontend::WindowSDL* g_window = nullptr; namespace Core { diff --git a/src/emulator.h b/src/emulator.h index 323170e3..01bce7e7 100644 --- a/src/emulator.h +++ b/src/emulator.h @@ -6,7 +6,7 @@ #include #include -#include +#include "common/singleton.h" #include "core/linker.h" #include "input/controller.h" #include "sdl_window.h" diff --git a/src/input/controller.cpp b/src/input/controller.cpp index 7bfecadc..247e08ce 100644 --- a/src/input/controller.cpp +++ b/src/input/controller.cpp @@ -4,6 +4,7 @@ #include "core/libraries/kernel/time_management.h" #include "core/libraries/pad/pad.h" #include "input/controller.h" + namespace Input { GameController::GameController() { diff --git a/src/main.cpp b/src/main.cpp index c7210ac5..9df14f13 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,8 +1,8 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include #include +#include "emulator.h" int main(int argc, char* argv[]) { if (argc == 1) { diff --git a/src/qt_gui/elf_viewer.cpp b/src/qt_gui/elf_viewer.cpp index 1674e1ab..47a25914 100644 --- a/src/qt_gui/elf_viewer.cpp +++ b/src/qt_gui/elf_viewer.cpp @@ -3,6 +3,7 @@ #include #include "elf_viewer.h" + ElfViewer::ElfViewer(QWidget* parent) : QTableWidget(parent) { dir_list_std = Config::getElfViewer(); for (const auto& str : dir_list_std) { diff --git a/src/qt_gui/elf_viewer.h b/src/qt_gui/elf_viewer.h index 15aeb55f..fbf14d30 100644 --- a/src/qt_gui/elf_viewer.h +++ b/src/qt_gui/elf_viewer.h @@ -14,8 +14,8 @@ #include #include #include +#include "core/loader/elf.h" #include "game_list_frame.h" -#include "src/core/loader/elf.h" class ElfViewer : public QTableWidget { Q_OBJECT diff --git a/src/qt_gui/main.cpp b/src/qt_gui/main.cpp index ea3f27f8..15a06c86 100644 --- a/src/qt_gui/main.cpp +++ b/src/qt_gui/main.cpp @@ -2,15 +2,14 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include +#include #include "common/config.h" #include "core/file_sys/fs.h" +#include "emulator.h" #include "qt_gui/game_install_dialog.h" #include "qt_gui/main_window.h" -#include -#include - // Custom message handler to ignore Qt logs void customMessageHandler(QtMsgType, const QMessageLogContext&, const QString&) {} diff --git a/src/qt_gui/main_window.h b/src/qt_gui/main_window.h index 27d14b93..a7013738 100644 --- a/src/qt_gui/main_window.h +++ b/src/qt_gui/main_window.h @@ -9,13 +9,13 @@ #include #include #include -#include #include #include "common/config.h" #include "common/path_util.h" #include "core/file_format/psf.h" #include "core/file_sys/fs.h" #include "elf_viewer.h" +#include "emulator.h" #include "game_grid_frame.h" #include "game_info.h" #include "game_list_frame.h"