mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-27 02:10:34 +00:00
Get things building on Windows ARM.
Add simple emulation of Tls* API on Windows Phone.
This commit is contained in:
parent
792dd1557c
commit
0bd43b242d
@ -208,7 +208,6 @@
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\Common\ABI.h" />
|
||||
<ClInclude Include="..\..\Common\Arm64Emitter.h" />
|
||||
<ClInclude Include="..\..\Common\ArmABI.h" />
|
||||
<ClInclude Include="..\..\Common\ArmCommon.h" />
|
||||
<ClInclude Include="..\..\Common\ArmEmitter.h" />
|
||||
<ClInclude Include="..\..\Common\Atomics.h" />
|
||||
@ -256,7 +255,6 @@
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\Common\ABI.cpp" />
|
||||
<ClCompile Include="..\..\Common\Arm64Emitter.cpp" />
|
||||
<ClCompile Include="..\..\Common\ArmABI.cpp" />
|
||||
<ClCompile Include="..\..\Common\ArmCPUDetect.cpp" />
|
||||
<ClCompile Include="..\..\Common\ArmEmitter.cpp" />
|
||||
<ClCompile Include="..\..\Common\ChunkFile.cpp" />
|
||||
|
@ -9,7 +9,6 @@
|
||||
<ClCompile Include="pch.cpp" />
|
||||
<ClCompile Include="..\..\Common\ABI.cpp" />
|
||||
<ClCompile Include="..\..\Common\Arm64Emitter.cpp" />
|
||||
<ClCompile Include="..\..\Common\ArmABI.cpp" />
|
||||
<ClCompile Include="..\..\Common\ArmCPUDetect.cpp" />
|
||||
<ClCompile Include="..\..\Common\ArmEmitter.cpp" />
|
||||
<ClCompile Include="..\..\Common\ChunkFile.cpp" />
|
||||
@ -52,7 +51,6 @@
|
||||
<ClInclude Include="targetver.h" />
|
||||
<ClInclude Include="..\..\Common\ABI.h" />
|
||||
<ClInclude Include="..\..\Common\Arm64Emitter.h" />
|
||||
<ClInclude Include="..\..\Common\ArmABI.h" />
|
||||
<ClInclude Include="..\..\Common\ArmCommon.h" />
|
||||
<ClInclude Include="..\..\Common\ArmEmitter.h" />
|
||||
<ClInclude Include="..\..\Common\Atomic_GCC.h" />
|
||||
|
@ -275,7 +275,6 @@
|
||||
<ClInclude Include="..\..\ext\native\net\resolve.h" />
|
||||
<ClInclude Include="..\..\ext\native\net\sinks.h" />
|
||||
<ClInclude Include="..\..\ext\native\net\url.h" />
|
||||
<ClInclude Include="..\..\ext\native\thin3d\d3d11_loader.h" />
|
||||
<ClInclude Include="..\..\ext\native\thin3d\thin3d.h" />
|
||||
<ClInclude Include="..\..\ext\native\thread\executor.h" />
|
||||
<ClInclude Include="..\..\ext\native\thread\prioritizedworkqueue.h" />
|
||||
|
@ -503,9 +503,6 @@
|
||||
<ClInclude Include="..\..\ext\native\base\timeutil.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\ext\native\thin3d\d3d11_loader.h">
|
||||
<Filter>thin3d</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\ext\native\thin3d\thin3d.h">
|
||||
<Filter>thin3d</Filter>
|
||||
</ClInclude>
|
||||
|
@ -373,7 +373,8 @@ void Vibrate(int length_ms) {
|
||||
|
||||
auto timeSpan = Windows::Foundation::TimeSpan();
|
||||
timeSpan.Duration = length_ms * 10000;
|
||||
Windows::Phone::Devices::Notification::VibrationDevice::GetDefault()->Vibrate(timeSpan);
|
||||
// TODO: Can't use this?
|
||||
// Windows::Phone::Devices::Notification::VibrationDevice::GetDefault()->Vibrate(timeSpan);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -392,3 +393,20 @@ bool System_InputBoxGetString(const char *title, const char *defaultValue, char
|
||||
bool System_InputBoxGetWString(const wchar_t *title, const std::wstring &defaultvalue, std::wstring &outvalue) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Emulation of TlsAlloc for Windows 10. Used by glslang.
|
||||
|
||||
extern "C" {
|
||||
DWORD WINAPI __imp_TlsAlloc() {
|
||||
return FlsAlloc(nullptr);
|
||||
}
|
||||
BOOL WINAPI __imp_TlsFree(DWORD index) {
|
||||
return FlsFree(index);
|
||||
}
|
||||
BOOL WINAPI __imp_TlsSetValue(DWORD dwTlsIndex, LPVOID lpTlsValue) {
|
||||
return FlsSetValue(dwTlsIndex, lpTlsValue);
|
||||
}
|
||||
LPVOID WINAPI __imp_TlsGetValue(DWORD dwTlsIndex) {
|
||||
return FlsGetValue(dwTlsIndex);
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,10 @@ using namespace Concurrency;
|
||||
using namespace Windows::Storage;
|
||||
using namespace Windows::Storage::Streams;
|
||||
|
||||
std::mutex initMutex;
|
||||
|
||||
StorageFileLoader::StorageFileLoader(Windows::Storage::StorageFile ^file) {
|
||||
initMutex.lock();
|
||||
file_ = file;
|
||||
path_ = FromPlatformString(file_->Path);
|
||||
thread_.reset(new std::thread([this]() { this->threadfunc(); }));
|
||||
@ -42,6 +45,9 @@ void StorageFileLoader::threadfunc() {
|
||||
const char *what = e.what();
|
||||
ILOG("%s", what);
|
||||
}
|
||||
catch (Platform::COMException ^e) {
|
||||
|
||||
}
|
||||
|
||||
auto sizetask = create_task(file_->GetBasicPropertiesAsync()).then([this](Windows::Storage::FileProperties::BasicProperties ^props) {
|
||||
size_ = props->Size;
|
||||
@ -53,6 +59,12 @@ void StorageFileLoader::threadfunc() {
|
||||
const char *what = e.what();
|
||||
ILOG("%s", what);
|
||||
}
|
||||
catch (Platform::COMException ^e) {
|
||||
std::string what = FromPlatformString(e->ToString());
|
||||
ILOG("%s", what);
|
||||
}
|
||||
|
||||
initMutex.unlock();
|
||||
|
||||
initMutex.unlock();
|
||||
|
||||
|
@ -106,7 +106,7 @@
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<Link>
|
||||
<AdditionalDependencies>libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>../ffmpeg/Windows10/ARM/lib;%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm; $(VCInstallDir)\lib\arm</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
@ -121,7 +121,7 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<Link>
|
||||
<AdditionalDependencies>libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>../ffmpeg/Windows10/ARM/lib;%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm; $(VCInstallDir)\lib\arm</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
@ -136,7 +136,7 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Link>
|
||||
<AdditionalDependencies>libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>../ffmpeg/Windows10/x86/lib;%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store; $(VCInstallDir)\lib</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
@ -151,7 +151,7 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Link>
|
||||
<AdditionalDependencies>libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>../ffmpeg/Windows10/x86/lib;%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store; $(VCInstallDir)\lib</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
@ -166,7 +166,7 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Link>
|
||||
<AdditionalDependencies>libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>../ffmpeg/Windows10/x64/lib;%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\amd64; $(VCInstallDir)\lib\amd64</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
@ -181,7 +181,7 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Link>
|
||||
<AdditionalDependencies>libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>../ffmpeg/Windows10/x64/lib;%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\amd64; $(VCInstallDir)\lib\amd64</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
@ -334,4 +334,4 @@
|
||||
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\MeshContentTask.targets" />
|
||||
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ShaderGraphContentTask.targets" />
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user