From 0c7b9570b4a7fe3f934fdefb05455a7b8990b68e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Mon, 12 Jun 2017 13:24:03 +0200 Subject: [PATCH] Move WiiUtils to Core Allows reusing the WAD import logic more easily, whereas UICommon code can only be used from UICommon and UI. And managing what's on the NAND is the Core's responsability, not UI. --- Source/Core/Core/CMakeLists.txt | 1 + Source/Core/Core/Core.vcxproj | 2 ++ Source/Core/Core/Core.vcxproj.filters | 4 +++- Source/Core/{UICommon => Core}/WiiUtils.cpp | 3 ++- Source/Core/{UICommon => Core}/WiiUtils.h | 0 Source/Core/DolphinQt2/GameList/GameFile.cpp | 2 +- Source/Core/DolphinWX/FrameTools.cpp | 2 +- Source/Core/UICommon/CMakeLists.txt | 1 - Source/Core/UICommon/UICommon.vcxproj | 4 +--- 9 files changed, 11 insertions(+), 8 deletions(-) rename Source/Core/{UICommon => Core}/WiiUtils.cpp (98%) rename Source/Core/{UICommon => Core}/WiiUtils.h (100%) diff --git a/Source/Core/Core/CMakeLists.txt b/Source/Core/Core/CMakeLists.txt index da907b4477..498cb8e9f2 100644 --- a/Source/Core/Core/CMakeLists.txt +++ b/Source/Core/Core/CMakeLists.txt @@ -19,6 +19,7 @@ set(SRCS State.cpp TitleDatabase.cpp WiiRoot.cpp + WiiUtils.cpp Boot/Boot_BS2Emu.cpp Boot/Boot.cpp Boot/Boot_WiiWAD.cpp diff --git a/Source/Core/Core/Core.vcxproj b/Source/Core/Core/Core.vcxproj index 193c73ae98..cee0beb8df 100644 --- a/Source/Core/Core/Core.vcxproj +++ b/Source/Core/Core/Core.vcxproj @@ -290,6 +290,7 @@ + @@ -524,6 +525,7 @@ + diff --git a/Source/Core/Core/Core.vcxproj.filters b/Source/Core/Core/Core.vcxproj.filters index bd15438132..76c5fcff0d 100644 --- a/Source/Core/Core/Core.vcxproj.filters +++ b/Source/Core/Core/Core.vcxproj.filters @@ -179,6 +179,7 @@ + ActionReplay @@ -898,6 +899,7 @@ + ActionReplay @@ -1543,4 +1545,4 @@ - \ No newline at end of file + diff --git a/Source/Core/UICommon/WiiUtils.cpp b/Source/Core/Core/WiiUtils.cpp similarity index 98% rename from Source/Core/UICommon/WiiUtils.cpp rename to Source/Core/Core/WiiUtils.cpp index 994079f623..9a61a25a59 100644 --- a/Source/Core/UICommon/WiiUtils.cpp +++ b/Source/Core/Core/WiiUtils.cpp @@ -2,7 +2,8 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "UICommon/WiiUtils.h" +#include "Core/WiiUtils.h" + #include "Common/CommonTypes.h" #include "Common/MsgHandler.h" #include "Core/ConfigManager.h" diff --git a/Source/Core/UICommon/WiiUtils.h b/Source/Core/Core/WiiUtils.h similarity index 100% rename from Source/Core/UICommon/WiiUtils.h rename to Source/Core/Core/WiiUtils.h diff --git a/Source/Core/DolphinQt2/GameList/GameFile.cpp b/Source/Core/DolphinQt2/GameList/GameFile.cpp index 508265c883..900faab711 100644 --- a/Source/Core/DolphinQt2/GameList/GameFile.cpp +++ b/Source/Core/DolphinQt2/GameList/GameFile.cpp @@ -15,6 +15,7 @@ #include "Core/HW/WiiSaveCrypted.h" #include "Core/IOS/ES/ES.h" #include "Core/IOS/IOS.h" +#include "Core/WiiUtils.h" #include "DiscIO/Blob.h" #include "DiscIO/Enums.h" #include "DiscIO/NANDContentLoader.h" @@ -22,7 +23,6 @@ #include "DolphinQt2/GameList/GameFile.h" #include "DolphinQt2/Resources.h" #include "DolphinQt2/Settings.h" -#include "UICommon/WiiUtils.h" static const int CACHE_VERSION = 13; // Last changed in PR #3261 static const int DATASTREAM_VERSION = QDataStream::Qt_5_5; diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index b33ed2cf2f..bb7c28a1c5 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -54,6 +54,7 @@ #include "Core/PowerPC/PPCSymbolDB.h" #include "Core/PowerPC/PowerPC.h" #include "Core/State.h" +#include "Core/WiiUtils.h" #include "DiscIO/Enums.h" #include "DiscIO/NANDContentLoader.h" @@ -87,7 +88,6 @@ #include "InputCommon/ControllerInterface/ControllerInterface.h" #include "UICommon/UICommon.h" -#include "UICommon/WiiUtils.h" #include "VideoCommon/RenderBase.h" #include "VideoCommon/VideoBackendBase.h" diff --git a/Source/Core/UICommon/CMakeLists.txt b/Source/Core/UICommon/CMakeLists.txt index df1f3fd157..36648bbe7c 100644 --- a/Source/Core/UICommon/CMakeLists.txt +++ b/Source/Core/UICommon/CMakeLists.txt @@ -3,7 +3,6 @@ set(SRCS Disassembler.cpp UICommon.cpp USBUtils.cpp - WiiUtils.cpp ) if(USE_X11) diff --git a/Source/Core/UICommon/UICommon.vcxproj b/Source/Core/UICommon/UICommon.vcxproj index 8b65ab9c25..1b5f3521d4 100644 --- a/Source/Core/UICommon/UICommon.vcxproj +++ b/Source/Core/UICommon/UICommon.vcxproj @@ -50,14 +50,12 @@ 4200;%(DisableSpecificWarnings) - - @@ -67,4 +65,4 @@ - \ No newline at end of file +