Move fileutil, net, image loaders, ui to Common. (#13506)

* Move and rename file_util/fd_util to Common/File/FileUtil and DirListing

Let's also move net while we're at it.

Move the ZIM/PNG loaders over to Common.

Move the UI framework into Common

iOS buildfix

* Buildfix

* Buildfixes

* Apple buildfix

* This typo again..

* UWP buildfix

* Fix build of PPSSPPQt, such as it is (it's not in good condition...)

* Guess what? Another buildfix.
This commit is contained in:
Henrik Rydgård 2020-10-04 20:48:47 +02:00 committed by GitHub
parent f82754e8b4
commit 4f43cff5ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
189 changed files with 1013 additions and 1098 deletions

View File

@ -455,6 +455,12 @@ add_library(Common STATIC
Common/Data/Format/JSONReader.cpp
Common/Data/Format/JSONWriter.h
Common/Data/Format/JSONWriter.cpp
Common/Data/Format/PNGLoad.cpp
Common/Data/Format/PNGLoad.h
Common/Data/Format/ZIMLoad.cpp
Common/Data/Format/ZIMLoad.h
Common/Data/Format/ZIMSave.cpp
Common/Data/Format/ZIMSave.h
Common/Data/Hash/Hash.cpp
Common/Data/Hash/Hash.h
Common/Data/Text/I18n.cpp
@ -472,6 +478,12 @@ add_library(Common STATIC
Common/File/DiskFree.cpp
Common/File/PathBrowser.h
Common/File/PathBrowser.cpp
Common/File/FileUtil.cpp
Common/File/FileUtil.h
Common/File/DirListing.cpp
Common/File/DirListing.h
Common/File/FileDescriptor.cpp
Common/File/FileDescriptor.h
Common/Input/GestureDetector.cpp
Common/Input/GestureDetector.h
Common/Input/KeyCodes.h
@ -491,6 +503,20 @@ add_library(Common STATIC
Common/Math/lin/vec3.h
Common/Math/math_util.cpp
Common/Math/math_util.h
Common/Net/HTTPClient.cpp
Common/Net/HTTPClient.h
Common/Net/HTTPHeaders.cpp
Common/Net/HTTPHeaders.h
Common/Net/HTTPServer.cpp
Common/Net/HTTPServer.h
Common/Net/Resolve.cpp
Common/Net/Resolve.h
Common/Net/Sinks.cpp
Common/Net/Sinks.h
Common/Net/URL.cpp
Common/Net/URL.h
Common/Net/WebsocketServer.cpp
Common/Net/WebsocketServer.h
Common/Profiler/Profiler.cpp
Common/Profiler/Profiler.h
Common/System/Display.cpp
@ -503,6 +529,22 @@ add_library(Common STATIC
Common/Thread/ThreadUtil.h
Common/Thread/ThreadPool.cpp
Common/Thread/ThreadPool.h
Common/UI/Root.cpp
Common/UI/Root.h
Common/UI/Screen.cpp
Common/UI/Screen.h
Common/UI/UI.cpp
Common/UI/UI.h
Common/UI/Context.cpp
Common/UI/Context.h
Common/UI/UIScreen.cpp
Common/UI/UIScreen.h
Common/UI/Tween.cpp
Common/UI/Tween.h
Common/UI/View.cpp
Common/UI/View.h
Common/UI/ViewGroup.cpp
Common/UI/ViewGroup.h
Common/BitScan.h
Common/BitSet.h
Common/Buffer.h
@ -520,8 +562,6 @@ add_library(Common STATIC
Common/FixedSizeQueue.h
Common/ExceptionHandlerSetup.cpp
Common/ExceptionHandlerSetup.h
Common/FileUtil.cpp
Common/FileUtil.h
Common/Hashmaps.h
Common/Log.h
Common/Log.cpp
@ -1011,10 +1051,6 @@ endif()
add_library(native STATIC
${nativeExtra}
ext/native/file/fd_util.cpp
ext/native/file/fd_util.h
ext/native/file/file_util.cpp
ext/native/file/file_util.h
ext/native/gfx/gl_common.h
ext/native/gfx/gl_debug_log.cpp
ext/native/gfx/gl_debug_log.h
@ -1040,46 +1076,10 @@ add_library(native STATIC
ext/native/gfx_es2/glsl_program.h
ext/native/gfx_es2/gl3stub.c
ext/native/gfx_es2/gl3stub.h
ext/native/image/png_load.cpp
ext/native/image/png_load.h
ext/native/image/zim_load.cpp
ext/native/image/zim_load.h
ext/native/image/zim_save.cpp
ext/native/image/zim_save.h
ext/native/net/http_client.cpp
ext/native/net/http_client.h
ext/native/net/http_headers.cpp
ext/native/net/http_headers.h
ext/native/net/http_server.cpp
ext/native/net/http_server.h
ext/native/net/resolve.cpp
ext/native/net/resolve.h
ext/native/net/sinks.cpp
ext/native/net/sinks.h
ext/native/net/url.cpp
ext/native/net/url.h
ext/native/net/websocket_server.cpp
ext/native/net/websocket_server.h
ext/native/thin3d/thin3d.cpp
ext/native/thin3d/thin3d.h
ext/native/thin3d/thin3d_create.h
${THIN3D_PLATFORMS}
ext/native/ui/root.cpp
ext/native/ui/root.h
ext/native/ui/screen.cpp
ext/native/ui/screen.h
ext/native/ui/ui.cpp
ext/native/ui/ui.h
ext/native/ui/ui_context.cpp
ext/native/ui/ui_context.h
ext/native/ui/ui_screen.cpp
ext/native/ui/ui_screen.h
ext/native/ui/ui_tween.cpp
ext/native/ui/ui_tween.h
ext/native/ui/view.cpp
ext/native/ui/view.h
ext/native/ui/viewgroup.cpp
ext/native/ui/viewgroup.h
ext/jpge/jpgd.cpp
ext/jpge/jpgd.h
ext/jpge/jpge.cpp

View File

@ -22,10 +22,11 @@
#if PPSSPP_ARCH(ARM) || PPSSPP_ARCH(ARM64)
#include <ctype.h>
#include "Common.h"
#include "CPUDetect.h"
#include "StringUtils.h"
#include "FileUtil.h"
#include "Common/Common.h"
#include "Common/CPUDetect.h"
#include "Common/StringUtils.h"
#include "Common/File/FileUtil.h"
#include "Common/Data/Encoding/Utf8.h"
#if PPSSPP_PLATFORM(WINDOWS)

View File

@ -17,8 +17,7 @@
#define MSG_NOSIGNAL 0x00
#endif
#include "file/fd_util.h"
#include "Common/File/FileDescriptor.h"
#include "Common/TimeUtil.h"
#include "Common/Buffer.h"
#include "Common/Log.h"

View File

@ -29,11 +29,9 @@
#include <memory.h>
#include <set>
#include "file/file_util.h"
#include "Common/Common.h"
#include "Common/CPUDetect.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/StringUtils.h"
#if defined(_WIN32) && !defined(__MINGW32__)

View File

@ -136,7 +136,7 @@
<PreprocessorDefinitions>_CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_32=1;_M_IX86=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ForcedIncludeFiles>Common/DbgNew.h</ForcedIncludeFiles>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalIncludeDirectories>../ext/native;../ext/snappy;../ext/glslang;../ext;../ext/zlib;..</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>../ext/native;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..</AdditionalIncludeDirectories>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<FloatingPointModel>Precise</FloatingPointModel>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
@ -158,7 +158,7 @@
<ForcedIncludeFiles>Common/DbgNew.h</ForcedIncludeFiles>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PreprocessorDefinitions>_CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_64=1;_M_X64=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../ext/native;../ext/snappy;../ext/glslang;../ext;../ext/zlib;..</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>../ext/native;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..</AdditionalIncludeDirectories>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<FloatingPointModel>Precise</FloatingPointModel>
<OmitFramePointers>false</OmitFramePointers>
@ -181,7 +181,7 @@
<ForcedIncludeFiles>Common/DbgNew.h</ForcedIncludeFiles>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PreprocessorDefinitions>_CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_64=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../ext/native;../ext/snappy;../ext/glslang;../ext;../ext/zlib;..</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>../ext/native;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..</AdditionalIncludeDirectories>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<FloatingPointModel>Precise</FloatingPointModel>
<OmitFramePointers>false</OmitFramePointers>
@ -205,7 +205,7 @@
</ForcedIncludeFiles>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PreprocessorDefinitions>_CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_32=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../ext/native;../ext/snappy;../ext/glslang;../ext;../ext/zlib;..</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>../ext/native;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..</AdditionalIncludeDirectories>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<FloatingPointModel>Precise</FloatingPointModel>
<OmitFramePointers>false</OmitFramePointers>
@ -234,7 +234,7 @@
<BufferSecurityCheck>false</BufferSecurityCheck>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<FloatingPointModel>Precise</FloatingPointModel>
<AdditionalIncludeDirectories>../ext/native;../ext/snappy;../ext/glslang;../ext;../ext/zlib;..</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>../ext/native;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..</AdditionalIncludeDirectories>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
@ -260,7 +260,7 @@
<PreprocessorDefinitions>USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_64=1;_M_X64=1;NDEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ForcedIncludeFiles>
</ForcedIncludeFiles>
<AdditionalIncludeDirectories>../ext/native;../ext/snappy;../ext/glslang;../ext;../ext/zlib;..</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>../ext/native;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..</AdditionalIncludeDirectories>
<BufferSecurityCheck>false</BufferSecurityCheck>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<FloatingPointModel>Precise</FloatingPointModel>
@ -291,7 +291,7 @@
<PreprocessorDefinitions>USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_64=1;NDEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ForcedIncludeFiles>
</ForcedIncludeFiles>
<AdditionalIncludeDirectories>../ext/native;../ext/snappy;../ext/glslang;../ext;../ext/zlib;..</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>../ext/native;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..</AdditionalIncludeDirectories>
<BufferSecurityCheck>false</BufferSecurityCheck>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<FloatingPointModel>Precise</FloatingPointModel>
@ -322,7 +322,7 @@
<PreprocessorDefinitions>USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_32=1;NDEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ForcedIncludeFiles>
</ForcedIncludeFiles>
<AdditionalIncludeDirectories>../ext/native;../ext/snappy;../ext/glslang;../ext;../ext/zlib;..</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>../ext/native;../ext/snappy;../ext/glslang;../ext/libpng17;../ext;../ext/zlib;..</AdditionalIncludeDirectories>
<BufferSecurityCheck>false</BufferSecurityCheck>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<FloatingPointModel>Precise</FloatingPointModel>
@ -371,14 +371,20 @@
<ClInclude Include="Data\Format\IniFile.h" />
<ClInclude Include="Data\Format\JSONReader.h" />
<ClInclude Include="Data\Format\JSONWriter.h" />
<ClInclude Include="Data\Format\PNGLoad.h" />
<ClInclude Include="Data\Format\RIFF.h" />
<ClInclude Include="Data\Format\ZIMLoad.h" />
<ClInclude Include="Data\Format\ZIMSave.h" />
<ClInclude Include="Data\Hash\Hash.h" />
<ClInclude Include="Data\Random\Rng.h" />
<ClInclude Include="Data\Text\I18n.h" />
<ClInclude Include="Data\Text\Parsers.h" />
<ClInclude Include="Data\Text\WrapText.h" />
<ClInclude Include="FakeEmitter.h" />
<ClInclude Include="File\DirListing.h" />
<ClInclude Include="File\DiskFree.h" />
<ClInclude Include="File\FileDescriptor.h" />
<ClInclude Include="File\FileUtil.h" />
<ClInclude Include="File\PathBrowser.h" />
<ClInclude Include="File\VFS\VFS.h" />
<ClInclude Include="File\VFS\AssetReader.h" />
@ -393,6 +399,13 @@
<ClInclude Include="Math\lin\matrix4x4.h" />
<ClInclude Include="Math\lin\vec3.h" />
<ClInclude Include="Math\math_util.h" />
<ClInclude Include="Net\HTTPClient.h" />
<ClInclude Include="Net\HTTPHeaders.h" />
<ClInclude Include="Net\HTTPServer.h" />
<ClInclude Include="Net\Resolve.h" />
<ClInclude Include="Net\Sinks.h" />
<ClInclude Include="Net\URL.h" />
<ClInclude Include="Net\WebsocketServer.h" />
<ClInclude Include="Profiler\Profiler.h" />
<ClInclude Include="Serialize\SerializeDeque.h" />
<ClInclude Include="Serialize\SerializeFuncs.h" />
@ -413,7 +426,6 @@
<ClInclude Include="Crypto\sha256.h" />
<ClInclude Include="DbgNew.h" />
<ClInclude Include="ExceptionHandlerSetup.h" />
<ClInclude Include="FileUtil.h" />
<ClInclude Include="FixedSizeQueue.h" />
<ClInclude Include="GL\GLInterfaceBase.h" />
<ClInclude Include="GL\GLInterface\EGL.h">
@ -463,6 +475,14 @@
<ClInclude Include="Thunk.h" />
<ClInclude Include="Timer.h" />
<ClInclude Include="TimeUtil.h" />
<ClInclude Include="UI\Context.h" />
<ClInclude Include="UI\Root.h" />
<ClInclude Include="UI\Screen.h" />
<ClInclude Include="UI\Tween.h" />
<ClInclude Include="UI\UI.h" />
<ClInclude Include="UI\UIScreen.h" />
<ClInclude Include="UI\View.h" />
<ClInclude Include="UI\ViewGroup.h" />
<ClInclude Include="Vulkan\VulkanContext.h" />
<ClInclude Include="Vulkan\VulkanDebug.h" />
<ClInclude Include="Vulkan\VulkanImage.h" />
@ -655,12 +675,18 @@
<ClCompile Include="Data\Format\IniFile.cpp" />
<ClCompile Include="Data\Format\JSONReader.cpp" />
<ClCompile Include="Data\Format\JSONWriter.cpp" />
<ClCompile Include="Data\Format\PNGLoad.cpp" />
<ClCompile Include="Data\Format\RIFF.cpp" />
<ClCompile Include="Data\Format\ZIMLoad.cpp" />
<ClCompile Include="Data\Format\ZIMSave.cpp" />
<ClCompile Include="Data\Hash\Hash.cpp" />
<ClCompile Include="Data\Text\I18n.cpp" />
<ClCompile Include="Data\Text\Parsers.cpp" />
<ClCompile Include="Data\Text\WrapText.cpp" />
<ClCompile Include="File\DirListing.cpp" />
<ClCompile Include="File\DiskFree.cpp" />
<ClCompile Include="File\FileDescriptor.cpp" />
<ClCompile Include="File\FileUtil.cpp" />
<ClCompile Include="File\PathBrowser.cpp" />
<ClCompile Include="File\VFS\VFS.cpp" />
<ClCompile Include="File\VFS\AssetReader.cpp" />
@ -675,6 +701,13 @@
<ClCompile Include="Math\lin\matrix4x4.cpp" />
<ClCompile Include="Math\lin\vec3.cpp" />
<ClCompile Include="Math\math_util.cpp" />
<ClCompile Include="Net\HTTPClient.cpp" />
<ClCompile Include="Net\HTTPHeaders.cpp" />
<ClCompile Include="Net\HTTPServer.cpp" />
<ClCompile Include="Net\Resolve.cpp" />
<ClCompile Include="Net\Sinks.cpp" />
<ClCompile Include="Net\URL.cpp" />
<ClCompile Include="Net\WebsocketServer.cpp" />
<ClCompile Include="Profiler\Profiler.cpp" />
<ClCompile Include="Serialize\Serializer.cpp" />
<ClCompile Include="ColorConv.cpp" />
@ -684,7 +717,6 @@
<ClCompile Include="Crypto\sha1.cpp" />
<ClCompile Include="Crypto\sha256.cpp" />
<ClCompile Include="ExceptionHandlerSetup.cpp" />
<ClCompile Include="FileUtil.cpp" />
<ClCompile Include="GL\GLInterface\EGL.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
@ -734,6 +766,14 @@
<ClCompile Include="Thunk.cpp" />
<ClCompile Include="Timer.cpp" />
<ClCompile Include="TimeUtil.cpp" />
<ClCompile Include="UI\Context.cpp" />
<ClCompile Include="UI\Root.cpp" />
<ClCompile Include="UI\Screen.cpp" />
<ClCompile Include="UI\Tween.cpp" />
<ClCompile Include="UI\UI.cpp" />
<ClCompile Include="UI\UIScreen.cpp" />
<ClCompile Include="UI\View.cpp" />
<ClCompile Include="UI\ViewGroup.cpp" />
<ClCompile Include="Vulkan\VulkanContext.cpp" />
<ClCompile Include="Vulkan\VulkanDebug.cpp" />
<ClCompile Include="Vulkan\VulkanImage.cpp" />

View File

@ -7,7 +7,6 @@
<ClInclude Include="CommonTypes.h" />
<ClInclude Include="ConsoleListener.h" />
<ClInclude Include="CPUDetect.h" />
<ClInclude Include="FileUtil.h" />
<ClInclude Include="FixedSizeQueue.h" />
<ClInclude Include="Log.h" />
<ClInclude Include="LogManager.h" />
@ -238,12 +237,74 @@
<ClInclude Include="System\NativeApp.h">
<Filter>System</Filter>
</ClInclude>
<ClInclude Include="File\FileUtil.h">
<Filter>File</Filter>
</ClInclude>
<ClInclude Include="File\DirListing.h">
<Filter>File</Filter>
</ClInclude>
<ClInclude Include="File\FileDescriptor.h">
<Filter>File</Filter>
</ClInclude>
<ClInclude Include="Net\HTTPServer.h">
<Filter>Net</Filter>
</ClInclude>
<ClInclude Include="Net\HTTPHeaders.h">
<Filter>Net</Filter>
</ClInclude>
<ClInclude Include="Net\HTTPClient.h">
<Filter>Net</Filter>
</ClInclude>
<ClInclude Include="Net\Resolve.h">
<Filter>Net</Filter>
</ClInclude>
<ClInclude Include="Net\Sinks.h">
<Filter>Net</Filter>
</ClInclude>
<ClInclude Include="Net\URL.h">
<Filter>Net</Filter>
</ClInclude>
<ClInclude Include="Net\WebsocketServer.h">
<Filter>Net</Filter>
</ClInclude>
<ClInclude Include="Data\Format\ZIMLoad.h">
<Filter>Data\Format</Filter>
</ClInclude>
<ClInclude Include="Data\Format\ZIMSave.h">
<Filter>Data\Format</Filter>
</ClInclude>
<ClInclude Include="Data\Format\PNGLoad.h">
<Filter>Data\Format</Filter>
</ClInclude>
<ClInclude Include="UI\Context.h">
<Filter>UI</Filter>
</ClInclude>
<ClInclude Include="UI\Root.h">
<Filter>UI</Filter>
</ClInclude>
<ClInclude Include="UI\Screen.h">
<Filter>UI</Filter>
</ClInclude>
<ClInclude Include="UI\Tween.h">
<Filter>UI</Filter>
</ClInclude>
<ClInclude Include="UI\UI.h">
<Filter>UI</Filter>
</ClInclude>
<ClInclude Include="UI\UIScreen.h">
<Filter>UI</Filter>
</ClInclude>
<ClInclude Include="UI\View.h">
<Filter>UI</Filter>
</ClInclude>
<ClInclude Include="UI\ViewGroup.h">
<Filter>UI</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="ABI.cpp" />
<ClCompile Include="ConsoleListener.cpp" />
<ClCompile Include="CPUDetect.cpp" />
<ClCompile Include="FileUtil.cpp" />
<ClCompile Include="LogManager.cpp" />
<ClCompile Include="MemoryUtil.cpp" />
<ClCompile Include="StringUtils.cpp" />
@ -451,6 +512,69 @@
<ClCompile Include="System\Display.cpp">
<Filter>System</Filter>
</ClCompile>
<ClCompile Include="File\FileUtil.cpp">
<Filter>File</Filter>
</ClCompile>
<ClCompile Include="File\DirListing.cpp">
<Filter>File</Filter>
</ClCompile>
<ClCompile Include="File\FileDescriptor.cpp">
<Filter>File</Filter>
</ClCompile>
<ClCompile Include="Net\HTTPServer.cpp">
<Filter>Net</Filter>
</ClCompile>
<ClCompile Include="Net\HTTPHeaders.cpp">
<Filter>Net</Filter>
</ClCompile>
<ClCompile Include="Net\HTTPClient.cpp">
<Filter>Net</Filter>
</ClCompile>
<ClCompile Include="Net\Resolve.cpp">
<Filter>Net</Filter>
</ClCompile>
<ClCompile Include="Net\Sinks.cpp">
<Filter>Net</Filter>
</ClCompile>
<ClCompile Include="Net\URL.cpp">
<Filter>Net</Filter>
</ClCompile>
<ClCompile Include="Net\WebsocketServer.cpp">
<Filter>Net</Filter>
</ClCompile>
<ClCompile Include="Data\Format\ZIMLoad.cpp">
<Filter>Data\Format</Filter>
</ClCompile>
<ClCompile Include="Data\Format\ZIMSave.cpp">
<Filter>Data\Format</Filter>
</ClCompile>
<ClCompile Include="Data\Format\PNGLoad.cpp">
<Filter>Data\Format</Filter>
</ClCompile>
<ClCompile Include="UI\Context.cpp">
<Filter>UI</Filter>
</ClCompile>
<ClCompile Include="UI\Root.cpp">
<Filter>UI</Filter>
</ClCompile>
<ClCompile Include="UI\Screen.cpp">
<Filter>UI</Filter>
</ClCompile>
<ClCompile Include="UI\Tween.cpp">
<Filter>UI</Filter>
</ClCompile>
<ClCompile Include="UI\UI.cpp">
<Filter>UI</Filter>
</ClCompile>
<ClCompile Include="UI\UIScreen.cpp">
<Filter>UI</Filter>
</ClCompile>
<ClCompile Include="UI\View.cpp">
<Filter>UI</Filter>
</ClCompile>
<ClCompile Include="UI\ViewGroup.cpp">
<Filter>UI</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="Crypto">
@ -528,6 +652,12 @@
<Filter Include="System">
<UniqueIdentifier>{89ddf0bd-3fc4-4a69-87a7-b82cfc412e0a}</UniqueIdentifier>
</Filter>
<Filter Include="Net">
<UniqueIdentifier>{b338dd13-cdae-4ef4-b122-b22967ae9bcb}</UniqueIdentifier>
</Filter>
<Filter Include="UI">
<UniqueIdentifier>{6a61d762-e71c-4428-8cef-c7ddda405ba5}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Text Include="..\ext\libpng17\CMakeLists.txt">

View File

@ -1,4 +1,5 @@
#include "Common/File/VFS/VFS.h"
#include "Common/File/FileUtil.h"
#include "Common/Data/Format/JSONReader.h"
namespace json {

View File

@ -0,0 +1,58 @@
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <png.h>
#include "Common/Data/Format/PNGLoad.h"
#include "Common/Log.h"
// *image_data_ptr should be deleted with free()
// return value of 1 == success.
int pngLoad(const char *file, int *pwidth, int *pheight, unsigned char **image_data_ptr) {
png_image png;
memset(&png, 0, sizeof(png));
png.version = PNG_IMAGE_VERSION;
png_image_begin_read_from_file(&png, file);
if (PNG_IMAGE_FAILED(png))
{
ERROR_LOG(IO, "pngLoad: %s", png.message);
return 0;
}
*pwidth = png.width;
*pheight = png.height;
png.format = PNG_FORMAT_RGBA;
int stride = PNG_IMAGE_ROW_STRIDE(png);
*image_data_ptr = (unsigned char *)malloc(PNG_IMAGE_SIZE(png));
png_image_finish_read(&png, NULL, *image_data_ptr, stride, NULL);
return 1;
}
int pngLoadPtr(const unsigned char *input_ptr, size_t input_len, int *pwidth, int *pheight, unsigned char **image_data_ptr) {
png_image png{};
png.version = PNG_IMAGE_VERSION;
png_image_begin_read_from_memory(&png, input_ptr, input_len);
if (PNG_IMAGE_FAILED(png)) {
ERROR_LOG(IO, "pngLoad: %s", png.message);
return 0;
}
*pwidth = png.width;
*pheight = png.height;
png.format = PNG_FORMAT_RGBA;
int stride = PNG_IMAGE_ROW_STRIDE(png);
size_t size = PNG_IMAGE_SIZE(png);
if (!size) {
ERROR_LOG(IO, "pngLoad: empty image");
return 0;
}
*image_data_ptr = (unsigned char *)malloc(size);
png_image_finish_read(&png, NULL, *image_data_ptr, stride, NULL);
return 1;
}

View File

@ -4,9 +4,9 @@
// *image_data_ptr should be deleted with free()
// return value of 1 == success.
int pngLoad(const char *file, int *pwidth,
int *pheight, unsigned char **image_data_ptr, bool flip);
int *pheight, unsigned char **image_data_ptr);
int pngLoadPtr(const unsigned char *input_ptr, size_t input_len, int *pwidth,
int *pheight, unsigned char **image_data_ptr, bool flip);
int *pheight, unsigned char **image_data_ptr);
#endif // _PNG_LOAD_H

View File

@ -1,13 +1,13 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include "zlib.h"
#include "image/zim_load.h"
#include "Common/Math/math_util.h"
#include "Common/File/VFS/VFS.h"
#include "Common/Log.h"
#include "Common/Data/Format/ZIMLoad.h"
#include "Common/Math/math_util.h"
#include "Common/File/VFS/VFS.h"
int ezuncompress(unsigned char* pDest, long* pnDestLen, const unsigned char* pSrc, long nSrcLen) {
z_stream stream;

View File

@ -2,11 +2,11 @@
#include <cstring>
#include <cmath>
#include "image/zim_load.h"
#include "image/zim_save.h"
#include "zlib.h"
#include "Common/Log.h"
#include "Common/Data/Format/ZIMLoad.h"
#include "Common/Data/Format/ZIMSave.h"
static const char magic[5] = "ZIMG";

View File

@ -4,7 +4,7 @@
#include <cstdint>
// For the type enums etc.
#include "zim_load.h"
#include "Common/Data/Format/ZIMLoad.h"
// SaveZIM's responsibility:
// * Write the ZIM format

View File

@ -18,10 +18,9 @@
#include <sys/stat.h>
#include <ctype.h>
#include "file/file_util.h"
#include "Common/Data/Encoding/Utf8.h"
#include "Common/StringUtils.h"
#include "Common/File/DirListing.h"
#if !defined(__linux__) && !defined(_WIN32) && !defined(__QNX__)
#define stat64 stat
@ -34,134 +33,14 @@
#define fileno
#endif // HAVE_LIBNX
FILE *openCFile(const std::string &filename, const char *mode)
{
#if defined(_WIN32) && defined(UNICODE)
return _wfopen(ConvertUTF8ToWString(filename).c_str(), ConvertUTF8ToWString(mode).c_str());
#else
return fopen(filename.c_str(), mode);
#endif
}
bool writeStringToFile(bool text_file, const std::string &str, const char *filename)
{
FILE *f = openCFile(filename, text_file ? "w" : "wb");
if (!f)
return false;
size_t len = str.size();
if (len != fwrite(str.data(), 1, str.size(), f))
{
fclose(f);
return false;
}
fclose(f);
return true;
}
bool writeDataToFile(bool text_file, const void* data, const unsigned int size, const char *filename)
{
FILE *f = openCFile(filename, text_file ? "w" : "wb");
if (!f)
return false;
size_t len = size;
if (len != fwrite(data, 1, len, f))
{
fclose(f);
return false;
}
fclose(f);
return true;
}
uint64_t GetSize(FILE *f)
{
// This will only support 64-bit when large file support is available.
// That won't be the case on some versions of Android, at least.
#if defined(__ANDROID__) || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS < 64)
int fd = fileno(f);
off64_t pos = lseek64(fd, 0, SEEK_CUR);
off64_t size = lseek64(fd, 0, SEEK_END);
if (size != pos && lseek64(fd, pos, SEEK_SET) != pos) {
// Should error here.
return 0;
}
return size;
#else
#ifdef _WIN32
uint64_t pos = _ftelli64(f);
#else
uint64_t pos = ftello(f);
#endif
if (fseek(f, 0, SEEK_END) != 0) {
return 0;
}
#ifdef _WIN32
uint64_t size = _ftelli64(f);
// Reset the seek position to where it was when we started.
if (size != pos && _fseeki64(f, pos, SEEK_SET) != 0) {
#else
uint64_t size = ftello(f);
// Reset the seek position to where it was when we started.
if (size != pos && fseeko(f, pos, SEEK_SET) != 0) {
#endif
// Should error here.
return 0;
}
return size;
#endif
}
bool readFileToString(bool text_file, const char *filename, std::string &str)
{
FILE *f = openCFile(filename, text_file ? "r" : "rb");
if (!f)
return false;
size_t len = (size_t)GetSize(f);
char *buf = new char[len + 1];
buf[fread(buf, 1, len, f)] = 0;
str = std::string(buf, len);
fclose(f);
delete [] buf;
return true;
}
uint8_t *ReadLocalFile(const char *filename, size_t *size) {
FILE *file = openCFile(filename, "rb");
if (!file) {
*size = 0;
return nullptr;
}
fseek(file, 0, SEEK_END);
size_t f_size = ftell(file);
if ((long)f_size < 0) {
*size = 0;
fclose(file);
return nullptr;
}
fseek(file, 0, SEEK_SET);
uint8_t *contents = new uint8_t[f_size + 1];
if (fread(contents, 1, f_size, file) != f_size) {
delete[] contents;
contents = nullptr;
*size = 0;
} else {
contents[f_size] = 0;
*size = f_size;
}
fclose(file);
return contents;
}
// Returns true if filename is a directory
bool isDirectory(const std::string &filename) {
bool isDirectory(const std::string & filename) {
FileInfo info;
getFileInfo(filename.c_str(), &info);
return info.isDirectory;
}
bool getFileInfo(const char *path, FileInfo *fileInfo) {
bool getFileInfo(const char *path, FileInfo * fileInfo) {
// TODO: Expand relative paths?
fileInfo->fullName = path;
@ -204,17 +83,17 @@ bool getFileInfo(const char *path, FileInfo *fileInfo) {
return true;
}
std::string getFileExtension(const std::string &fn) {
std::string getFileExtension(const std::string & fn) {
int pos = (int)fn.rfind(".");
if (pos < 0) return "";
std::string ext = fn.substr(pos+1);
std::string ext = fn.substr(pos + 1);
for (size_t i = 0; i < ext.size(); i++) {
ext[i] = tolower(ext[i]);
}
return ext;
}
bool FileInfo::operator <(const FileInfo &other) const {
bool FileInfo::operator <(const FileInfo & other) const {
if (isDirectory && !other.isDirectory)
return true;
else if (!isDirectory && other.isDirectory)
@ -225,7 +104,7 @@ bool FileInfo::operator <(const FileInfo &other) const {
return false;
}
size_t getFilesInDir(const char *directory, std::vector<FileInfo> *files, const char *filter, int flags) {
size_t getFilesInDir(const char *directory, std::vector<FileInfo> * files, const char *filter, int flags) {
size_t foundEntries = 0;
std::set<std::string> filters;
if (filter) {
@ -320,7 +199,7 @@ size_t getFilesInDir(const char *directory, std::vector<FileInfo> *files, const
return foundEntries;
}
int64_t getDirectoryRecursiveSize(const std::string &path, const char *filter, int flags) {
int64_t getDirectoryRecursiveSize(const std::string & path, const char *filter, int flags) {
std::vector<FileInfo> fileInfo;
getFilesInDir(path.c_str(), &fileInfo, filter, flags);
int64_t sizeSum = 0;
@ -356,7 +235,7 @@ std::vector<std::string> getWindowsDrives()
str.pop_back(); // we don't want the final backslash
str += "/";
drives.push_back(str);
// advance to next drive
while (*drive++) {}
}

View File

@ -7,14 +7,6 @@
#include <inttypes.h>
// Whole-file reading/writing
bool writeStringToFile(bool text_file, const std::string &str, const char *filename);
bool writeDataToFile(bool text_file, const void* data, const unsigned int size, const char *filename);
bool readFileToString(bool text_file, const char *filename, std::string &str);
// Return value must be delete[]-d.
uint8_t *ReadLocalFile(const char *filename, size_t *size);
// Beginnings of a directory utility system. TODO: Improve.
struct FileInfo {

View File

@ -1,5 +1,4 @@
#include "ppsspp_config.h"
#include "file/fd_util.h"
#include <errno.h>
#include <math.h>
@ -20,6 +19,7 @@
#include "Common/Common.h"
#include "Common/Log.h"
#include "Common/File/FileDescriptor.h"
namespace fd_util {

View File

@ -28,12 +28,12 @@
#include <memory>
#include "Common/Log.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/StringUtils.h"
#include "Common/SysError.h"
#ifdef _WIN32
#include "CommonWindows.h"
#include "Common/CommonWindows.h"
#include <Windows.h>
#include <shlobj.h> // for SHGetFolderPath
#include <shellapi.h>
@ -618,20 +618,43 @@ uint64_t GetFileSize(const std::string &filename) {
#endif
}
// Overloaded GetSize, accepts FILE*
uint64_t GetFileSize(FILE *f) {
// can't use off_t here because it can be 32-bit
uint64_t pos = ftello(f);
if (fseeko(f, 0, SEEK_END) != 0) {
ERROR_LOG(COMMON, "GetSize: seek failed %p: %s", f, GetLastErrorMsg().c_str());
return 0;
}
uint64_t size = ftello(f);
if ((size != pos) && (fseeko(f, pos, SEEK_SET) != 0)) {
ERROR_LOG(COMMON, "GetSize: seek failed %p: %s", f, GetLastErrorMsg().c_str());
uint64_t GetFileSize(FILE *f)
{
// This will only support 64-bit when large file support is available.
// That won't be the case on some versions of Android, at least.
#if defined(__ANDROID__) || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS < 64)
int fd = fileno(f);
off64_t pos = lseek64(fd, 0, SEEK_CUR);
off64_t size = lseek64(fd, 0, SEEK_END);
if (size != pos && lseek64(fd, pos, SEEK_SET) != pos) {
// Should error here.
return 0;
}
return size;
#else
#ifdef _WIN32
uint64_t pos = _ftelli64(f);
#else
uint64_t pos = ftello(f);
#endif
if (fseek(f, 0, SEEK_END) != 0) {
return 0;
}
#ifdef _WIN32
uint64_t size = _ftelli64(f);
// Reset the seek position to where it was when we started.
if (size != pos && _fseeki64(f, pos, SEEK_SET) != 0) {
#else
uint64_t size = ftello(f);
// Reset the seek position to where it was when we started.
if (size != pos && fseeko(f, pos, SEEK_SET) != 0) {
#endif
// Should error here.
return 0;
}
return size;
#endif
}
// creates an empty file filename, returns true on success
@ -955,3 +978,74 @@ bool IOFile::Resize(uint64_t size)
}
} // namespace
bool readFileToString(bool text_file, const char *filename, std::string & str)
{
FILE *f = File::OpenCFile(filename, text_file ? "r" : "rb");
if (!f)
return false;
size_t len = (size_t)File::GetFileSize(f);
char *buf = new char[len + 1];
buf[fread(buf, 1, len, f)] = 0;
str = std::string(buf, len);
fclose(f);
delete[] buf;
return true;
}
uint8_t *ReadLocalFile(const char *filename, size_t * size) {
FILE *file = File::OpenCFile(filename, "rb");
if (!file) {
*size = 0;
return nullptr;
}
fseek(file, 0, SEEK_END);
size_t f_size = ftell(file);
if ((long)f_size < 0) {
*size = 0;
fclose(file);
return nullptr;
}
fseek(file, 0, SEEK_SET);
uint8_t *contents = new uint8_t[f_size + 1];
if (fread(contents, 1, f_size, file) != f_size) {
delete[] contents;
contents = nullptr;
*size = 0;
} else {
contents[f_size] = 0;
*size = f_size;
}
fclose(file);
return contents;
}
bool writeStringToFile(bool text_file, const std::string &str, const char *filename)
{
FILE *f = File::OpenCFile(filename, text_file ? "w" : "wb");
if (!f)
return false;
size_t len = str.size();
if (len != fwrite(str.data(), 1, str.size(), f))
{
fclose(f);
return false;
}
fclose(f);
return true;
}
bool writeDataToFile(bool text_file, const void* data, const unsigned int size, const char *filename)
{
FILE *f = File::OpenCFile(filename, text_file ? "w" : "wb");
if (!f)
return false;
size_t len = size;
if (len != fwrite(data, 1, len, f))
{
fclose(f);
return false;
}
fclose(f);
return true;
}

View File

@ -24,7 +24,7 @@
#include <time.h>
#include <cstdint>
#include "Common.h"
#include "Common/Common.h"
#ifdef _MSC_VER
inline struct tm* localtime_r(const time_t *clock, struct tm *result) {
@ -192,3 +192,13 @@ private:
};
} // namespace
// TODO: Refactor, this was moved from the old file_util.cpp.
// Whole-file reading/writing
bool writeStringToFile(bool text_file, const std::string &str, const char *filename);
bool writeDataToFile(bool text_file, const void* data, const unsigned int size, const char *filename);
bool readFileToString(bool text_file, const char *filename, std::string &str);
// Return value must be delete[]-d.
uint8_t *ReadLocalFile(const char *filename, size_t *size);

View File

@ -2,8 +2,8 @@
#include <cstring>
#include <set>
#include "net/http_client.h"
#include "net/url.h"
#include "Common/Net/HTTPClient.h"
#include "Common/Net/URL.h"
#include "Common/File/PathBrowser.h"
#include "Common/StringUtils.h"

View File

@ -6,9 +6,9 @@
#include <cstring>
#include <thread>
#include <vector>
#include <stdlib.h>
#include <cstdlib>
#include "file/file_util.h"
#include "Common/File/DirListing.h"
// Abstraction above path that lets you navigate easily.
// "/" is a special path that means the root of the file system. On Windows,

View File

@ -9,7 +9,6 @@
#include <string>
#include "Common/File/VFS/VFS.h"
#include "file/file_util.h"
// Direct readers. deallocate using delete [].
uint8_t *ReadLocalFile(const char *filename, size_t *size);

View File

@ -1,7 +1,8 @@
#pragma once
#include <vector>
#include "file/file_util.h"
#include "Common/File/DirListing.h"
// Basic virtual file system. Used to manage assets on Android, where we have to
// read them manually out of the APK zipfile, while being able to run on other

View File

@ -25,7 +25,7 @@
#include "Common/LogManager.h"
#include "Common/ConsoleListener.h"
#include "Common/Timer.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/StringUtils.h"
// Don't need to savestate this.

View File

@ -21,12 +21,6 @@
#include <string>
#include <cstdint>
#include "Common/Log.h"
#include "Common/FileUtil.h"
#include "Common/MemoryUtil.h"
#include "Common/MemArena.h"
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
@ -36,6 +30,11 @@
#include <mach/mach.h>
#include <mach/vm_map.h>
#include "Common/Log.h"
#include "Common/File/FileUtil.h"
#include "Common/MemoryUtil.h"
#include "Common/MemArena.h"
size_t MemArena::roundup(size_t x) {
return x;
}

View File

@ -19,18 +19,17 @@
#if !defined(_WIN32) && !defined(ANDROID) && !defined(__APPLE__)
#include <string>
#include "Common/FileUtil.h"
#include "Common/MemoryUtil.h"
#include "Common/MemArena.h"
#include "Common/Log.h"
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <cerrno>
#include <cstring>
#include <string>
#include "Common/Log.h"
#include "Common/File/FileUtil.h"
#include "Common/MemoryUtil.h"
#include "Common/MemArena.h"
static const std::string tmpfs_location = "/dev/shm";
static const std::string tmpfs_ram_temp_file = "/dev/shm/gc_mem.tmp";

View File

@ -1,4 +1,4 @@
#include "net/http_client.h"
#include "Common/Net/HTTPClient.h"
#include "Common/TimeUtil.h"
#include "Common/StringUtils.h"
@ -20,10 +20,10 @@
#include <cstdio>
#include <cstdlib>
#include "file/fd_util.h"
#include "net/resolve.h"
#include "net/url.h"
#include "Common/Net/Resolve.h"
#include "Common/Net/URL.h"
#include "Common/File/FileDescriptor.h"
#include "Common/Thread/ThreadUtil.h"
#include "Common/Data/Encoding/Compression.h"
#include "Common/Buffer.h"

View File

@ -5,7 +5,7 @@
#include <thread>
#include <cstdint>
#include "net/resolve.h"
#include "Common/Net/Resolve.h"
#ifdef _WIN32
#ifndef NOMINMAX

View File

@ -1,13 +1,13 @@
#include "net/http_headers.h"
#include "Common/Net/HTTPHeaders.h"
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include "file/fd_util.h"
#include "net/sinks.h"
#include "Common/Net/Sinks.h"
#include "Common/Log.h"
#include "Common/File/FileDescriptor.h"
#include "Common/StringUtils.h"
namespace http {

View File

@ -34,9 +34,9 @@
#include <stdio.h>
#include <stdlib.h>
#include "file/fd_util.h"
#include "net/http_server.h"
#include "net/sinks.h"
#include "Common/Net/HTTPServer.h"
#include "Common/Net/Sinks.h"
#include "Common/File/FileDescriptor.h"
#include "Common/Thread/Executor.h"
#include "Common/Buffer.h"

View File

@ -3,8 +3,8 @@
#include <functional>
#include <map>
#include "net/http_headers.h"
#include "net/resolve.h"
#include "Common/Net/HTTPHeaders.h"
#include "Common/Net/Resolve.h"
#include "Common/Thread/Executor.h"
namespace net {

View File

@ -1,5 +1,5 @@
#include "ppsspp_config.h"
#include "net/resolve.h"
#include "Common/Net/Resolve.h"
#include <stdio.h>
#include <stdlib.h>

View File

@ -24,10 +24,10 @@
#include <cerrno>
#include <cstdarg>
#include "net/sinks.h"
#include "file/fd_util.h"
#include "Common/Net/Sinks.h"
#include "Common/Log.h"
#include "Common/File/FileDescriptor.h"
#ifndef MSG_NOSIGNAL
// Default value to 0x00 (do nothing) in systems where it's not supported

View File

@ -1,7 +1,6 @@
#include "net/url.h"
#include "Common/Log.h"
#include "Common/StringUtils.h"
#include "Common/Net/URL.h"
const char *UrlEncoder::unreservedChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.~";
const char *UrlEncoder::hexChars = "0123456789ABCDEF";

View File

@ -16,9 +16,9 @@
#endif
#include "Common/Data/Encoding/Base64.h"
#include "net/http_server.h"
#include "net/sinks.h"
#include "net/websocket_server.h"
#include "Common/Net/HTTPServer.h"
#include "Common/Net/Sinks.h"
#include "Common/Net/WebsocketServer.h"
#include "Common/Crypto/sha1.h"
#include "Common/Log.h"

View File

@ -2,8 +2,9 @@
#include <functional>
#include <string>
#include "net/http_server.h"
#include "net/sinks.h"
#include "Common/Net/HTTPServer.h"
#include "Common/Net/Sinks.h"
namespace net {

View File

@ -21,7 +21,7 @@
#include "Common/Serialize/Serializer.h"
#include "Common/Serialize/SerializeFuncs.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/StringUtils.h"
PointerWrapSection PointerWrap::Section(const char *title, int ver) {

View File

@ -4,9 +4,9 @@
#include "Common/System/Display.h"
#include "Common/System/System.h"
#include "ui/ui.h"
#include "ui/view.h"
#include "ui/ui_context.h"
#include "Common/UI/UI.h"
#include "Common/UI/View.h"
#include "Common/UI/Context.h"
#include "gfx_es2/draw_buffer.h"
#include "gfx_es2/draw_text.h"

View File

@ -3,8 +3,8 @@
#include "ppsspp_config.h"
#include "ui/root.h"
#include "ui/viewgroup.h"
#include "Common/UI/Root.h"
#include "Common/UI/ViewGroup.h"
#include "Common/Log.h"
#include "Common/TimeUtil.h"

View File

@ -2,7 +2,7 @@
#include <functional>
#include "ui/ui_context.h"
#include "Common/UI/Context.h"
#include "Common/Input/InputState.h"
namespace UI {

View File

@ -1,9 +1,9 @@
#include "Common/System/Display.h"
#include "Common/Input/InputState.h"
#include "ui/root.h"
#include "ui/screen.h"
#include "ui/ui.h"
#include "ui/view.h"
#include "Common/UI/Root.h"
#include "Common/UI/Screen.h"
#include "Common/UI/UI.h"
#include "Common/UI/View.h"
#include "Common/Log.h"
#include "Common/TimeUtil.h"

View File

@ -1,7 +1,7 @@
#include "Common/Data/Color/RGBAUtil.h"
#include "ui/ui_tween.h"
#include "ui/view.h"
#include "ui/viewgroup.h"
#include "Common/UI/Tween.h"
#include "Common/UI/View.h"
#include "Common/UI/ViewGroup.h"
namespace UI {

View File

@ -4,7 +4,7 @@
#include <cstdint>
#include <functional>
#include "Common/TimeUtil.h"
#include "ui/view.h"
#include "Common/UI/View.h"
namespace UI {

View File

@ -6,8 +6,8 @@
#include <cstring>
#include "Common/Data/Color/RGBAUtil.h"
#include "ui/ui.h"
#include "ui/ui_context.h"
#include "Common/UI/UI.h"
#include "Common/UI/Context.h"
#include "gfx/texture_atlas.h"
#include "gfx_es2/draw_buffer.h"

View File

@ -6,10 +6,10 @@
#include "Common/Input/InputState.h"
#include "Common/Input/KeyCodes.h"
#include "Common/Math/curves.h"
#include "ui/ui_screen.h"
#include "ui/ui_context.h"
#include "ui/screen.h"
#include "ui/root.h"
#include "Common/UI/UIScreen.h"
#include "Common/UI/Context.h"
#include "Common/UI/Screen.h"
#include "Common/UI/Root.h"
#include "Common/Data/Text/I18n.h"
#include "gfx_es2/draw_buffer.h"

View File

@ -3,8 +3,8 @@
#include <set>
#include "Common/Math/lin/vec3.h"
#include "ui/screen.h"
#include "ui/viewgroup.h"
#include "Common/UI/Screen.h"
#include "Common/UI/ViewGroup.h"
using namespace Lin;

View File

@ -6,11 +6,11 @@
#include "gfx_es2/draw_buffer.h"
#include "gfx/texture_atlas.h"
#include "Common/Data/Encoding/Utf8.h"
#include "ui/ui.h"
#include "ui/view.h"
#include "ui/ui_context.h"
#include "ui/ui_tween.h"
#include "ui/root.h"
#include "Common/UI/UI.h"
#include "Common/UI/View.h"
#include "Common/UI/Context.h"
#include "Common/UI/Tween.h"
#include "Common/UI/Root.h"
#include "thin3d/thin3d.h"
#include "Common/System/System.h"
#include "Common/TimeUtil.h"

View File

@ -5,11 +5,11 @@
#include "Common/Input/KeyCodes.h"
#include "Common/Math/curves.h"
#include "ui/ui_context.h"
#include "ui/ui_tween.h"
#include "ui/root.h"
#include "ui/view.h"
#include "ui/viewgroup.h"
#include "Common/UI/Context.h"
#include "Common/UI/Tween.h"
#include "Common/UI/Root.h"
#include "Common/UI/View.h"
#include "Common/UI/ViewGroup.h"
#include "gfx_es2/draw_buffer.h"
#include "Common/Log.h"

View File

@ -7,7 +7,7 @@
#include "Common/Math/geom2d.h"
#include "Common/Input/GestureDetector.h"
#include "ui/view.h"
#include "Common/UI/View.h"
namespace UI {

View File

@ -23,7 +23,7 @@ extern "C" {
#endif
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/ColorConv.h"
#include "Core/Config.h"

View File

@ -25,8 +25,8 @@
#include "ppsspp_config.h"
#include "gfx_es2/gpu_features.h"
#include "net/http_client.h"
#include "net/url.h"
#include "Common/Net/HTTPClient.h"
#include "Common/Net/URL.h"
#include "Common/Log.h"
#include "Common/Data/Format/IniFile.h"
@ -34,7 +34,7 @@
#include "Common/Data/Text/I18n.h"
#include "Common/Data/Text/Parsers.h"
#include "Common/CPUDetect.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/LogManager.h"
#include "Common/OSVersion.h"
#include "Common/System/Display.h"

View File

@ -5,7 +5,7 @@
#include "Common/StringUtils.h"
#include "Common/Serialize/Serializer.h"
#include "Common/Serialize/SerializeFuncs.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Core/CoreTiming.h"
#include "Core/CoreParameter.h"
#include "Core/CwCheat.h"

View File

@ -36,7 +36,7 @@
#include "Common/CommonTypes.h"
#include "Common/Data/Encoding/Utf8.h"
#include "Common/Log.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/StringUtils.h"
#include "Core/MemMap.h"
#include "Core/Debugger/SymbolMap.h"

View File

@ -16,7 +16,7 @@
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "Common/Data/Encoding/Base64.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Core/Debugger/WebSocket/GPURecordSubscriber.h"
#include "Core/Debugger/WebSocket/WebSocketUtils.h"
#include "Core/System.h"

View File

@ -21,11 +21,10 @@
#include <string>
#include "net/websocket_server.h"
#include "Common/Log.h"
#include "Common/Data/Format/JSONReader.h"
#include "Common/Data/Format/JSONWriter.h"
#include "Common/Net/WebsocketServer.h"
#if PPSSPP_PLATFORM(UWP)
// Enum name overlapped with UWP macro, quick hack to disable it

View File

@ -24,7 +24,7 @@
#include "Common/Data/Text/I18n.h"
#include "Common/Thread/ThreadUtil.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/Serialize/Serializer.h"
#include "Common/Serialize/SerializeFuncs.h"
#include "Common/StringUtils.h"

View File

@ -15,8 +15,9 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "Common/Data/Text/I18n.h"
#include "Common/Log.h"
#include "Common/Data/Text/I18n.h"
#include "Common/Data/Format/ZIMLoad.h"
#include "Common/Serialize/Serializer.h"
#include "Common/Serialize/SerializeFuncs.h"
#include "Common/StringUtils.h"
@ -34,8 +35,6 @@
#include "Core/HW/MemoryStick.h"
#include "Core/Util/PPGeDraw.h"
#include "image/png_load.h"
#include <algorithm>
static const std::string ICON0_FILENAME = "ICON0.PNG";

View File

@ -20,7 +20,7 @@
#include <cstring>
#include "Common/Log.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Core/Loaders.h"
#include "Core/ELF/PBPReader.h"

View File

@ -15,17 +15,18 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "ppsspp_config.h"
#include <algorithm>
#include <cstddef>
#include <set>
#include <mutex>
#include <cstring>
#include "ppsspp_config.h"
#include "file/file_util.h"
#include "Common/Data/Encoding/Utf8.h"
#include "Common/File/DiskFree.h"
#include "Common/FileUtil.h"
#include "Common/File/DirListing.h"
#include "Common/File/FileUtil.h"
#include "Common/Log.h"
#include "Common/CommonWindows.h"
#include "Core/FileLoaders/DiskCachingFileLoader.h"

View File

@ -20,9 +20,9 @@
#include <mutex>
#include <vector>
#include "net/http_client.h"
#include "net/resolve.h"
#include "net/url.h"
#include "Common/Net/HTTPClient.h"
#include "Common/Net/Resolve.h"
#include "Common/Net/URL.h"
#include "Common/CommonTypes.h"
#include "Core/Loaders.h"

View File

@ -19,10 +19,10 @@
#include "ppsspp_config.h"
#include "file/file_util.h"
#include "Common/Data/Encoding/Utf8.h"
#include "Common/Log.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/File/DirListing.h"
#include "Core/FileLoaders/LocalFileLoader.h"
#ifdef _WIN32

View File

@ -20,7 +20,7 @@
#include <algorithm>
#include "Common/Data/Text/I18n.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/Log.h"
#include "Common/Swap.h"
#include "Core/Loaders.h"

View File

@ -25,7 +25,7 @@
#include "Common/Serialize/Serializer.h"
#include "Common/Serialize/SerializeFuncs.h"
#include "Common/StringUtils.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/File/DiskFree.h"
#include "Common/File/VFS/VFS.h"
#include "Core/FileSystems/DirectoryFileSystem.h"

View File

@ -17,7 +17,7 @@
#include "ppsspp_config.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/StringUtils.h"
#include "Common/Serialize/Serializer.h"
#include "Common/Serialize/SerializeFuncs.h"

View File

@ -16,9 +16,10 @@
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include <set>
#include "file/file_util.h"
#include "Common/Data/Format/IniFile.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/File/DirListing.h"
#include "Common/Serialize/SerializeFuncs.h"
#include "Core/Config.h"
#include "Core/MemMap.h"

View File

@ -41,7 +41,7 @@
#include <thread>
#include <mutex>
#include "net/resolve.h"
#include "Common/Net/Resolve.h"
#include "Common/Serialize/Serializer.h"
#include "Core/Config.h"

View File

@ -52,7 +52,7 @@
#include "Common/Data/Text/I18n.h"
#include "Common/Thread/ThreadUtil.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/TimeUtil.h"
#include "Core/Util/PortManager.h"
#include "Core/Core.h"

View File

@ -19,7 +19,7 @@
#include "Core/HLE/FunctionWrappers.h"
#include "Core/HLE/sceHttp.h"
#include "net/http_client.h"
#include "Common/Net/HTTPClient.h"
// If http isn't loaded (seems unlikely), most functions should return SCE_KERNEL_ERROR_LIBRARY_NOTFOUND

View File

@ -22,7 +22,7 @@
#include "Common/Thread/ThreadUtil.h"
#include "Common/Profiler/Profiler.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/Serialize/SerializeFuncs.h"
#include "Common/Serialize/SerializeMap.h"
#include "Common/Serialize/SerializeSet.h"

View File

@ -24,7 +24,7 @@
#include "Common/Serialize/Serializer.h"
#include "Common/Serialize/SerializeFuncs.h"
#include "Common/Serialize/SerializeSet.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/StringUtils.h"
#include "Core/Config.h"
#include "Core/Core.h"

View File

@ -22,7 +22,7 @@
#include <fcntl.h>
#endif
#include "net/resolve.h"
#include "Common/Net/Resolve.h"
#include "Common/Data/Text/Parsers.h"
#include "Common/Serialize/Serializer.h"

View File

@ -25,7 +25,7 @@
#include "Core/HLE/scePauth.h"
#include "Core/HLE/HLE.h"
#include "Core/HLE/FunctionWrappers.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
static int scePauth_F7AA47F6(u32 srcPtr, int srcLength, u32 destLengthPtr, u32 workArea)
{

View File

@ -17,8 +17,6 @@
#include <vector>
#include "file/file_util.h"
#include "Common/Serialize/Serializer.h"
#include "Common/Serialize/SerializeFuncs.h"
#include "Common/Serialize/SerializeMap.h"

View File

@ -18,10 +18,8 @@
#include <algorithm>
#include <cstdio>
#include "file/file_util.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/StringUtils.h"
#include "Core/FileLoaders/CachingFileLoader.h"
#include "Core/FileLoaders/DiskCachingFileLoader.h"
#include "Core/FileLoaders/HTTPFileLoader.h"

View File

@ -24,7 +24,7 @@
#include "ext/cityhash/city.h"
#include "ext/xxhash.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/Log.h"
#include "Common/TimeUtil.h"
#include "Core/Config.h"

View File

@ -17,11 +17,10 @@
#include <thread>
#include "file/file_util.h"
#include "Common/Data/Encoding/Utf8.h"
#include "Common/Thread/ThreadUtil.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/StringUtils.h"
#ifdef _WIN32
#include "Common/CommonWindows.h"

View File

@ -21,7 +21,7 @@
#include "Common/Common.h"
#include "Common/Log.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/StringUtils.h"
#include "Core/Replay.h"
#include "Core/FileSystems/FileSystem.h"

View File

@ -26,7 +26,7 @@
#include "Core/Reporting.h"
#include "Common/File/VFS/VFS.h"
#include "Common/CPUDetect.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/Serialize/SerializeFuncs.h"
#include "Common/StringUtils.h"
#include "Core/Core.h"
@ -44,10 +44,9 @@
#include "Core/ELF/ParamSFO.h"
#include "GPU/GPUInterface.h"
#include "GPU/GPUState.h"
#include "net/http_client.h"
#include "net/resolve.h"
#include "net/url.h"
#include "file/file_util.h"
#include "Common/Net/HTTPClient.h"
#include "Common/Net/Resolve.h"
#include "Common/Net/URL.h"
#include "Common/Thread/ThreadUtil.h"
namespace Reporting

View File

@ -24,7 +24,7 @@
#include "Common/Thread/ThreadUtil.h"
#include "Common/Data/Text/Parsers.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/Serialize/Serializer.h"
#include "Common/Serialize/SerializeFuncs.h"
#include "Common/StringUtils.h"

View File

@ -26,7 +26,7 @@
#endif
#include "Common/ColorConv.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/Log.h"
#include "Core/Config.h"
#include "Core/Screenshot.h"

View File

@ -37,7 +37,7 @@
#include "Common/Thread/ThreadUtil.h"
#include "Common/Data/Encoding/Utf8.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/TimeUtil.h"
#include "Common/GraphicsContext.h"
#include "Core/MemFault.h"

View File

@ -28,7 +28,7 @@
#include "Common/Data/Format/IniFile.h"
#include "Common/Data/Text/Parsers.h"
#include "Common/ColorConv.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/StringUtils.h"
#include "Core/Config.h"
#include "Core/Host.h"

View File

@ -23,7 +23,6 @@
#include <sstream>
#include <thread>
#include "file/file_util.h"
#ifdef SHARED_LIBZIP
#include <zip.h>
#else
@ -31,9 +30,8 @@
#endif
#include "Common/Data/Encoding/Utf8.h"
#include "Common/Data/Format/IniFile.h"
#include "Common/Log.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/StringUtils.h"
#include "Core/Config.h"
#include "Core/Loaders.h"

View File

@ -23,7 +23,7 @@
#pragma once
#include <thread>
#include "net/http_client.h"
#include "Common/Net/HTTPClient.h"
enum class GameManagerState {
IDLE,

View File

@ -17,14 +17,14 @@
#include <algorithm>
#include "Common/Data/Color/RGBAUtil.h"
#include "Common/File/VFS/VFS.h"
#include "gfx/texture_atlas.h"
#include "gfx_es2/draw_text.h"
#include "image/zim_load.h"
#include "image/png_load.h"
#include "Common/Data/Encoding/Utf8.h"
#include "Common/Data/Color/RGBAUtil.h"
#include "Common/File/VFS/VFS.h"
#include "Common/Data/Format/ZIMLoad.h"
#include "Common/Data/Format/PNGLoad.h"
#include "Common/Data/Encoding/Utf8.h"
#include "Common/Serialize/Serializer.h"
#include "Common/Serialize/SerializeFuncs.h"
#include "Common/StringUtils.h"
@ -1202,7 +1202,7 @@ bool PPGeImage::Load() {
unsigned char *textureData;
int success;
if (filename_.empty()) {
success = pngLoadPtr(Memory::GetPointer(png_), size_, &width_, &height_, &textureData, false);
success = pngLoadPtr(Memory::GetPointer(png_), size_, &width_, &height_, &textureData);
} else {
std::vector<u8> pngData;
if (pspFileSystem.ReadEntireFile(filename_, pngData) < 0) {
@ -1210,7 +1210,7 @@ bool PPGeImage::Load() {
return false;
}
success = pngLoadPtr((const unsigned char *)&pngData[0], pngData.size(), &width_, &height_, &textureData, false);
success = pngLoadPtr((const unsigned char *)&pngData[0], pngData.size(), &width_, &height_, &textureData);
}
if (!success) {
WARN_LOG(SCEGE, "Bad PPGeImage - not a valid png");

View File

@ -31,7 +31,7 @@
#include <thread>
#include "Common/TimeUtil.h"
#include "Common/Data/Text/I18n.h"
#include "net/resolve.h"
#include "Common/Net/Resolve.h"
#include "Common/Thread/ThreadUtil.h"
#include "Common/Log.h"
#include "Core/System.h"

View File

@ -16,7 +16,7 @@
#include <string>
#include <cstdint>
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
class WaveFileWriter
{

View File

@ -19,13 +19,13 @@
#include <mutex>
#include <thread>
#include "file/fd_util.h"
#include "net/http_client.h"
#include "net/http_server.h"
#include "net/sinks.h"
#include "Common/Net/HTTPClient.h"
#include "Common/Net/HTTPServer.h"
#include "Common/Net/Sinks.h"
#include "Common/Thread/ThreadUtil.h"
#include "Common/Log.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/File/FileDescriptor.h"
#include "Common/TimeUtil.h"
#include "Common/StringUtils.h"
#include "Core/Config.h"

View File

@ -23,7 +23,8 @@
#include <algorithm>
#include "Common/Data/Format/IniFile.h"
#include "file/file_util.h"
#include "Common/File/FileUtil.h"
#include "Common/File/DirListing.h"
#include "Common/File/VFS/VFS.h"
#include "gfx_es2/gpu_features.h"

View File

@ -23,7 +23,7 @@
#include <snappy-c.h>
#include "Common/Common.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/Log.h"
#include "Common/StringUtils.h"

View File

@ -20,7 +20,7 @@
#include "Common/Log.h"
#include "Common/Serialize/Serializer.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/GraphicsContext.h"
#include "Core/Config.h"

View File

@ -34,7 +34,7 @@
#include "thin3d/GLRenderManager.h"
#include "Common/Log.h"
#include "Common/FileUtil.h"
#include "Common/File/FileUtil.h"
#include "Common/TimeUtil.h"
#include "Core/Config.h"
#include "Core/Host.h"

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