Move utility classes from common to own static lib

This commit is contained in:
Connor McLaughlin 2022-07-08 22:43:38 +10:00
parent d2ca454576
commit b7fbde31a7
101 changed files with 371 additions and 282 deletions

View File

@ -14,16 +14,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "src\common\common
{7F909E29-4808-4BD9-A60C-56C51A3AAEC2} = {7F909E29-4808-4BD9-A60C-56C51A3AAEC2}
{43540154-9E1E-409C-834F-B84BE5621388} = {43540154-9E1E-409C-834F-B84BE5621388}
{ED601289-AC1A-46B8-A8ED-17DB9EB73423} = {ED601289-AC1A-46B8-A8ED-17DB9EB73423}
{425D6C99-D1C8-43C2-B8AC-4D7B1D941017} = {425D6C99-D1C8-43C2-B8AC-4D7B1D941017}
{8BDA439C-6358-45FB-9994-2FF083BABE06} = {8BDA439C-6358-45FB-9994-2FF083BABE06}
{7FF9FDB9-D504-47DB-A16A-B08071999620} = {7FF9FDB9-D504-47DB-A16A-B08071999620}
{39F0ADFF-3A84-470D-9CF0-CA49E164F2F3} = {39F0ADFF-3A84-470D-9CF0-CA49E164F2F3}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "src\core\core.vcxproj", "{868B98C8-65A1-494B-8346-250A73A48C0A}"
ProjectSection(ProjectDependencies) = postProject
{EE054E08-3799-4A59-A422-18259C105FFD} = {EE054E08-3799-4A59-A422-18259C105FFD}
{BB08260F-6FBC-46AF-8924-090EE71360C6} = {BB08260F-6FBC-46AF-8924-090EE71360C6}
{57F6206D-F264-4B07-BAF8-11B9BBE1F455} = {57F6206D-F264-4B07-BAF8-11B9BBE1F455}
{8906836E-F06E-46E8-B11A-74E5E8C7B8FB} = {8906836E-F06E-46E8-B11A-74E5E8C7B8FB}
{E4357877-D459-45C7-B8F6-DCBB587BB528} = {E4357877-D459-45C7-B8F6-DCBB587BB528}
{ED601289-AC1A-46B8-A8ED-17DB9EB73423} = {ED601289-AC1A-46B8-A8ED-17DB9EB73423}
@ -101,6 +99,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rainterface", "dep\rainterf
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fmt", "dep\fmt\fmt.vcxproj", "{8BE398E6-B882-4248-9065-FECC8728E038}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util", "src\util\util.vcxproj", "{57F6206D-F264-4B07-BAF8-11B9BBE1F455}"
ProjectSection(ProjectDependencies) = postProject
{EE054E08-3799-4A59-A422-18259C105FFD} = {EE054E08-3799-4A59-A422-18259C105FFD}
{425D6C99-D1C8-43C2-B8AC-4D7B1D941017} = {425D6C99-D1C8-43C2-B8AC-4D7B1D941017}
{39F0ADFF-3A84-470D-9CF0-CA49E164F2F3} = {39F0ADFF-3A84-470D-9CF0-CA49E164F2F3}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
@ -955,6 +960,42 @@ Global
{8BE398E6-B882-4248-9065-FECC8728E038}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64
{8BE398E6-B882-4248-9065-FECC8728E038}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32
{8BE398E6-B882-4248-9065-FECC8728E038}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.Debug|ARM64.ActiveCfg = Debug|ARM64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.Debug|ARM64.Build.0 = Debug|ARM64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.Debug|x64.ActiveCfg = Debug|x64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.Debug|x64.Build.0 = Debug|x64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.Debug|x86.ActiveCfg = Debug|Win32
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.Debug|x86.Build.0 = Debug|Win32
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.DebugFast|ARM64.ActiveCfg = DebugFast|ARM64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.DebugFast|ARM64.Build.0 = DebugFast|ARM64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.DebugFast|x64.ActiveCfg = DebugFast|x64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.DebugFast|x64.Build.0 = DebugFast|x64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.DebugFast|x86.ActiveCfg = DebugFast|Win32
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.DebugFast|x86.Build.0 = DebugFast|Win32
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.DebugUWP|x64.ActiveCfg = DebugUWP|x64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.DebugUWP|x64.Build.0 = DebugUWP|x64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.DebugUWP|x86.Build.0 = DebugUWP|Win32
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.Release|ARM64.ActiveCfg = Release|ARM64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.Release|ARM64.Build.0 = Release|ARM64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.Release|x64.ActiveCfg = Release|x64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.Release|x64.Build.0 = Release|x64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.Release|x86.ActiveCfg = Release|Win32
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.Release|x86.Build.0 = Release|Win32
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.ReleaseLTCG|ARM64.ActiveCfg = ReleaseLTCG|ARM64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.ReleaseLTCG|ARM64.Build.0 = ReleaseLTCG|ARM64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.ReleaseLTCG|x64.ActiveCfg = ReleaseLTCG|x64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.ReleaseLTCG|x64.Build.0 = ReleaseLTCG|x64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.ReleaseLTCG|x86.ActiveCfg = ReleaseLTCG|Win32
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.ReleaseLTCG|x86.Build.0 = ReleaseLTCG|Win32
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32
{57F6206D-F264-4B07-BAF8-11B9BBE1F455}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -1,4 +1,5 @@
add_subdirectory(common)
add_subdirectory(util)
add_subdirectory(core)
add_subdirectory(scmversion)
add_subdirectory(frontend-common)

View File

@ -2,34 +2,12 @@ add_library(common
align.h
assert.cpp
assert.h
audio_stream.cpp
audio_stream.h
bitfield.h
bitutils.h
byte_stream.cpp
byte_stream.h
cd_image.cpp
cd_image.h
cd_image_bin.cpp
cd_image_cue.cpp
cd_image_chd.cpp
cd_image_device.cpp
cd_image_ecm.cpp
cd_image_hasher.cpp
cd_image_hasher.h
cd_image_m3u.cpp
cd_image_memory.cpp
cd_image_mds.cpp
cd_image_pbp.cpp
cd_image_ppf.cpp
cd_subchannel_replacement.cpp
cd_subchannel_replacement.h
cd_xa.cpp
cd_xa.h
crash_handler.cpp
crash_handler.h
cue_parser.cpp
cue_parser.h
dimensional_array.h
error.cpp
error.h
@ -52,10 +30,6 @@ add_library(common
gl/texture.h
hash_combine.h
heap_array.h
iso_reader.cpp
iso_reader.h
jit_code_buffer.cpp
jit_code_buffer.h
log.cpp
log.h
make_array.h
@ -63,23 +37,12 @@ add_library(common
md5_digest.h
minizip_helpers.cpp
minizip_helpers.h
null_audio_stream.cpp
null_audio_stream.h
memory_arena.cpp
memory_arena.h
page_fault_handler.cpp
page_fault_handler.h
path.h
platform.h
pbp_types.h
progress_callback.cpp
progress_callback.h
rectangle.h
scope_guard.h
shiftjis.cpp
shiftjis.h
state_wrapper.cpp
state_wrapper.h
string.cpp
string.h
string_util.cpp
@ -111,8 +74,6 @@ add_library(common
vulkan/texture.h
vulkan/util.cpp
vulkan/util.h
wav_writer.cpp
wav_writer.h
window_info.cpp
window_info.h
)

View File

@ -2,13 +2,13 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)dep\fmt\include;$(SolutionDir)dep\libsamplerate\include;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan\include;$(SolutionDir)dep\libcue\include;$(SolutionDir)dep\libchdr\include;$(SolutionDir)dep\stb\include;$(SolutionDir)dep\glslang;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\minizip\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)dep\fmt\include;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan\include;$(SolutionDir)dep\stb\include;$(SolutionDir)dep\glslang;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\minizip\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>$(RootBuildDir)fmt\fmt.lib;$(RootBuildDir)glad\glad.lib;$(RootBuildDir)glslang\glslang.lib;$(RootBuildDir)libchdr\libchdr.lib;$(RootBuildDir)zlib\zlib.lib;$(RootBuildDir)minizip\minizip.lib;$(RootBuildDir)lzma\lzma.lib;$(RootBuildDir)libsamplerate\libsamplerate.lib;d3dcompiler.lib;d3d11.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>$(RootBuildDir)fmt\fmt.lib;$(RootBuildDir)glad\glad.lib;$(RootBuildDir)glslang\glslang.lib;$(RootBuildDir)zlib\zlib.lib;$(RootBuildDir)minizip\minizip.lib;$(RootBuildDir)lzma\lzma.lib;d3dcompiler.lib;d3d11.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
</Project>

View File

@ -4,14 +4,10 @@
<ItemGroup>
<ClInclude Include="align.h" />
<ClInclude Include="assert.h" />
<ClInclude Include="audio_stream.h" />
<ClInclude Include="bitfield.h" />
<ClInclude Include="bitutils.h" />
<ClInclude Include="byte_stream.h" />
<ClInclude Include="cd_image.h" />
<ClInclude Include="cd_image_hasher.h" />
<ClInclude Include="crash_handler.h" />
<ClInclude Include="cue_parser.h" />
<ClInclude Include="d3d11\shader_cache.h" />
<ClInclude Include="d3d11\shader_compiler.h" />
<ClInclude Include="d3d11\staging_texture.h" />
@ -49,24 +45,16 @@
<ExcludedFromBuild Condition="'$(BuildingForUWP)'=='true'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="image.h" />
<ClInclude Include="iso_reader.h" />
<ClInclude Include="jit_code_buffer.h" />
<ClInclude Include="log.h" />
<ClInclude Include="lru_cache.h" />
<ClInclude Include="make_array.h" />
<ClInclude Include="md5_digest.h" />
<ClInclude Include="null_audio_stream.h" />
<ClInclude Include="path.h" />
<ClInclude Include="pbp_types.h" />
<ClInclude Include="platform.h" />
<ClInclude Include="progress_callback.h" />
<ClInclude Include="memory_arena.h" />
<ClInclude Include="page_fault_handler.h" />
<ClInclude Include="rectangle.h" />
<ClInclude Include="cd_subchannel_replacement.h" />
<ClInclude Include="scope_guard.h" />
<ClInclude Include="shiftjis.h" />
<ClInclude Include="state_wrapper.h" />
<ClInclude Include="string.h" />
<ClInclude Include="string_util.h" />
<ClInclude Include="thirdparty\StackWalker.h">
@ -74,7 +62,6 @@
</ClInclude>
<ClInclude Include="timer.h" />
<ClInclude Include="types.h" />
<ClInclude Include="cd_xa.h" />
<ClInclude Include="minizip_helpers.h" />
<ClInclude Include="vulkan\builders.h" />
<ClInclude Include="vulkan\context.h" />
@ -88,7 +75,6 @@
<ClInclude Include="vulkan\swap_chain.h" />
<ClInclude Include="vulkan\texture.h" />
<ClInclude Include="vulkan\util.h" />
<ClInclude Include="wav_writer.h" />
<ClInclude Include="win32_progress_callback.h">
<ExcludedFromBuild Condition="'$(BuildingForUWP)'=='true'">true</ExcludedFromBuild>
</ClInclude>
@ -97,22 +83,8 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="assert.cpp" />
<ClCompile Include="audio_stream.cpp" />
<ClCompile Include="byte_stream.cpp" />
<ClCompile Include="cd_image.cpp" />
<ClCompile Include="cd_image_bin.cpp" />
<ClCompile Include="cd_image_chd.cpp" />
<ClCompile Include="cd_image_cue.cpp" />
<ClCompile Include="cd_image_device.cpp" />
<ClCompile Include="cd_image_ecm.cpp" />
<ClCompile Include="cd_image_hasher.cpp" />
<ClCompile Include="cd_image_m3u.cpp" />
<ClCompile Include="cd_image_mds.cpp" />
<ClCompile Include="cd_image_memory.cpp" />
<ClCompile Include="cd_image_pbp.cpp" />
<ClCompile Include="crash_handler.cpp" />
<ClCompile Include="cue_parser.cpp" />
<ClCompile Include="cd_image_ppf.cpp" />
<ClCompile Include="d3d11\shader_cache.cpp" />
<ClCompile Include="d3d11\shader_compiler.cpp" />
<ClCompile Include="d3d11\staging_texture.cpp" />
@ -144,19 +116,10 @@
<ExcludedFromBuild Condition="'$(BuildingForUWP)'=='true'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="image.cpp" />
<ClCompile Include="iso_reader.cpp" />
<ClCompile Include="jit_code_buffer.cpp" />
<ClCompile Include="cd_subchannel_replacement.cpp" />
<ClCompile Include="log.cpp" />
<ClCompile Include="md5_digest.cpp" />
<ClCompile Include="minizip_helpers.cpp" />
<ClCompile Include="null_audio_stream.cpp" />
<ClCompile Include="progress_callback.cpp" />
<ClCompile Include="shiftjis.cpp" />
<ClCompile Include="memory_arena.cpp" />
<ClCompile Include="page_fault_handler.cpp" />
<ClCompile Include="state_wrapper.cpp" />
<ClCompile Include="cd_xa.cpp" />
<ClCompile Include="string.cpp" />
<ClCompile Include="string_util.cpp" />
<ClCompile Include="thirdparty\StackWalker.cpp">
@ -174,7 +137,6 @@
<ClCompile Include="vulkan\swap_chain.cpp" />
<ClCompile Include="vulkan\texture.cpp" />
<ClCompile Include="vulkan\util.cpp" />
<ClCompile Include="wav_writer.cpp" />
<ClCompile Include="win32_progress_callback.cpp">
<ExcludedFromBuild Condition="'$(BuildingForUWP)'=='true'">true</ExcludedFromBuild>
</ClCompile>

View File

@ -3,11 +3,7 @@
<ItemGroup>
<ClInclude Include="bitfield.h" />
<ClInclude Include="types.h" />
<ClInclude Include="jit_code_buffer.h" />
<ClInclude Include="state_wrapper.h" />
<ClInclude Include="fifo_queue.h" />
<ClInclude Include="audio_stream.h" />
<ClInclude Include="cd_xa.h" />
<ClInclude Include="heap_array.h" />
<ClInclude Include="gl\program.h">
<Filter>gl</Filter>
@ -31,10 +27,6 @@
<Filter>d3d11</Filter>
</ClInclude>
<ClInclude Include="rectangle.h" />
<ClInclude Include="iso_reader.h" />
<ClInclude Include="cd_image.h" />
<ClInclude Include="cd_subchannel_replacement.h" />
<ClInclude Include="null_audio_stream.h" />
<ClInclude Include="log.h" />
<ClInclude Include="string.h" />
<ClInclude Include="byte_stream.h" />
@ -49,7 +41,6 @@
</ClInclude>
<ClInclude Include="hash_combine.h" />
<ClInclude Include="progress_callback.h" />
<ClInclude Include="wav_writer.h" />
<ClInclude Include="gl\shader_cache.h">
<Filter>gl</Filter>
</ClInclude>
@ -62,7 +53,6 @@
<Filter>gl</Filter>
</ClInclude>
<ClInclude Include="window_info.h" />
<ClInclude Include="cd_image_hasher.h" />
<ClInclude Include="vulkan\texture.h">
<Filter>vulkan</Filter>
</ClInclude>
@ -99,9 +89,6 @@
<ClInclude Include="minizip_helpers.h" />
<ClInclude Include="win32_progress_callback.h" />
<ClInclude Include="make_array.h" />
<ClInclude Include="shiftjis.h" />
<ClInclude Include="memory_arena.h" />
<ClInclude Include="page_fault_handler.h" />
<ClInclude Include="thirdparty\StackWalker.h">
<Filter>thirdparty</Filter>
</ClInclude>
@ -111,7 +98,6 @@
<ClInclude Include="pbp_types.h" />
<ClInclude Include="error.h" />
<ClInclude Include="platform.h" />
<ClInclude Include="cue_parser.h" />
<ClInclude Include="d3d12\staging_texture.h">
<Filter>d3d12</Filter>
</ClInclude>
@ -149,13 +135,6 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="jit_code_buffer.cpp" />
<ClCompile Include="state_wrapper.cpp" />
<ClCompile Include="cd_image.cpp" />
<ClCompile Include="audio_stream.cpp" />
<ClCompile Include="cd_xa.cpp" />
<ClCompile Include="cd_image_cue.cpp" />
<ClCompile Include="cd_image_bin.cpp" />
<ClCompile Include="gl\program.cpp">
<Filter>gl</Filter>
</ClCompile>
@ -177,9 +156,6 @@
<ClCompile Include="d3d11\shader_compiler.cpp">
<Filter>d3d11</Filter>
</ClCompile>
<ClCompile Include="iso_reader.cpp" />
<ClCompile Include="cd_subchannel_replacement.cpp" />
<ClCompile Include="null_audio_stream.cpp" />
<ClCompile Include="string.cpp" />
<ClCompile Include="byte_stream.cpp" />
<ClCompile Include="log.cpp" />
@ -191,9 +167,7 @@
<ClCompile Include="d3d11\shader_cache.cpp">
<Filter>d3d11</Filter>
</ClCompile>
<ClCompile Include="cd_image_chd.cpp" />
<ClCompile Include="progress_callback.cpp" />
<ClCompile Include="wav_writer.cpp" />
<ClCompile Include="gl\shader_cache.cpp">
<Filter>gl</Filter>
</ClCompile>
@ -204,7 +178,6 @@
<ClCompile Include="gl\context.cpp">
<Filter>gl</Filter>
</ClCompile>
<ClCompile Include="cd_image_hasher.cpp" />
<ClCompile Include="vulkan\texture.cpp">
<Filter>vulkan</Filter>
</ClCompile>
@ -236,24 +209,14 @@
<Filter>vulkan</Filter>
</ClCompile>
<ClCompile Include="image.cpp" />
<ClCompile Include="cd_image_memory.cpp" />
<ClCompile Include="minizip_helpers.cpp" />
<ClCompile Include="win32_progress_callback.cpp" />
<ClCompile Include="shiftjis.cpp" />
<ClCompile Include="memory_arena.cpp" />
<ClCompile Include="page_fault_handler.cpp" />
<ClCompile Include="thirdparty\StackWalker.cpp">
<Filter>thirdparty</Filter>
</ClCompile>
<ClCompile Include="crash_handler.cpp" />
<ClCompile Include="cd_image_ecm.cpp" />
<ClCompile Include="cd_image_mds.cpp" />
<ClCompile Include="cd_image_pbp.cpp" />
<ClCompile Include="error.cpp" />
<ClCompile Include="cd_image_m3u.cpp" />
<ClCompile Include="window_info.cpp" />
<ClCompile Include="cue_parser.cpp" />
<ClCompile Include="cd_image_ppf.cpp" />
<ClCompile Include="d3d12\staging_texture.cpp">
<Filter>d3d12</Filter>
</ClCompile>
@ -275,7 +238,6 @@
<ClCompile Include="d3d12\shader_cache.cpp">
<Filter>d3d12</Filter>
</ClCompile>
<ClCompile Include="cd_image_device.cpp" />
<ClCompile Include="http_downloader_winhttp.cpp" />
<ClCompile Include="http_downloader.cpp" />
<ClCompile Include="http_downloader_uwp.cpp" />

View File

@ -120,7 +120,7 @@ set(RECOMPILER_SRCS
target_include_directories(core PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..")
target_include_directories(core PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
target_link_libraries(core PUBLIC Threads::Threads common zlib)
target_link_libraries(core PUBLIC Threads::Threads common util zlib)
target_link_libraries(core PRIVATE glad stb xxhash imgui)
if(WIN32)

View File

@ -1,10 +1,10 @@
#include "analog_controller.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "common/string_util.h"
#include "host_interface.h"
#include "settings.h"
#include "system.h"
#include "util/state_wrapper.h"
#include <cmath>
Log_SetChannel(AnalogController);

View File

@ -1,9 +1,9 @@
#include "analog_joystick.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "common/string_util.h"
#include "host_interface.h"
#include "system.h"
#include "util/state_wrapper.h"
#include <cmath>
Log_SetChannel(AnalogJoystick);

View File

@ -4,7 +4,6 @@
#include "common/assert.h"
#include "common/log.h"
#include "common/make_array.h"
#include "common/state_wrapper.h"
#include "cpu_code_cache.h"
#include "cpu_core.h"
#include "cpu_core_private.h"
@ -18,6 +17,7 @@
#include "sio.h"
#include "spu.h"
#include "timers.h"
#include "util/state_wrapper.h"
#include <cstdio>
#include <tuple>
#include <utility>

View File

@ -1,6 +1,6 @@
#pragma once
#include "common/bitfield.h"
#include "common/memory_arena.h"
#include "util/memory_arena.h"
#include "types.h"
#include <array>
#include <bitset>

View File

@ -1,15 +1,15 @@
#include "cdrom.h"
#include "common/align.h"
#include "common/cd_image.h"
#include "common/log.h"
#include "common/platform.h"
#include "common/state_wrapper.h"
#include "dma.h"
#include "imgui.h"
#include "interrupt_controller.h"
#include "settings.h"
#include "spu.h"
#include "system.h"
#include "util/cd_image.h"
#include "util/state_wrapper.h"
#include <cmath>
Log_SetChannel(CDROM);

View File

@ -1,11 +1,11 @@
#pragma once
#include "cdrom_async_reader.h"
#include "common/bitfield.h"
#include "common/cd_image.h"
#include "common/cd_xa.h"
#include "common/fifo_queue.h"
#include "common/heap_array.h"
#include "types.h"
#include "util/cd_image.h"
#include "util/cd_xa.h"
#include <array>
#include <string>
#include <string_view>

View File

@ -1,5 +1,5 @@
#pragma once
#include "common/cd_image.h"
#include "util/cd_image.h"
#include "types.h"
#include <array>
#include <atomic>

View File

@ -1,13 +1,11 @@
#include "cheevos.h"
#include "common/assert.h"
#include "common/cd_image.h"
#include "common/file_system.h"
#include "common/http_downloader.h"
#include "common/log.h"
#include "common/md5_digest.h"
#include "common/path.h"
#include "common/platform.h"
#include "common/state_wrapper.h"
#include "common/string_util.h"
#include "core/bios.h"
#include "core/bus.h"
@ -20,6 +18,8 @@
#include "rc_url.h"
#include "rcheevos.h"
#include "scmversion/scmversion.h"
#include "util/cd_image.h"
#include "util/state_wrapper.h"
#include <algorithm>
#include <cstdarg>
#include <cstdlib>

View File

@ -1,11 +1,11 @@
#include "controller.h"
#include "analog_controller.h"
#include "analog_joystick.h"
#include "common/state_wrapper.h"
#include "digital_controller.h"
#include "namco_guncon.h"
#include "negcon.h"
#include "playstation_mouse.h"
#include "util/state_wrapper.h"
Controller::Controller() = default;

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\common\common.props" />
<Import Project="..\util\util.props" />
<ItemDefinitionGroup>
<ClCompile>
@ -19,7 +19,7 @@
<ItemDefinitionGroup>
<Lib>
<AdditionalDependencies>$(RootBuildDir)rcheevos\rcheevos.lib;$(RootBuildDir)imgui\imgui.lib;$(RootBuildDir)stb\stb.lib;$(RootBuildDir)xxhash\xxhash.lib;$(RootBuildDir)zlib\zlib.lib;$(RootBuildDir)common\common.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>$(RootBuildDir)rcheevos\rcheevos.lib;$(RootBuildDir)imgui\imgui.lib;$(RootBuildDir)stb\stb.lib;$(RootBuildDir)xxhash\xxhash.lib;$(RootBuildDir)zlib\zlib.lib;$(RootBuildDir)util\util.lib;$(RootBuildDir)common\common.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies Condition="('$(BuildingForUWP)'!='true' And '$(Platform)'!='ARM64')">$(RootBuildDir)rainterface\rainterface.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies Condition="'$(Platform)'=='ARM64'">$(RootBuildDir)vixl\vixl.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>

View File

@ -1,9 +1,9 @@
#pragma once
#include "bus.h"
#include "common/bitfield.h"
#include "common/jit_code_buffer.h"
#include "common/page_fault_handler.h"
#include "cpu_types.h"
#include "util/jit_code_buffer.h"
#include "util/page_fault_handler.h"
#include <array>
#include <map>
#include <memory>
@ -97,10 +97,7 @@ struct CodeBlock
const u32 GetPC() const { return key.GetPC(); }
const u32 GetSizeInBytes() const { return static_cast<u32>(instructions.size()) * sizeof(Instruction); }
const u32 GetStartPageIndex() const { return (key.GetPCPhysicalAddress() / HOST_PAGE_SIZE); }
const u32 GetEndPageIndex() const
{
return ((key.GetPCPhysicalAddress() + GetSizeInBytes()) / HOST_PAGE_SIZE);
}
const u32 GetEndPageIndex() const { return ((key.GetPCPhysicalAddress() + GetSizeInBytes()) / HOST_PAGE_SIZE); }
bool IsInRAM() const
{
// TODO: Constant
@ -125,7 +122,7 @@ void Execute();
#ifdef WITH_RECOMPILER
using DispatcherFunction = void (*)();
using SingleBlockDispatcherFunction = void(*)(const CodeBlock::HostCodePointer);
using SingleBlockDispatcherFunction = void (*)(const CodeBlock::HostCodePointer);
FastMapTable* GetFastMapPointer();
void ExecuteRecompiler();

View File

@ -3,7 +3,6 @@
#include "common/align.h"
#include "common/file_system.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "cpu_core_private.h"
#include "cpu_disasm.h"
#include "cpu_recompiler_thunks.h"
@ -13,6 +12,7 @@
#include "settings.h"
#include "system.h"
#include "timing_event.h"
#include "util/state_wrapper.h"
#include <cstdio>
Log_SetChannel(CPU::Core);

View File

@ -4,7 +4,7 @@
#include <utility>
#include <vector>
#include "common/jit_code_buffer.h"
#include "util/jit_code_buffer.h"
#include "cpu_code_cache.h"
#include "cpu_recompiler_register_cache.h"

View File

@ -1,8 +1,8 @@
#include "digital_controller.h"
#include "common/assert.h"
#include "common/state_wrapper.h"
#include "host_interface.h"
#include "system.h"
#include "util/state_wrapper.h"
DigitalController::DigitalController() = default;

View File

@ -2,7 +2,6 @@
#include "bus.h"
#include "cdrom.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "common/string_util.h"
#include "cpu_code_cache.h"
#include "cpu_core.h"
@ -13,6 +12,7 @@
#include "pad.h"
#include "spu.h"
#include "system.h"
#include "util/state_wrapper.h"
Log_SetChannel(DMA);
static u32 GetAddressMask()

View File

@ -2,7 +2,6 @@
#include "common/file_system.h"
#include "common/heap_array.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "common/string_util.h"
#include "dma.h"
#include "host_display.h"
@ -13,6 +12,7 @@
#include "stb_image_write.h"
#include "system.h"
#include "timers.h"
#include "util/state_wrapper.h"
#include <cmath>
Log_SetChannel(GPU);

View File

@ -1,9 +1,9 @@
#include "gpu_backend.h"
#include "common/align.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "common/timer.h"
#include "settings.h"
#include "util/state_wrapper.h"
Log_SetChannel(GPUBackend);
std::unique_ptr<GPUBackend> g_gpu_backend;

View File

@ -2,13 +2,13 @@
#include "common/align.h"
#include "common/assert.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "cpu_core.h"
#include "gpu_sw_backend.h"
#include "imgui.h"
#include "pgxp.h"
#include "settings.h"
#include "system.h"
#include "util/state_wrapper.h"
#include <cmath>
#include <sstream>
#include <tuple>

View File

@ -2,7 +2,6 @@
#include "common/assert.h"
#include "common/d3d11/shader_compiler.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "common/timer.h"
#include "gpu_hw_shadergen.h"
#include "gpu_sw_backend.h"
@ -10,6 +9,7 @@
#include "host_interface.h"
#include "shader_cache_version.h"
#include "system.h"
#include "util/state_wrapper.h"
Log_SetChannel(GPU_HW_D3D11);
GPU_HW_D3D11::GPU_HW_D3D11() = default;

View File

@ -1,13 +1,13 @@
#include "gpu_hw_opengl.h"
#include "common/assert.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "common/timer.h"
#include "gpu_hw_shadergen.h"
#include "host_display.h"
#include "shader_cache_version.h"
#include "system.h"
#include "texture_replacements.h"
#include "util/state_wrapper.h"
Log_SetChannel(GPU_HW_OpenGL);
GPU_HW_OpenGL::GPU_HW_OpenGL() : GPU_HW() {}

View File

@ -2,7 +2,6 @@
#include "common/assert.h"
#include "common/log.h"
#include "common/scope_guard.h"
#include "common/state_wrapper.h"
#include "common/timer.h"
#include "common/vulkan/builders.h"
#include "common/vulkan/context.h"
@ -12,6 +11,7 @@
#include "host_display.h"
#include "host_interface.h"
#include "system.h"
#include "util/state_wrapper.h"
Log_SetChannel(GPU_HW_Vulkan);
GPU_HW_Vulkan::GPU_HW_Vulkan() = default;

View File

@ -1,7 +1,7 @@
#include "gte.h"
#include "common/assert.h"
#include "common/bitutils.h"
#include "common/state_wrapper.h"
#include "util/state_wrapper.h"
#include "cpu_core.h"
#include "cpu_core_private.h"
#include "host_display.h"

View File

@ -1,7 +1,6 @@
#include "host_interface.h"
#include "bios.h"
#include "cdrom.h"
#include "common/audio_stream.h"
#include "common/byte_stream.h"
#include "common/file_system.h"
#include "common/image.h"
@ -21,6 +20,7 @@
#include "spu.h"
#include "system.h"
#include "texture_replacements.h"
#include "util/audio_stream.h"
#include <cmath>
#include <cstring>
#include <cwchar>

View File

@ -1,7 +1,7 @@
#include "interrupt_controller.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "cpu_core.h"
#include "util/state_wrapper.h"
Log_SetChannel(InterruptController);
InterruptController g_interrupt_controller;

View File

@ -1,11 +1,11 @@
#include "mdec.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "cpu_core.h"
#include "dma.h"
#include "imgui.h"
#include "interrupt_controller.h"
#include "system.h"
#include "util/state_wrapper.h"
Log_SetChannel(MDEC);
MDEC g_mdec;

View File

@ -2,10 +2,10 @@
#include "common/byte_stream.h"
#include "common/file_system.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "common/string_util.h"
#include "host_interface.h"
#include "system.h"
#include "util/state_wrapper.h"
#include <cstdio>
Log_SetChannel(MemoryCard);

View File

@ -3,11 +3,11 @@
#include "common/file_system.h"
#include "common/log.h"
#include "common/path.h"
#include "common/shiftjis.h"
#include "common/state_wrapper.h"
#include "common/string_util.h"
#include "host_interface.h"
#include "system.h"
#include "util/shiftjis.h"
#include "util/state_wrapper.h"
#include <algorithm>
#include <cstdio>
#include <optional>

View File

@ -1,10 +1,10 @@
#include "multitap.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "common/types.h"
#include "controller.h"
#include "memory_card.h"
#include "pad.h"
#include "util/state_wrapper.h"
Log_SetChannel(Multitap);
Multitap::Multitap()

View File

@ -1,8 +1,8 @@
#pragma once
#include "common/state_wrapper.h"
#include "common/types.h"
#include "controller.h"
#include "memory_card.h"
#include "util/state_wrapper.h"
#include <array>
class Multitap final

View File

@ -1,12 +1,12 @@
#include "namco_guncon.h"
#include "common/assert.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "gpu.h"
#include "host_display.h"
#include "host_interface.h"
#include "resources.h"
#include "system.h"
#include "util/state_wrapper.h"
#include <array>
Log_SetChannel(NamcoGunCon);

View File

@ -1,8 +1,8 @@
#include "negcon.h"
#include "common/assert.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "host_interface.h"
#include "util/state_wrapper.h"
#include <array>
#include <cmath>

View File

@ -1,12 +1,12 @@
#include "pad.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "controller.h"
#include "host_interface.h"
#include "interrupt_controller.h"
#include "memory_card.h"
#include "multitap.h"
#include "system.h"
#include "util/state_wrapper.h"
Log_SetChannel(Pad);
Pad g_pad;

View File

@ -1,11 +1,11 @@
#include "playstation_mouse.h"
#include "common/assert.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "gpu.h"
#include "host_display.h"
#include "host_interface.h"
#include "system.h"
#include "util/state_wrapper.h"
#include <array>
Log_SetChannel(PlayStationMouse);

View File

@ -1,10 +1,10 @@
#include "sio.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "controller.h"
#include "host_interface.h"
#include "interrupt_controller.h"
#include "memory_card.h"
#include "util/state_wrapper.h"
Log_SetChannel(SIO);
SIO g_sio;

View File

@ -1,15 +1,15 @@
#include "spu.h"
#include "cdrom.h"
#include "common/audio_stream.h"
#include "common/file_system.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "common/wav_writer.h"
#include "dma.h"
#include "host_interface.h"
#include "imgui.h"
#include "interrupt_controller.h"
#include "system.h"
#include "util/audio_stream.h"
#include "util/state_wrapper.h"
#include "util/wav_writer.h"
Log_SetChannel(SPU);
SPU g_spu;

View File

@ -3,14 +3,11 @@
#include "bus.h"
#include "cdrom.h"
#include "cheats.h"
#include "common/audio_stream.h"
#include "common/error.h"
#include "common/file_system.h"
#include "common/iso_reader.h"
#include "common/log.h"
#include "common/make_array.h"
#include "common/path.h"
#include "common/state_wrapper.h"
#include "common/string_util.h"
#include "controller.h"
#include "cpu_code_cache.h"
@ -34,6 +31,9 @@
#include "spu.h"
#include "texture_replacements.h"
#include "timers.h"
#include "util/audio_stream.h"
#include "util/iso_reader.h"
#include "util/state_wrapper.h"
#include "xxhash.h"
#include <cctype>
#include <cinttypes>

View File

@ -1,10 +1,10 @@
#include "timers.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "gpu.h"
#include "imgui.h"
#include "interrupt_controller.h"
#include "system.h"
#include "util/state_wrapper.h"
Log_SetChannel(Timers);
Timers g_timers;

View File

@ -1,10 +1,10 @@
#include "timing_event.h"
#include "common/assert.h"
#include "common/log.h"
#include "common/state_wrapper.h"
#include "cpu_core.h"
#include "cpu_core_private.h"
#include "system.h"
#include "util/state_wrapper.h"
Log_SetChannel(TimingEvents);
namespace TimingEvents {

View File

@ -1,7 +1,7 @@
#include "audiosettingswidget.h"
#include "common/audio_stream.h"
#include "settingsdialog.h"
#include "settingwidgetbinder.h"
#include "util/audio_stream.h"
#include <cmath>
AudioSettingsWidget::AudioSettingsWidget(QtHostInterface* host_interface, QWidget* parent, SettingsDialog* dialog)

View File

@ -1,9 +1,9 @@
#include "consolesettingswidget.h"
#include "common/cd_image.h"
#include "core/system.h"
#include "qtutils.h"
#include "settingsdialog.h"
#include "settingwidgetbinder.h"
#include "util/cd_image.h"
#include <QtWidgets/QMessageBox>
ConsoleSettingsWidget::ConsoleSettingsWidget(QtHostInterface* host_interface, QWidget* parent, SettingsDialog* dialog)
@ -72,7 +72,8 @@ ConsoleSettingsWidget::ConsoleSettingsWidget(QtHostInterface* host_interface, QW
tr("Selects the percentage of the normal clock speed the emulated hardware will run at."));
dialog->registerWidgetHelp(
m_ui.enable8MBRAM, tr("Enable 8MB RAM (Dev Console)"), tr("Unchecked"),
tr("Enables an additional 6MB of RAM to obtain a total of 2+6 = 8MB, usually present on dev consoles. Games have to use a larger heap size for "
tr("Enables an additional 6MB of RAM to obtain a total of 2+6 = 8MB, usually present on dev consoles. Games have "
"to use a larger heap size for "
"this additional RAM to be usable. Titles which rely on memory mirrors may break, so it should only be used "
"with compatible mods."));
dialog->registerWidgetHelp(

View File

@ -1,6 +1,4 @@
#include "gamepropertiesdialog.h"
#include "common/cd_image.h"
#include "common/cd_image_hasher.h"
#include "common/string_util.h"
#include "core/settings.h"
#include "core/system.h"
@ -11,6 +9,8 @@
#include "qtutils.h"
#include "rapidjson/document.h"
#include "scmversion/scmversion.h"
#include "util/cd_image.h"
#include "util/cd_image_hasher.h"
#include <QtGui/QClipboard>
#include <QtGui/QGuiApplication>
#include <QtWidgets/QFileDialog>

View File

@ -3,7 +3,6 @@
#include "autoupdaterdialog.h"
#include "cheatmanagerdialog.h"
#include "common/assert.h"
#include "common/cd_image.h"
#include "core/host_display.h"
#include "core/settings.h"
#include "core/system.h"
@ -20,6 +19,7 @@
#include "scmversion/scmversion.h"
#include "settingsdialog.h"
#include "settingwidgetbinder.h"
#include "util/cd_image.h"
#ifdef WITH_CHEEVOS
#include "core/cheevos.h"

View File

@ -1,6 +1,5 @@
#include "qthostinterface.h"
#include "common/assert.h"
#include "common/audio_stream.h"
#include "common/byte_stream.h"
#include "common/file_system.h"
#include "common/log.h"
@ -25,6 +24,7 @@
#include "qtdisplaywidget.h"
#include "qtprogresscallback.h"
#include "qtutils.h"
#include "util/audio_stream.h"
#include <QtCore/QCoreApplication>
#include <QtCore/QDateTime>
#include <QtCore/QDebug>

View File

@ -1,6 +1,5 @@
#include "regtest_host_interface.h"
#include "common/assert.h"
#include "common/audio_stream.h"
#include "common/byte_stream.h"
#include "common/file_system.h"
#include "common/log.h"
@ -11,6 +10,7 @@
#include "frontend-common/game_settings.h"
#include "regtest_host_display.h"
#include "scmversion/scmversion.h"
#include "util/audio_stream.h"
#include <cstdio>
Log_SetChannel(RegTestHostInterface);

View File

@ -1,7 +1,6 @@
#include "common_host_interface.h"
#include "IconsFontAwesome5.h"
#include "common/assert.h"
#include "common/audio_stream.h"
#include "common/byte_stream.h"
#include "common/crash_handler.h"
#include "common/file_system.h"
@ -35,6 +34,7 @@
#include "input_overlay_ui.h"
#include "save_state_selector_ui.h"
#include "scmversion/scmversion.h"
#include "util/audio_stream.h"
#include <cmath>
#include <cstdio>
#include <cstring>

View File

@ -1,6 +1,6 @@
#pragma once
#include "common/audio_stream.h"
#include "cubeb/cubeb.h"
#include "util/audio_stream.h"
#include <cstdint>
class CubebAudioStream final : public AudioStream

View File

@ -1,6 +1,6 @@
#pragma once
#include "common/cd_image_hasher.h"
#include "core/types.h"
#include "util/cd_image_hasher.h"
#include <map>
#include <string>
#include <string_view>

View File

@ -1,9 +1,7 @@
#include "game_list.h"
#include "common/assert.h"
#include "common/byte_stream.h"
#include "common/cd_image.h"
#include "common/file_system.h"
#include "common/iso_reader.h"
#include "common/log.h"
#include "common/make_array.h"
#include "common/path.h"
@ -14,6 +12,7 @@
#include "core/psf_loader.h"
#include "core/settings.h"
#include "core/system.h"
#include "util/cd_image.h"
#include <algorithm>
#include <array>
#include <cctype>

View File

@ -1,8 +1,8 @@
#pragma once
#include "common/cd_image.h"
#include "core/types.h"
#include "game_database.h"
#include "game_settings.h"
#include "util/cd_image.h"
#include <ctime>
#include <memory>
#include <optional>

View File

@ -1,5 +1,5 @@
#pragma once
#include "common/audio_stream.h"
#include "util/audio_stream.h"
#include <cstdint>
class SDLAudioStream final : public AudioStream

View File

@ -1,6 +1,6 @@
#pragma once
#include "common/audio_stream.h"
#include "common/windows_headers.h"
#include "util/audio_stream.h"
#include <array>
#include <cstdint>
#include <memory>

45
src/util/CMakeLists.txt Normal file
View File

@ -0,0 +1,45 @@
add_library(util
audio_stream.cpp
audio_stream.h
cd_image.cpp
cd_image.h
cd_image_bin.cpp
cd_image_cue.cpp
cd_image_chd.cpp
cd_image_device.cpp
cd_image_ecm.cpp
cd_image_hasher.cpp
cd_image_hasher.h
cd_image_m3u.cpp
cd_image_memory.cpp
cd_image_mds.cpp
cd_image_pbp.cpp
cd_image_ppf.cpp
cd_subchannel_replacement.cpp
cd_subchannel_replacement.h
cd_xa.cpp
cd_xa.h
cue_parser.cpp
cue_parser.h
iso_reader.cpp
iso_reader.h
jit_code_buffer.cpp
jit_code_buffer.h
null_audio_stream.cpp
null_audio_stream.h
memory_arena.cpp
memory_arena.h
page_fault_handler.cpp
page_fault_handler.h
shiftjis.cpp
shiftjis.h
state_wrapper.cpp
state_wrapper.h
wav_writer.cpp
wav_writer.h
)
target_include_directories(util PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..")
target_include_directories(util PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
target_link_libraries(util PUBLIC common)
target_link_libraries(util PRIVATE libchdr samplerate zlib)

View File

@ -1,6 +1,6 @@
#include "audio_stream.h"
#include "assert.h"
#include "log.h"
#include "common/log.h"
#include "samplerate.h"
#include <algorithm>
#include <cstring>

View File

@ -1,6 +1,6 @@
#pragma once
#include "fifo_queue.h"
#include "types.h"
#include "common/fifo_queue.h"
#include "common/types.h"
#include <atomic>
#include <condition_variable>
#include <memory>

View File

@ -1,9 +1,9 @@
#include "cd_image.h"
#include "assert.h"
#include "file_system.h"
#include "log.h"
#include "path.h"
#include "string_util.h"
#include "common/assert.h"
#include "common/file_system.h"
#include "common/log.h"
#include "common/path.h"
#include "common/string_util.h"
#include <array>
Log_SetChannel(CDImage);

View File

@ -1,7 +1,7 @@
#pragma once
#include "bitfield.h"
#include "progress_callback.h"
#include "types.h"
#include "common/bitfield.h"
#include "common/progress_callback.h"
#include "common/types.h"
#include <array>
#include <memory>
#include <string>

View File

@ -1,8 +1,8 @@
#include "cd_image.h"
#include "cd_subchannel_replacement.h"
#include "error.h"
#include "file_system.h"
#include "log.h"
#include "common/error.h"
#include "common/file_system.h"
#include "common/log.h"
#include <cerrno>
Log_SetChannel(CDImageBin);

View File

@ -2,15 +2,15 @@
#define _CRT_SECURE_NO_WARNINGS
#endif
#include "align.h"
#include "assert.h"
#include "cd_image.h"
#include "cd_subchannel_replacement.h"
#include "error.h"
#include "file_system.h"
#include "common/align.h"
#include "common/assert.h"
#include "common/error.h"
#include "common/file_system.h"
#include "common/log.h"
#include "common/platform.h"
#include "libchdr/chd.h"
#include "log.h"
#include "platform.h"
#include <algorithm>
#include <cerrno>
#include <cstdio>

View File

@ -1,11 +1,11 @@
#include "assert.h"
#include "cd_image.h"
#include "cd_subchannel_replacement.h"
#include "common/assert.h"
#include "common/error.h"
#include "common/file_system.h"
#include "common/log.h"
#include "common/path.h"
#include "cue_parser.h"
#include "error.h"
#include "file_system.h"
#include "log.h"
#include "path.h"
#include <algorithm>
#include <cerrno>
#include <cinttypes>

View File

@ -1,8 +1,8 @@
#include "assert.h"
#include "cd_image.h"
#include "error.h"
#include "log.h"
#include "string_util.h"
#include "common/error.h"
#include "common/log.h"
#include "common/string_util.h"
#include <algorithm>
#include <cerrno>
#include <cinttypes>
@ -57,7 +57,7 @@ static void DeinterleaveSubcode(const u8* subcode_in, u8* subcode_out)
// The include order here is critical.
// clang-format off
#include "windows_headers.h"
#include "common/windows_headers.h"
#include <winioctl.h>
#include <ntddcdrm.h>
#include <ntddscsi.h>

View File

@ -1,9 +1,9 @@
#include "assert.h"
#include "cd_image.h"
#include "cd_subchannel_replacement.h"
#include "error.h"
#include "file_system.h"
#include "log.h"
#include "common/assert.h"
#include "common/error.h"
#include "common/file_system.h"
#include "common/log.h"
#include <array>
#include <cerrno>
#include <map>

View File

@ -1,7 +1,7 @@
#include "cd_image_hasher.h"
#include "cd_image.h"
#include "md5_digest.h"
#include "string_util.h"
#include "common/md5_digest.h"
#include "common/string_util.h"
namespace CDImageHasher {

View File

@ -1,6 +1,6 @@
#pragma once
#include "progress_callback.h"
#include "types.h"
#include "common/progress_callback.h"
#include "common/types.h"
#include <array>
#include <optional>
#include <string>

View File

@ -1,10 +1,10 @@
#include "assert.h"
#include "cd_image.h"
#include "cd_subchannel_replacement.h"
#include "error.h"
#include "file_system.h"
#include "log.h"
#include "path.h"
#include "common/assert.h"
#include "common/error.h"
#include "common/file_system.h"
#include "common/log.h"
#include "common/path.h"
#include <algorithm>
#include <cerrno>
#include <map>

View File

@ -1,10 +1,10 @@
#include "assert.h"
#include "cd_image.h"
#include "cd_subchannel_replacement.h"
#include "error.h"
#include "file_system.h"
#include "log.h"
#include "path.h"
#include "common/error.h"
#include "common/file_system.h"
#include "common/log.h"
#include "common/path.h"
#include <algorithm>
#include <cerrno>
#include <map>

View File

@ -1,9 +1,9 @@
#include "assert.h"
#include "cd_image.h"
#include "cd_subchannel_replacement.h"
#include "file_system.h"
#include "log.h"
#include "path.h"
#include "common/assert.h"
#include "common/file_system.h"
#include "common/log.h"
#include "common/path.h"
#include <algorithm>
#include <cerrno>
Log_SetChannel(CDImageMemory);

View File

@ -1,13 +1,13 @@
#include "assert.h"
#include "cd_image.h"
#include "cd_subchannel_replacement.h"
#include "error.h"
#include "file_system.h"
#include "log.h"
#include "path.h"
#include "common/assert.h"
#include "common/error.h"
#include "common/file_system.h"
#include "common/log.h"
#include "common/path.h"
#include "common/string_util.h"
#include "pbp_types.h"
#include "string.h"
#include "string_util.h"
#include "zlib.h"
#include <array>
#include <cstdio>

View File

@ -1,8 +1,8 @@
#include "assert.h"
#include "cd_image.h"
#include "cd_subchannel_replacement.h"
#include "file_system.h"
#include "log.h"
#include "common/assert.h"
#include "common/file_system.h"
#include "common/log.h"
#include <algorithm>
#include <cerrno>
#include <map>

View File

@ -1,7 +1,7 @@
#include "cd_subchannel_replacement.h"
#include "file_system.h"
#include "log.h"
#include "path.h"
#include "common/file_system.h"
#include "common/log.h"
#include "common/path.h"
#include <algorithm>
#include <memory>
Log_SetChannel(CDSubChannelReplacement);

View File

@ -1,6 +1,6 @@
#pragma once
#include "cd_image.h"
#include "types.h"
#include "common/types.h"
#include <array>
#include <cstdio>
#include <unordered_map>

View File

@ -1,6 +1,6 @@
#pragma once
#include "bitfield.h"
#include "types.h"
#include "common/bitfield.h"
#include "common/types.h"
namespace CDXA {
enum

View File

@ -1,7 +1,7 @@
#include "cue_parser.h"
#include "error.h"
#include "log.h"
#include "string_util.h"
#include "common/error.h"
#include "common/log.h"
#include "common/string_util.h"
#include <cstdarg>
Log_SetChannel(CueParser);

View File

@ -1,6 +1,6 @@
#pragma once
#include "types.h"
#include "cd_image.h"
#include "common/types.h"
#include <optional>
#include <string_view>
#include <utility>

View File

@ -1,6 +1,6 @@
#include "iso_reader.h"
#include "cd_image.h"
#include "log.h"
#include "common/log.h"
#include <cctype>
Log_SetChannel(ISOReader);

View File

@ -1,5 +1,5 @@
#pragma once
#include "types.h"
#include "common/types.h"
#include <memory>
#include <optional>
#include <string>

View File

@ -1,13 +1,13 @@
#include "jit_code_buffer.h"
#include "align.h"
#include "assert.h"
#include "log.h"
#include "platform.h"
#include "common/align.h"
#include "common/assert.h"
#include "common/log.h"
#include "common/platform.h"
#include <algorithm>
Log_SetChannel(JitCodeBuffer);
#if defined(_WIN32)
#include "windows_headers.h"
#include "common/windows_headers.h"
#else
#include <errno.h>
#include <sys/mman.h>

View File

@ -1,5 +1,5 @@
#pragma once
#include "types.h"
#include "common/types.h"
class JitCodeBuffer
{

View File

@ -1,5 +1,5 @@
#pragma once
#include "types.h"
#include "common/types.h"
#include <atomic>
#include <optional>

View File

@ -1,6 +1,6 @@
#include "page_fault_handler.h"
#include "log.h"
#include "platform.h"
#include "common/log.h"
#include "common/platform.h"
#include <algorithm>
#include <cstring>
#include <mutex>
@ -8,7 +8,7 @@
Log_SetChannel(Common::PageFaultHandler);
#if defined(_WIN32)
#include "windows_headers.h"
#include "common/windows_headers.h"
#elif defined(__linux__) || defined(__ANDROID__)
#include <signal.h>
#include <ucontext.h>

View File

@ -1,5 +1,5 @@
#pragma once
#include "types.h"
#include "common/types.h"
namespace Common::PageFaultHandler {
enum class HandlerResult

View File

@ -1,5 +1,5 @@
#pragma once
#include "types.h"
#include "common/types.h"
#include <map>
#include <string>
#include <variant>

View File

@ -1,6 +1,6 @@
#include "state_wrapper.h"
#include "log.h"
#include "string.h"
#include "common/log.h"
#include "common/string.h"
#include <cinttypes>
#include <cstring>
Log_SetChannel(StateWrapper);

View File

@ -1,8 +1,8 @@
#pragma once
#include "byte_stream.h"
#include "fifo_queue.h"
#include "heap_array.h"
#include "types.h"
#include "common/byte_stream.h"
#include "common/fifo_queue.h"
#include "common/heap_array.h"
#include "common/types.h"
#include <cstring>
#include <deque>
#include <string>

16
src/util/util.props Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\common\common.props" />
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)dep\libsamplerate\include;$(SolutionDir)dep\libchdr\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>$(RootBuildDir)libchdr\libchdr.lib;$(RootBuildDir)libsamplerate\libsamplerate.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
</Project>

58
src/util/util.vcxproj Normal file
View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\dep\msvc\vsprops\Configurations.props" />
<ItemGroup>
<ClInclude Include="audio_stream.h" />
<ClInclude Include="cd_image.h" />
<ClInclude Include="cd_image_hasher.h" />
<ClInclude Include="cue_parser.h" />
<ClInclude Include="iso_reader.h" />
<ClInclude Include="jit_code_buffer.h" />
<ClInclude Include="null_audio_stream.h" />
<ClInclude Include="pbp_types.h" />
<ClInclude Include="memory_arena.h" />
<ClInclude Include="page_fault_handler.h" />
<ClInclude Include="cd_subchannel_replacement.h" />
<ClInclude Include="shiftjis.h" />
<ClInclude Include="state_wrapper.h" />
<ClInclude Include="cd_xa.h" />
<ClInclude Include="wav_writer.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="audio_stream.cpp" />
<ClCompile Include="cd_image.cpp" />
<ClCompile Include="cd_image_bin.cpp" />
<ClCompile Include="cd_image_chd.cpp" />
<ClCompile Include="cd_image_cue.cpp" />
<ClCompile Include="cd_image_device.cpp" />
<ClCompile Include="cd_image_ecm.cpp" />
<ClCompile Include="cd_image_hasher.cpp" />
<ClCompile Include="cd_image_m3u.cpp" />
<ClCompile Include="cd_image_mds.cpp" />
<ClCompile Include="cd_image_memory.cpp" />
<ClCompile Include="cd_image_pbp.cpp" />
<ClCompile Include="cue_parser.cpp" />
<ClCompile Include="cd_image_ppf.cpp" />
<ClCompile Include="iso_reader.cpp" />
<ClCompile Include="jit_code_buffer.cpp" />
<ClCompile Include="cd_subchannel_replacement.cpp" />
<ClCompile Include="null_audio_stream.cpp" />
<ClCompile Include="shiftjis.cpp" />
<ClCompile Include="memory_arena.cpp" />
<ClCompile Include="page_fault_handler.cpp" />
<ClCompile Include="state_wrapper.cpp" />
<ClCompile Include="cd_xa.cpp" />
<ClCompile Include="wav_writer.cpp" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{57F6206D-F264-4B07-BAF8-11B9BBE1F455}</ProjectGuid>
</PropertyGroup>
<Import Project="..\..\dep\msvc\vsprops\StaticLibrary.props" />
<Import Project="util.props" />
<ItemDefinitionGroup>
<ClCompile>
<ObjectFileName>$(IntDir)/%(RelativeDir)/</ObjectFileName>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="..\..\dep\msvc\vsprops\Targets.props" />
</Project>

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClInclude Include="jit_code_buffer.h" />
<ClInclude Include="state_wrapper.h" />
<ClInclude Include="audio_stream.h" />
<ClInclude Include="cd_xa.h" />
<ClInclude Include="iso_reader.h" />
<ClInclude Include="cd_image.h" />
<ClInclude Include="cd_subchannel_replacement.h" />
<ClInclude Include="null_audio_stream.h" />
<ClInclude Include="wav_writer.h" />
<ClInclude Include="cd_image_hasher.h" />
<ClInclude Include="shiftjis.h" />
<ClInclude Include="memory_arena.h" />
<ClInclude Include="page_fault_handler.h" />
<ClInclude Include="pbp_types.h" />
<ClInclude Include="cue_parser.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="jit_code_buffer.cpp" />
<ClCompile Include="state_wrapper.cpp" />
<ClCompile Include="cd_image.cpp" />
<ClCompile Include="audio_stream.cpp" />
<ClCompile Include="cd_xa.cpp" />
<ClCompile Include="cd_image_cue.cpp" />
<ClCompile Include="cd_image_bin.cpp" />
<ClCompile Include="iso_reader.cpp" />
<ClCompile Include="cd_subchannel_replacement.cpp" />
<ClCompile Include="null_audio_stream.cpp" />
<ClCompile Include="cd_image_chd.cpp" />
<ClCompile Include="wav_writer.cpp" />
<ClCompile Include="cd_image_hasher.cpp" />
<ClCompile Include="cd_image_memory.cpp" />
<ClCompile Include="shiftjis.cpp" />
<ClCompile Include="memory_arena.cpp" />
<ClCompile Include="page_fault_handler.cpp" />
<ClCompile Include="cd_image_ecm.cpp" />
<ClCompile Include="cd_image_mds.cpp" />
<ClCompile Include="cd_image_pbp.cpp" />
<ClCompile Include="cd_image_m3u.cpp" />
<ClCompile Include="cue_parser.cpp" />
<ClCompile Include="cd_image_ppf.cpp" />
<ClCompile Include="cd_image_device.cpp" />
</ItemGroup>
</Project>

View File

@ -1,6 +1,6 @@
#include "wav_writer.h"
#include "file_system.h"
#include "log.h"
#include "common/file_system.h"
#include "common/log.h"
Log_SetChannel(WAVWriter);
#pragma pack(push, 1)

Some files were not shown because too many files have changed in this diff Show More