Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1085 from waddlesplash/refactoring
Migrate global init stuff into UICommon.
- Loading branch information
Showing
12 changed files
with
170 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | |
endif() | ||
|
||
set(LIBS core | ||
uicommon | ||
${LZO} | ||
${GTK2_LIBRARIES}) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
set(SRCS UICommon.cpp) | ||
|
||
set(LIBS common) | ||
|
||
add_dolphin_library(uicommon "${SRCS}" "${LIBS}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// Copyright 2014 Dolphin Emulator Project | ||
// Licensed under GPLv2 | ||
// Refer to the license.txt file included. | ||
|
||
#include "Common/CommonPaths.h" | ||
#include "Common/FileUtil.h" | ||
#include "Common/Logging/LogManager.h" | ||
|
||
#include "Core/ConfigManager.h" | ||
#include "Core/HW/Wiimote.h" | ||
|
||
#include "UICommon/UICommon.h" | ||
|
||
#include "VideoCommon/VideoBackendBase.h" | ||
|
||
namespace UICommon | ||
{ | ||
|
||
void Init() | ||
{ | ||
LogManager::Init(); | ||
SConfig::Init(); | ||
VideoBackend::PopulateList(); | ||
WiimoteReal::LoadSettings(); | ||
|
||
VideoBackend::ActivateBackend(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend); | ||
|
||
SetEnableAlert(SConfig::GetInstance().m_LocalCoreStartupParameter.bUsePanicHandlers); | ||
} | ||
|
||
void Shutdown() | ||
{ | ||
WiimoteReal::Shutdown(); | ||
VideoBackend::ClearList(); | ||
SConfig::Shutdown(); | ||
LogManager::Shutdown(); | ||
} | ||
|
||
void CreateDirectories() | ||
{ | ||
// Copy initial Wii NAND data from Sys to User. | ||
File::CopyDir(File::GetSysDirectory() + WII_USER_DIR DIR_SEP, | ||
File::GetUserPath(D_WIIUSER_IDX)); | ||
|
||
File::CreateFullPath(File::GetUserPath(D_USER_IDX)); | ||
File::CreateFullPath(File::GetUserPath(D_CACHE_IDX)); | ||
File::CreateFullPath(File::GetUserPath(D_CONFIG_IDX)); | ||
File::CreateFullPath(File::GetUserPath(D_DUMPDSP_IDX)); | ||
File::CreateFullPath(File::GetUserPath(D_DUMPTEXTURES_IDX)); | ||
File::CreateFullPath(File::GetUserPath(D_GAMESETTINGS_IDX)); | ||
File::CreateFullPath(File::GetUserPath(D_GCUSER_IDX)); | ||
File::CreateFullPath(File::GetUserPath(D_GCUSER_IDX) + USA_DIR DIR_SEP); | ||
File::CreateFullPath(File::GetUserPath(D_GCUSER_IDX) + EUR_DIR DIR_SEP); | ||
File::CreateFullPath(File::GetUserPath(D_GCUSER_IDX) + JAP_DIR DIR_SEP); | ||
File::CreateFullPath(File::GetUserPath(D_HIRESTEXTURES_IDX)); | ||
File::CreateFullPath(File::GetUserPath(D_MAILLOGS_IDX)); | ||
File::CreateFullPath(File::GetUserPath(D_MAPS_IDX)); | ||
File::CreateFullPath(File::GetUserPath(D_SCREENSHOTS_IDX)); | ||
File::CreateFullPath(File::GetUserPath(D_SHADERS_IDX)); | ||
File::CreateFullPath(File::GetUserPath(D_STATESAVES_IDX)); | ||
File::CreateFullPath(File::GetUserPath(D_THEMES_IDX)); | ||
} | ||
|
||
} // namespace UICommon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright 2014 Dolphin Emulator Project | ||
// Licensed under GPLv2 | ||
// Refer to the license.txt file included. | ||
|
||
#pragma once | ||
|
||
namespace UICommon | ||
{ | ||
|
||
void Init(); | ||
void Shutdown(); | ||
|
||
void CreateDirectories(); | ||
|
||
} // namespace UICommon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup Label="ProjectConfigurations"> | ||
<ProjectConfiguration Include="Debug|x64"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|x64"> | ||
<Configuration>Release</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
</ItemGroup> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>{604C8368-F34A-4D55-82C8-CC92A0C13254}</ProjectGuid> | ||
</PropertyGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
<PropertyGroup Label="Configuration"> | ||
<ConfigurationType>StaticLibrary</ConfigurationType> | ||
<PlatformToolset>v120</PlatformToolset> | ||
<CharacterSet>Unicode</CharacterSet> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration"> | ||
<UseDebugLibraries>true</UseDebugLibraries> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration"> | ||
<UseDebugLibraries>false</UseDebugLibraries> | ||
</PropertyGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
<ImportGroup Label="ExtensionSettings"> | ||
</ImportGroup> | ||
<ImportGroup Label="PropertySheets"> | ||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
<Import Project="..\..\VSProps\Base.props" /> | ||
<Import Project="..\..\VSProps\PCHUse.props" /> | ||
</ImportGroup> | ||
<PropertyGroup Label="UserMacros" /> | ||
<ItemGroup> | ||
<Text Include="CMakeLists.txt" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="$(CoreDir)Core\Core.vcxproj"> | ||
<Project>{E54CF649-140E-4255-81A5-30A673C1FB36}</Project> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClCompile Include="UICommon.cpp" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClInclude Include="UICommon.h" /> | ||
</ItemGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
<ImportGroup Label="ExtensionTargets"> | ||
</ImportGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters