Externals: Integrate mGBA as a submodule

This commit is contained in:
Bonta 2021-07-04 12:41:46 +02:00
parent b0d2df727a
commit 44aaf108d1
15 changed files with 862 additions and 4 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@ Thumbs.db
# Ignore Finder view option files created by OS X
.DS_Store
# Ignore autogenerated source files
Externals/mGBA/version.c
Source/Core/Common/scmrev.h
# Ignore files output by build
/[Bb]uild*/

5
.gitmodules vendored
View File

@ -3,3 +3,8 @@
url = https://github.com/dolphin-emu/ext-win-qt.git
branch = master
shallow = true
[submodule "Externals/mGBA/mgba"]
path = Externals/mGBA/mgba
url = https://github.com/mgba-emu/mgba.git
branch = master
shallow = true

View File

@ -45,6 +45,7 @@ option(ENABLE_LLVM "Enables LLVM support, for disassembly" ON)
option(ENABLE_TESTS "Enables building the unit tests" ON)
option(ENABLE_VULKAN "Enables vulkan video backend" ON)
option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence, show the current game on Discord" ON)
option(USE_MGBA "Enables GBA controllers emulation using libmgba" ON)
# Maintainers: if you consider blanket disabling this for your users, please
# consider the following points:
@ -826,6 +827,14 @@ if(USE_DISCORD_PRESENCE)
include_directories(Externals/discord-rpc/include)
endif()
if(NOT ENABLE_QT)
set(USE_MGBA 0)
endif()
if(USE_MGBA)
message(STATUS "Using static libmgba from Externals")
add_subdirectory(Externals/mGBA)
endif()
find_package(SYSTEMD)
if(SYSTEMD_FOUND)
message(STATUS "libsystemd found, enabling traversal server watchdog support")

View File

@ -58,6 +58,9 @@
<ProjectReference Include="$(ExternalsDir)mbedtls\mbedTLS.vcxproj">
<Project>{bdb6578b-0691-4e80-a46c-df21639fd3b8}</Project>
</ProjectReference>
<ProjectReference Include="$(ExternalsDir)mGBA\mgba.vcxproj">
<Project>{864C4C8E-296D-3DBC-AD83-F1D5CB6E8EC6}</Project>
</ProjectReference>
<ProjectReference Include="$(ExternalsDir)miniupnpc\miniupnpc.vcxproj">
<Project>{31643fdb-1bb8-4965-9de7-000fc88d35ae}</Project>
</ProjectReference>

View File

@ -38,6 +38,8 @@ Dolphin includes or links code of the following third-party software projects:
[University of Illinois/NCSA Open Source license](http://llvm.org/docs/DeveloperPolicy.html#license)
- [LZO](http://www.oberhumer.com/opensource/lzo/):
[GPLv2+](http://www.oberhumer.com/opensource/gpl.html)
- [mGBA](http://mgba.io)
[MPL 2.0](https://github.com/mgba-emu/mgba/blob/master/LICENSE)
- [MiniUPnPc](http://miniupnp.free.fr/):
[3-clause BSD](https://github.com/miniupnp/miniupnp/blob/master/miniupnpc/LICENSE)
- [Microsoft Visual C++ Runtime Library](http://www.microsoft.com/en-us/download/details.aspx?id=40784):

13
Externals/mGBA/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,13 @@
set(LIBMGBA_ONLY ON)
set(USE_LZMA ON)
add_subdirectory(mgba EXCLUDE_FROM_ALL)
if(NOT MSVC)
target_compile_options(mgba PRIVATE -Wno-unused-parameter -Wno-unused-result -Wno-unused-variable)
endif()
if(ANDROID)
target_compile_definitions(mgba PRIVATE -Dfutimes=futimens)
endif()
add_library(mGBA::mgba ALIAS mgba)

140
Externals/mGBA/make_version.c.js vendored Normal file
View File

@ -0,0 +1,140 @@
var wshShell = new ActiveXObject("WScript.Shell")
var oFS = new ActiveXObject("Scripting.FileSystemObject");
wshShell.CurrentDirectory += "\\mgba";
var outfile = "../version.c";
var cmd_commit = " describe --always --abbrev=40 --dirty";
var cmd_commit_short = " describe --always --dirty";
var cmd_branch = " symbolic-ref --short HEAD";
var cmd_rev = " rev-list HEAD --count";
var cmd_tag = " describe --tag --exact-match";
function GetGitExe()
{
try
{
gitexe = wshShell.RegRead("HKCU\\Software\\GitExtensions\\gitcommand");
wshShell.Exec(gitexe);
return gitexe;
}
catch (e)
{}
for (var gitexe in {"git.cmd":1, "git":1, "git.bat":1})
{
try
{
wshShell.Exec(gitexe);
return gitexe;
}
catch (e)
{}
}
// last try - msysgit not in path (vs2015 default)
msyspath = "\\Git\\cmd\\git.exe";
gitexe = wshShell.ExpandEnvironmentStrings("%PROGRAMFILES(x86)%") + msyspath;
if (oFS.FileExists(gitexe)) {
return gitexe;
}
gitexe = wshShell.ExpandEnvironmentStrings("%PROGRAMFILES%") + msyspath;
if (oFS.FileExists(gitexe)) {
return gitexe;
}
WScript.Echo("Cannot find git or git.cmd, check your PATH:\n" +
wshShell.ExpandEnvironmentStrings("%PATH%"));
WScript.Quit(1);
}
function GetFirstStdOutLine(cmd)
{
try
{
return wshShell.Exec(cmd).StdOut.ReadLine();
}
catch (e)
{
// catch "the system cannot find the file specified" error
WScript.Echo("Failed to exec " + cmd + " this should never happen");
WScript.Quit(1);
}
}
function GetFileContents(f)
{
try
{
return oFS.OpenTextFile(f).ReadAll();
}
catch (e)
{
// file doesn't exist
return "";
}
}
// get version from version.cmake
var version_cmake = GetFileContents("version.cmake");
var version_major = version_cmake.match(/set\(LIB_VERSION_MAJOR (.*)\)/)[1];
var version_minor = version_cmake.match(/set\(LIB_VERSION_MINOR (.*)\)/)[1];
var version_patch = version_cmake.match(/set\(LIB_VERSION_PATCH (.*)\)/)[1];
var version_abi = version_cmake.match(/set\(LIB_VERSION_ABI (.*)\)/)[1];
var version_string = version_major + "." + version_minor + "." + version_patch;
// get info from git
var gitexe = GetGitExe();
var commit = GetFirstStdOutLine(gitexe + cmd_commit);
var commit_short = GetFirstStdOutLine(gitexe + cmd_commit_short);
var branch = GetFirstStdOutLine(gitexe + cmd_branch);
var rev = GetFirstStdOutLine(gitexe + cmd_rev);
var tag = GetFirstStdOutLine(gitexe + cmd_tag);
var binary_name = "mgba";
var project_name = "mGBA";
if (!rev)
rev = -1;
if (tag)
{
version_string = tag;
}
else if (branch)
{
if (branch == "master")
version_string = rev + "-" + commit_short;
else
version_string = branch + "-" + rev + "-" + commit_short;
if (branch != version_abi)
version_string = version_abi + "-" + version_string;
}
if (!commit)
commit = "(unknown)";
if (!commit_short)
commit_short = "(unknown)";
if (!branch)
branch = "(unknown)";
var out_contents =
"#include <mgba/core/version.h>\n" +
"MGBA_EXPORT const char* const gitCommit = \"" + commit + "\";\n" +
"MGBA_EXPORT const char* const gitCommitShort = \"" + commit_short + "\";\n" +
"MGBA_EXPORT const char* const gitBranch = \"" + branch + "\";\n" +
"MGBA_EXPORT const int gitRevision = " + rev + ";\n" +
"MGBA_EXPORT const char* const binaryName = \"" + binary_name + "\";\n" +
"MGBA_EXPORT const char* const projectName = \"" + project_name + "\";\n" +
"MGBA_EXPORT const char* const projectVersion = \"" + version_string + "\";\n";
// check if file needs updating
if (out_contents == GetFileContents(outfile))
{
WScript.Echo(project_name + ": " + outfile + " current at " + version_string);
}
else
{
// needs updating - writeout current info
oFS.CreateTextFile(outfile, true).Write(out_contents);
WScript.Echo(project_name + ": " + outfile + " updated to " + version_string);
}

1
Externals/mGBA/mgba vendored Submodule

@ -0,0 +1 @@
Subproject commit 9cccc5197ed73ba0a54f584d3121c27dc97405f5

241
Externals/mGBA/mgba.vcxproj vendored Normal file
View File

@ -0,0 +1,241 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\Source\VSProps\Base.Macros.props" />
<Import Project="$(VSPropsDir)Base.Targets.props" />
<PropertyGroup Label="Globals">
<ProjectGuid>{864C4C8E-296D-3DBC-AD83-F1D5CB6E8EC6}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VSPropsDir)Configuration.StaticLibrary.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VSPropsDir)Base.props" />
<Import Project="$(VSPropsDir)ClDisableAllWarnings.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>mgba\include;mgba\src;mgba\src\third-party\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>BUILD_STATIC;M_CORE_GB;M_CORE_GBA;USE_LZMA;_7ZIP_PPMD_SUPPPORT;HAVE_STRDUP;HAVE_SETLOCALE;HAVE_CHMOD;HAVE_UMASK;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<PreBuildEvent>
<Command>"$(CScript)" /nologo /E:JScript "make_version.c.js"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="mgba\src\core\bitmap-cache.c" />
<ClCompile Include="mgba\src\core\cache-set.c">
<ObjectFileName>$(IntDir)/src/core/cache-set.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\core\cheats.c">
<ObjectFileName>$(IntDir)/src/core/cheats.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\core\config.c" />
<ClCompile Include="mgba\src\core\core.c">
<ObjectFileName>$(IntDir)/src/core/core.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\core\directories.c" />
<ClCompile Include="mgba\src\core\input.c">
<ObjectFileName>$(IntDir)/src/core/input.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\core\interface.c" />
<ClCompile Include="mgba\src\core\library.c" />
<ClCompile Include="mgba\src\core\lockstep.c">
<ObjectFileName>$(IntDir)/src/core/lockstep.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\core\log.c" />
<ClCompile Include="mgba\src\core\map-cache.c" />
<ClCompile Include="mgba\src\core\mem-search.c" />
<ClCompile Include="mgba\src\core\rewind.c" />
<ClCompile Include="mgba\src\core\scripting.c" />
<ClCompile Include="mgba\src\core\serialize.c">
<ObjectFileName>$(IntDir)/src/core/serialize.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\core\sync.c" />
<ClCompile Include="mgba\src\core\thread.c" />
<ClCompile Include="mgba\src\core\tile-cache.c" />
<ClCompile Include="mgba\src\core\timing.c" />
<ClCompile Include="mgba\src\sm83\decoder.c">
<ObjectFileName>$(IntDir)/src/sm83/decoder.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\sm83\isa-sm83.c" />
<ClCompile Include="mgba\src\sm83\sm83.c" />
<ClCompile Include="mgba\src\gb\audio.c">
<ObjectFileName>$(IntDir)/src/gb/audio.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gb\cheats.c">
<ObjectFileName>$(IntDir)/src/gb/cheats.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gb\core.c">
<ObjectFileName>$(IntDir)/src/gb/core.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gb\gb.c" />
<ClCompile Include="mgba\src\gb\input.c">
<ObjectFileName>$(IntDir)/src/gb/input.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gb\io.c">
<ObjectFileName>$(IntDir)/src/gb/io.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gb\mbc.c" />
<ClCompile Include="mgba\src\gb\memory.c">
<ObjectFileName>$(IntDir)/src/gb/memory.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gb\overrides.c">
<ObjectFileName>$(IntDir)/src/gb/overrides.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gb\serialize.c">
<ObjectFileName>$(IntDir)/src/gb/serialize.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gb\renderers\cache-set.c">
<ObjectFileName>$(IntDir)/src/gb/renderers/cache-set.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gb\renderers\software.c" />
<ClCompile Include="mgba\src\gb\sio.c">
<ObjectFileName>$(IntDir)/src/gb/sio.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gb\timer.c">
<ObjectFileName>$(IntDir)/src/gb/timer.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gb\video.c">
<ObjectFileName>$(IntDir)/src/gb/video.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\arm\arm.c" />
<ClCompile Include="mgba\src\arm\decoder-arm.c" />
<ClCompile Include="mgba\src\arm\decoder.c">
<ObjectFileName>$(IntDir)/src/arm/decoder.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\arm\decoder-thumb.c" />
<ClCompile Include="mgba\src\arm\isa-arm.c" />
<ClCompile Include="mgba\src\arm\isa-thumb.c" />
<ClCompile Include="mgba\src\gba\audio.c">
<ObjectFileName>$(IntDir)/src/gba/audio.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gba\bios.c" />
<ClCompile Include="mgba\src\gba\cart\ereader.c" />
<ClCompile Include="mgba\src\gba\cart\gpio.c" />
<ClCompile Include="mgba\src\gba\cart\matrix.c" />
<ClCompile Include="mgba\src\gba\cart\vfame.c" />
<ClCompile Include="mgba\src\gba\cheats.c">
<ObjectFileName>$(IntDir)/src/gba/cheats.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gba\cheats\codebreaker.c" />
<ClCompile Include="mgba\src\gba\cheats\gameshark.c" />
<ClCompile Include="mgba\src\gba\cheats\parv3.c" />
<ClCompile Include="mgba\src\gba\core.c">
<ObjectFileName>$(IntDir)/src/gba/core.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gba\dma.c" />
<ClCompile Include="mgba\src\gba\gba.c" />
<ClCompile Include="mgba\src\gba\hle-bios.c" />
<ClCompile Include="mgba\src\gba\input.c">
<ObjectFileName>$(IntDir)/src/gba/input.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gba\io.c">
<ObjectFileName>$(IntDir)/src/gba/io.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gba\memory.c">
<ObjectFileName>$(IntDir)/src/gba/memory.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gba\overrides.c">
<ObjectFileName>$(IntDir)/src/gba/overrides.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gba\renderers\cache-set.c">
<ObjectFileName>$(IntDir)/src/gba/renderers/cache-set.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gba\renderers\common.c" />
<ClCompile Include="mgba\src\gba\renderers\gl.c" />
<ClCompile Include="mgba\src\gba\renderers\software-bg.c" />
<ClCompile Include="mgba\src\gba\renderers\software-mode0.c" />
<ClCompile Include="mgba\src\gba\renderers\software-obj.c" />
<ClCompile Include="mgba\src\gba\renderers\video-software.c" />
<ClCompile Include="mgba\src\gba\savedata.c" />
<ClCompile Include="mgba\src\gba\serialize.c">
<ObjectFileName>$(IntDir)/src/gba/serialize.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gba\sharkport.c" />
<ClCompile Include="mgba\src\gba\sio.c">
<ObjectFileName>$(IntDir)/src/gba/sio.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gba\sio\gbp.c" />
<ClCompile Include="mgba\src\gba\sio\joybus.c" />
<ClCompile Include="mgba\src\gba\timer.c">
<ObjectFileName>$(IntDir)/src/gba/timer.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gba\video.c">
<ObjectFileName>$(IntDir)/src/gba/video.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\util\circle-buffer.c" />
<ClCompile Include="mgba\src\util\configuration.c" />
<ClCompile Include="mgba\src\util\convolve.c" />
<ClCompile Include="mgba\src\util\crc32.c" />
<ClCompile Include="mgba\src\util\elf-read.c" />
<ClCompile Include="mgba\src\util\export.c" />
<ClCompile Include="mgba\src\util\formatting.c" />
<ClCompile Include="mgba\src\util\gbk-table.c" />
<ClCompile Include="mgba\src\util\hash.c" />
<ClCompile Include="mgba\src\util\patch.c" />
<ClCompile Include="mgba\src\util\patch-fast.c" />
<ClCompile Include="mgba\src\util\patch-ips.c" />
<ClCompile Include="mgba\src\util\patch-ups.c" />
<ClCompile Include="mgba\src\util\png-io.c" />
<ClCompile Include="mgba\src\util\ring-fifo.c" />
<ClCompile Include="mgba\src\util\string.c" />
<ClCompile Include="mgba\src\util\table.c" />
<ClCompile Include="mgba\src\util\text-codec.c" />
<ClCompile Include="mgba\src\util\vfs.c" />
<ClCompile Include="version.c" />
<ClCompile Include="mgba\src\util\vfs\vfs-mem.c" />
<ClCompile Include="mgba\src\util\vfs\vfs-fifo.c" />
<ClCompile Include="mgba\src\util\vfs\vfs-fd.c" />
<ClCompile Include="mgba\src\platform\windows\vfs-w32.c" />
<ClCompile Include="mgba\src\platform\windows\memory.c">
<ObjectFileName>$(IntDir)/src/platform/windows/memory.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\third-party\inih\ini.c" />
<ClCompile Include="mgba\src\third-party\blip_buf\blip_buf.c" />
<ClCompile Include="mgba\src\util\vfs\vfs-lzma.c" />
<ClCompile Include="mgba\src\third-party\lzma\7zAlloc.c" />
<ClCompile Include="mgba\src\third-party\lzma\7zArcIn.c" />
<ClCompile Include="mgba\src\third-party\lzma\7zBuf.c" />
<ClCompile Include="mgba\src\third-party\lzma\7zBuf2.c" />
<ClCompile Include="mgba\src\third-party\lzma\7zCrc.c" />
<ClCompile Include="mgba\src\third-party\lzma\7zCrcOpt.c" />
<ClCompile Include="mgba\src\third-party\lzma\7zDec.c" />
<ClCompile Include="mgba\src\third-party\lzma\CpuArch.c" />
<ClCompile Include="mgba\src\third-party\lzma\Delta.c" />
<ClCompile Include="mgba\src\third-party\lzma\LzmaDec.c" />
<ClCompile Include="mgba\src\third-party\lzma\Lzma2Dec.c" />
<ClCompile Include="mgba\src\third-party\lzma\Bra.c" />
<ClCompile Include="mgba\src\third-party\lzma\Bra86.c" />
<ClCompile Include="mgba\src\third-party\lzma\BraIA64.c" />
<ClCompile Include="mgba\src\third-party\lzma\Bcj2.c" />
<ClCompile Include="mgba\src\third-party\lzma\Ppmd7.c" />
<ClCompile Include="mgba\src\third-party\lzma\Ppmd7Dec.c" />
<ClCompile Include="mgba\src\third-party\lzma\7zFile.c" />
<ClCompile Include="mgba\src\third-party\lzma\7zStream.c" />
<ClCompile Include="mgba\src\gba\sio\dolphin.c" />
<ClCompile Include="mgba\src\gba\sio\lockstep.c">
<ObjectFileName>$(IntDir)/src/gba/sio/lockstep.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gb\sio\lockstep.c">
<ObjectFileName>$(IntDir)/src/gb/sio/lockstep.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gb\sio\printer.c" />
<ClCompile Include="mgba\src\gba\extra\audio-mixer.c" />
<ClCompile Include="mgba\src\gba\extra\battlechip.c" />
<ClCompile Include="mgba\src\gba\extra\proxy.c">
<ObjectFileName>$(IntDir)/src/gba/extra/proxy.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\gb\extra\proxy.c">
<ObjectFileName>$(IntDir)/src/gb/extra/proxy.c.obj</ObjectFileName>
</ClCompile>
<ClCompile Include="mgba\src\feature\commandline.c" />
<ClCompile Include="mgba\src\feature\thread-proxy.c" />
<ClCompile Include="mgba\src\feature\video-logger.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

427
Externals/mGBA/mgba.vcxproj.filters vendored Normal file
View File

@ -0,0 +1,427 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="mgba\src\core\bitmap-cache.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\core\cache-set.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\core\cheats.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\core\config.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\core\core.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\core\directories.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\core\input.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\core\interface.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\core\library.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\core\lockstep.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\core\log.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\core\map-cache.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\core\mem-search.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\core\rewind.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\core\scripting.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\core\serialize.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\core\sync.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\core\thread.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\core\tile-cache.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\core\timing.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\sm83\decoder.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\sm83\isa-sm83.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\sm83\sm83.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gb\audio.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gb\cheats.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gb\core.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gb\gb.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gb\input.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gb\io.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gb\mbc.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gb\memory.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gb\overrides.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gb\serialize.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gb\renderers\cache-set.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gb\renderers\software.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gb\sio.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gb\timer.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gb\video.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\arm\arm.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\arm\decoder-arm.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\arm\decoder.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\arm\decoder-thumb.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\arm\isa-arm.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\arm\isa-thumb.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\audio.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\bios.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\cart\ereader.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\cart\gpio.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\cart\matrix.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\cart\vfame.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\cheats.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\cheats\codebreaker.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\cheats\gameshark.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\cheats\parv3.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\core.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\dma.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\gba.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\hle-bios.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\input.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\io.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\memory.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\overrides.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\renderers\cache-set.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\renderers\common.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\renderers\gl.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\renderers\software-bg.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\renderers\software-mode0.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\renderers\software-obj.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\renderers\video-software.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\savedata.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\serialize.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\sharkport.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\sio.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\sio\gbp.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\sio\joybus.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\timer.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\video.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\circle-buffer.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\configuration.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\convolve.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\crc32.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\elf-read.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\export.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\formatting.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\gbk-table.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\hash.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\patch.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\patch-fast.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\patch-ips.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\patch-ups.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\png-io.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\ring-fifo.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\string.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\table.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\text-codec.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\vfs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="version.c">
<Filter>Generated sources</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\vfs\vfs-mem.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\vfs\vfs-fifo.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\vfs\vfs-fd.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\platform\windows\vfs-w32.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\platform\windows\memory.c">
<Filter>Windows-specific code</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\inih\ini.c">
<Filter>Third-party code</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\blip_buf\blip_buf.c">
<Filter>Third-party code</Filter>
</ClCompile>
<ClCompile Include="mgba\src\util\vfs\vfs-lzma.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\lzma\7zAlloc.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\lzma\7zArcIn.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\lzma\7zBuf.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\lzma\7zBuf2.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\lzma\7zCrc.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\lzma\7zCrcOpt.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\lzma\7zDec.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\lzma\CpuArch.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\lzma\Delta.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\lzma\LzmaDec.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\lzma\Lzma2Dec.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\lzma\Bra.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\lzma\Bra86.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\lzma\BraIA64.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\lzma\Bcj2.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\lzma\Ppmd7.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\lzma\Ppmd7Dec.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\lzma\7zFile.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\third-party\lzma\7zStream.c">
<Filter>Virtual files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\sio\dolphin.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\sio\lockstep.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gb\sio\lockstep.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gb\sio\printer.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\extra\audio-mixer.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\extra\battlechip.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gba\extra\proxy.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\gb\extra\proxy.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\feature\commandline.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\feature\thread-proxy.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mgba\src\feature\video-logger.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="Generated sources">
<UniqueIdentifier>{57438DCC-46E8-3FBA-90F2-185F80CEBE2C}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{C0CFD641-7357-3B1D-B2A3-B2477AEF3147}</UniqueIdentifier>
</Filter>
<Filter Include="Third-party code">
<UniqueIdentifier>{6C07F537-79D5-3651-A634-9E523B9936B2}</UniqueIdentifier>
</Filter>
<Filter Include="Virtual files">
<UniqueIdentifier>{AFF59D0C-C624-393F-8703-2FB3784928C8}</UniqueIdentifier>
</Filter>
<Filter Include="Windows-specific code">
<UniqueIdentifier>{37E5D4D5-B263-3B94-8968-21228F26DF67}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

View File

@ -35,10 +35,6 @@
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\VSProps\Base.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros">
<CScript Condition="'$(ProgramFiles(x86))' != ''">%windir%\System32\cscript</CScript>
<CScript Condition="'$(ProgramFiles(x86))' == ''">%windir%\Sysnative\cscript</CScript>
</PropertyGroup>
<!--
OutDir is always created, which is annoying for SCMRevGen as it doesn't really have an outdir.
Here it's redirected to some other place to hide the annoyance.

View File

@ -616,6 +616,11 @@ if(ENABLE_VULKAN)
target_link_libraries(core PUBLIC videovulkan)
endif()
if(USE_MGBA)
target_link_libraries(core PUBLIC mGBA::mgba)
target_compile_definitions(core PUBLIC -DHAS_LIBMGBA)
endif()
if(WIN32)
target_sources(core PRIVATE
HW/EXI/BBA/TAP_Win32.cpp

View File

@ -11,6 +11,8 @@
<ExternalsDir>$(DolphinRootDir)Externals\</ExternalsDir>
<SourceDir>$(DolphinRootDir)Source\</SourceDir>
<CoreDir>$(SourceDir)Core\</CoreDir>
<CScript Condition="'$(ProgramFiles(x86))' != ''">%windir%\System32\cscript</CScript>
<CScript Condition="'$(ProgramFiles(x86))' == ''">%windir%\Sysnative\cscript</CScript>
<VSPropsDir>$(SourceDir)VSProps\</VSPropsDir>
</PropertyGroup>
<PropertyGroup>

View File

@ -30,6 +30,7 @@
<ExternalIncludePath>$(ExternalsDir)libpng;$(ExternalIncludePath)</ExternalIncludePath>
<ExternalIncludePath>$(ExternalsDir)libusb\libusb;$(ExternalIncludePath)</ExternalIncludePath>
<ExternalIncludePath>$(ExternalsDir)LZO;$(ExternalIncludePath)</ExternalIncludePath>
<ExternalIncludePath>$(ExternalsDir)mGBA\mgba\include;$(ExternalIncludePath)</ExternalIncludePath>
<ExternalIncludePath>$(ExternalsDir)miniupnpc\src;$(ExternalIncludePath)</ExternalIncludePath>
<ExternalIncludePath>$(ExternalsDir)minizip;$(ExternalIncludePath)</ExternalIncludePath>
<ExternalIncludePath>$(ExternalsDir)mbedtls\include;$(ExternalIncludePath)</ExternalIncludePath>
@ -76,6 +77,7 @@
<PreprocessorDefinitions>USE_GDBSTUB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Platform)'!='ARM64'">HAS_OPENGL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>HAS_VULKAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>HAS_LIBMGBA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<!--
Make sure we include a clean version of windows.h.
-->

View File

@ -73,6 +73,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblzma", "..\Externals\lib
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zstd", "..\Externals\zstd\zstd.vcxproj", "{1BEA10F3-80CE-4BC4-9331-5769372CDF99}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mgba", "..\Externals\mGBA\mgba.vcxproj", "{864C4C8E-296D-3DBC-AD83-F1D5CB6E8EC6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
@ -349,6 +351,14 @@ Global
{1BEA10F3-80CE-4BC4-9331-5769372CDF99}.Release|ARM64.Build.0 = Release|ARM64
{1BEA10F3-80CE-4BC4-9331-5769372CDF99}.Release|x64.ActiveCfg = Release|x64
{1BEA10F3-80CE-4BC4-9331-5769372CDF99}.Release|x64.Build.0 = Release|x64
{864C4C8E-296D-3DBC-AD83-F1D5CB6E8EC6}.Debug|ARM64.ActiveCfg = Debug|ARM64
{864C4C8E-296D-3DBC-AD83-F1D5CB6E8EC6}.Debug|ARM64.Build.0 = Debug|ARM64
{864C4C8E-296D-3DBC-AD83-F1D5CB6E8EC6}.Debug|x64.ActiveCfg = Debug|x64
{864C4C8E-296D-3DBC-AD83-F1D5CB6E8EC6}.Debug|x64.Build.0 = Debug|x64
{864C4C8E-296D-3DBC-AD83-F1D5CB6E8EC6}.Release|ARM64.ActiveCfg = Release|ARM64
{864C4C8E-296D-3DBC-AD83-F1D5CB6E8EC6}.Release|ARM64.Build.0 = Release|ARM64
{864C4C8E-296D-3DBC-AD83-F1D5CB6E8EC6}.Release|x64.ActiveCfg = Release|x64
{864C4C8E-296D-3DBC-AD83-F1D5CB6E8EC6}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -379,6 +389,7 @@ Global
{1D8C51D2-FFA4-418E-B183-9F42B6A6717E} = {87ADDFF9-5768-4DA2-A33B-2477593D6677}
{055A775F-B4F5-4970-9240-F6CF7661F37B} = {87ADDFF9-5768-4DA2-A33B-2477593D6677}
{1BEA10F3-80CE-4BC4-9331-5769372CDF99} = {87ADDFF9-5768-4DA2-A33B-2477593D6677}
{864C4C8E-296D-3DBC-AD83-F1D5CB6E8EC6} = {87ADDFF9-5768-4DA2-A33B-2477593D6677}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {64B0A343-3B94-4522-9C24-6937FE5EFB22}