From 64f98f4d0f33b5c626d86a05ab9dd8060e160cc5 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Fri, 23 Dec 2016 13:37:40 +0000 Subject: [PATCH] core: Move emu_window and key_map into core * Removes circular dependences (common should not depend on core) --- src/citra/emu_window/emu_window_sdl2.cpp | 2 +- src/citra/emu_window/emu_window_sdl2.h | 2 +- src/citra_qt/bootmanager.cpp | 2 +- src/citra_qt/bootmanager.h | 2 +- src/common/CMakeLists.txt | 4 ---- src/core/CMakeLists.txt | 4 ++++ src/{common => core/frontend}/emu_window.cpp | 4 ++-- src/{common => core/frontend}/emu_window.h | 0 src/{common => core/frontend}/key_map.cpp | 4 ++-- src/{common => core/frontend}/key_map.h | 0 src/core/hle/service/hid/hid.cpp | 2 +- src/core/settings.cpp | 2 +- src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 2 +- src/video_core/renderer_opengl/renderer_opengl.cpp | 2 +- 14 files changed, 16 insertions(+), 16 deletions(-) rename src/{common => core/frontend}/emu_window.cpp (98%) rename src/{common => core/frontend}/emu_window.h (100%) rename src/{common => core/frontend}/key_map.cpp (98%) rename src/{common => core/frontend}/key_map.h (100%) diff --git a/src/citra/emu_window/emu_window_sdl2.cpp b/src/citra/emu_window/emu_window_sdl2.cpp index 8abe48984a..b0d82b6707 100644 --- a/src/citra/emu_window/emu_window_sdl2.cpp +++ b/src/citra/emu_window/emu_window_sdl2.cpp @@ -9,10 +9,10 @@ #include #include #include "citra/emu_window/emu_window_sdl2.h" -#include "common/key_map.h" #include "common/logging/log.h" #include "common/scm_rev.h" #include "common/string_util.h" +#include "core/frontend/key_map.h" #include "core/hle/service/hid/hid.h" #include "core/settings.h" #include "video_core/video_core.h" diff --git a/src/citra/emu_window/emu_window_sdl2.h b/src/citra/emu_window/emu_window_sdl2.h index e4d14ef127..c8cd919c66 100644 --- a/src/citra/emu_window/emu_window_sdl2.h +++ b/src/citra/emu_window/emu_window_sdl2.h @@ -5,7 +5,7 @@ #pragma once #include -#include "common/emu_window.h" +#include "core/frontend/emu_window.h" struct SDL_Window; diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index bb75633b6b..57fde6caa7 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp @@ -9,11 +9,11 @@ #endif #include "citra_qt/bootmanager.h" -#include "common/key_map.h" #include "common/microprofile.h" #include "common/scm_rev.h" #include "common/string_util.h" #include "core/core.h" +#include "core/frontend/key_map.h" #include "video_core/debug_utils/debug_utils.h" #include "video_core/video_core.h" diff --git a/src/citra_qt/bootmanager.h b/src/citra_qt/bootmanager.h index af52f369b3..43015390b2 100644 --- a/src/citra_qt/bootmanager.h +++ b/src/citra_qt/bootmanager.h @@ -9,8 +9,8 @@ #include #include #include -#include "common/emu_window.h" #include "common/thread.h" +#include "core/frontend/emu_window.h" class QKeyEvent; class QScreen; diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index e6c2ce3359..5aecf6e6e7 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -3,11 +3,9 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp.in" "${CMAKE_CURRENT_SOU set(SRCS break_points.cpp - emu_window.cpp file_util.cpp framebuffer_layout.cpp hash.cpp - key_map.cpp logging/filter.cpp logging/text_formatter.cpp logging/backend.cpp @@ -34,11 +32,9 @@ set(HEADERS common_funcs.h common_paths.h common_types.h - emu_window.h file_util.h framebuffer_layout.h hash.h - key_map.h linear_disk_cache.h logging/text_formatter.h logging/filter.h diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index ccbe7a9ce3..3621449b3a 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -29,6 +29,8 @@ set(SRCS file_sys/ivfc_archive.cpp file_sys/path_parser.cpp file_sys/savedata_archive.cpp + frontend/emu_window.cpp + frontend/key_map.cpp gdbstub/gdbstub.cpp hle/config_mem.cpp hle/applets/applet.cpp @@ -198,6 +200,8 @@ set(HEADERS file_sys/ivfc_archive.h file_sys/path_parser.h file_sys/savedata_archive.h + frontend/emu_window.h + frontend/key_map.h gdbstub/gdbstub.h hle/config_mem.h hle/function_wrappers.h diff --git a/src/common/emu_window.cpp b/src/core/frontend/emu_window.cpp similarity index 98% rename from src/common/emu_window.cpp rename to src/core/frontend/emu_window.cpp index e3a9e08e60..f6f90f9e1c 100644 --- a/src/common/emu_window.cpp +++ b/src/core/frontend/emu_window.cpp @@ -5,8 +5,8 @@ #include #include #include "common/assert.h" -#include "common/key_map.h" -#include "emu_window.h" +#include "core/frontend/emu_window.h" +#include "core/frontend/key_map.h" #include "video_core/video_core.h" void EmuWindow::ButtonPressed(Service::HID::PadState pad) { diff --git a/src/common/emu_window.h b/src/core/frontend/emu_window.h similarity index 100% rename from src/common/emu_window.h rename to src/core/frontend/emu_window.h diff --git a/src/common/key_map.cpp b/src/core/frontend/key_map.cpp similarity index 98% rename from src/common/key_map.cpp rename to src/core/frontend/key_map.cpp index 97cafe9c92..15f0e079cf 100644 --- a/src/common/key_map.cpp +++ b/src/core/frontend/key_map.cpp @@ -3,8 +3,8 @@ // Refer to the license.txt file included. #include -#include "common/emu_window.h" -#include "common/key_map.h" +#include "core/frontend/emu_window.h" +#include "core/frontend/key_map.h" namespace KeyMap { diff --git a/src/common/key_map.h b/src/core/frontend/key_map.h similarity index 100% rename from src/common/key_map.h rename to src/core/frontend/key_map.h diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 18a1b6a16b..676154bd41 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -3,9 +3,9 @@ // Refer to the license.txt file included. #include -#include "common/emu_window.h" #include "common/logging/log.h" #include "core/core_timing.h" +#include "core/frontend/emu_window.h" #include "core/hle/kernel/event.h" #include "core/hle/kernel/shared_memory.h" #include "core/hle/service/hid/hid.h" diff --git a/src/core/settings.cpp b/src/core/settings.cpp index 626e06cd92..5d23c52f90 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -7,7 +7,7 @@ #include "settings.h" #include "video_core/video_core.h" -#include "common/emu_window.h" +#include "core/frontend/emu_window.h" namespace Settings { diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 0b2e48407f..85aa06cd5a 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp @@ -11,11 +11,11 @@ #include #include #include "common/bit_field.h" -#include "common/emu_window.h" #include "common/logging/log.h" #include "common/math_util.h" #include "common/microprofile.h" #include "common/vector_math.h" +#include "core/frontend/emu_window.h" #include "core/memory.h" #include "video_core/debug_utils/debug_utils.h" #include "video_core/pica_state.h" diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 93f0ac1052..2aa90e5c13 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -9,10 +9,10 @@ #include #include "common/assert.h" #include "common/bit_field.h" -#include "common/emu_window.h" #include "common/logging/log.h" #include "common/profiler_reporting.h" #include "common/synchronized_wrapper.h" +#include "core/frontend/emu_window.h" #include "core/hw/gpu.h" #include "core/hw/hw.h" #include "core/hw/lcd.h"