mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-02 07:46:07 +00:00
Don't use AntiHooking.dll or use D3DX9 on ARM64
This commit is contained in:
parent
1231f3eeb1
commit
59a73817c8
19
app/app.pro
19
app/app.pro
@ -33,17 +33,22 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
|||||||
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
INCLUDEPATH += \
|
INCLUDEPATH += $$PWD/../libs/windows/include
|
||||||
$$PWD/../libs/windows/include \
|
|
||||||
$$(DXSDK_DIR)/Include
|
|
||||||
|
|
||||||
contains(QT_ARCH, i386) {
|
contains(QT_ARCH, i386) {
|
||||||
|
INCLUDEPATH += $$(DXSDK_DIR)/Include
|
||||||
LIBS += -L$$PWD/../libs/windows/lib/x86
|
LIBS += -L$$PWD/../libs/windows/lib/x86
|
||||||
LIBS += -L$$(DXSDK_DIR)/Lib/x86
|
LIBS += -L$$(DXSDK_DIR)/Lib/x86 -ld3dx9
|
||||||
|
DEFINES += HAS_D3DX9
|
||||||
}
|
}
|
||||||
contains(QT_ARCH, x86_64) {
|
contains(QT_ARCH, x86_64) {
|
||||||
|
INCLUDEPATH += $$(DXSDK_DIR)/Include
|
||||||
LIBS += -L$$PWD/../libs/windows/lib/x64
|
LIBS += -L$$PWD/../libs/windows/lib/x64
|
||||||
LIBS += -L$$(DXSDK_DIR)/Lib/x64
|
LIBS += -L$$(DXSDK_DIR)/Lib/x64 -ld3dx9
|
||||||
|
DEFINES += HAS_D3DX9
|
||||||
|
}
|
||||||
|
contains(QT_ARCH, arm64) {
|
||||||
|
LIBS += -L$$PWD/../libs/windows/lib/arm64
|
||||||
}
|
}
|
||||||
|
|
||||||
LIBS += ws2_32.lib winmm.lib dxva2.lib ole32.lib gdi32.lib user32.lib d3d9.lib dwmapi.lib dbghelp.lib qwave.lib
|
LIBS += ws2_32.lib winmm.lib dxva2.lib ole32.lib gdi32.lib user32.lib d3d9.lib dwmapi.lib dbghelp.lib qwave.lib
|
||||||
@ -102,7 +107,7 @@ unix:!macx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
win32 {
|
win32 {
|
||||||
LIBS += -llibssl -llibcrypto -lSDL2 -lSDL2_ttf -lavcodec -lavutil -lopus -ld3dx9
|
LIBS += -llibssl -llibcrypto -lSDL2 -lSDL2_ttf -lavcodec -lavutil -lopus
|
||||||
CONFIG += ffmpeg
|
CONFIG += ffmpeg
|
||||||
}
|
}
|
||||||
win32:!winrt {
|
win32:!winrt {
|
||||||
@ -353,12 +358,14 @@ INCLUDEPATH += $$PWD/../h264bitstream/h264bitstream
|
|||||||
DEPENDPATH += $$PWD/../h264bitstream/h264bitstream
|
DEPENDPATH += $$PWD/../h264bitstream/h264bitstream
|
||||||
|
|
||||||
!winrt {
|
!winrt {
|
||||||
|
contains(QT_ARCH, i386)|contains(QT_ARCH, x86_64) {
|
||||||
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../AntiHooking/release/ -lAntiHooking
|
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../AntiHooking/release/ -lAntiHooking
|
||||||
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../AntiHooking/debug/ -lAntiHooking
|
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../AntiHooking/debug/ -lAntiHooking
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../AntiHooking
|
INCLUDEPATH += $$PWD/../AntiHooking
|
||||||
DEPENDPATH += $$PWD/../AntiHooking
|
DEPENDPATH += $$PWD/../AntiHooking
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
unix:!macx: {
|
unix:!macx: {
|
||||||
isEmpty(PREFIX) {
|
isEmpty(PREFIX) {
|
||||||
|
@ -289,9 +289,10 @@ int main(int argc, char *argv[])
|
|||||||
SetUnhandledExceptionFilter(UnhandledExceptionHandler);
|
SetUnhandledExceptionFilter(UnhandledExceptionHandler);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_WIN32)
|
#if defined(Q_OS_WIN32) && defined(Q_PROCESSOR_X86)
|
||||||
// Force AntiHooking.dll to be statically imported and loaded
|
// Force AntiHooking.dll to be statically imported and loaded
|
||||||
// by ntdll by calling a dummy function.
|
// by ntdll on x86/x64 platforms by calling a dummy function.
|
||||||
|
// AntiHooking.dll is not currently built for ARM64.
|
||||||
AntiHookingDummyImport();
|
AntiHookingDummyImport();
|
||||||
#elif defined(Q_OS_LINUX)
|
#elif defined(Q_OS_LINUX)
|
||||||
// Force libssl.so to be directly linked to our binary, so
|
// Force libssl.so to be directly linked to our binary, so
|
||||||
|
@ -31,8 +31,10 @@ DXVA2Renderer::DXVA2Renderer() :
|
|||||||
m_ProcService(nullptr),
|
m_ProcService(nullptr),
|
||||||
m_Processor(nullptr),
|
m_Processor(nullptr),
|
||||||
m_FrameIndex(0),
|
m_FrameIndex(0),
|
||||||
|
#ifdef HAS_D3DX9
|
||||||
m_DebugOverlayFont(nullptr),
|
m_DebugOverlayFont(nullptr),
|
||||||
m_StatusOverlayFont(nullptr),
|
m_StatusOverlayFont(nullptr),
|
||||||
|
#endif
|
||||||
m_BlockingPresent(false)
|
m_BlockingPresent(false)
|
||||||
{
|
{
|
||||||
RtlZeroMemory(m_DecSurfaces, sizeof(m_DecSurfaces));
|
RtlZeroMemory(m_DecSurfaces, sizeof(m_DecSurfaces));
|
||||||
@ -52,8 +54,11 @@ DXVA2Renderer::~DXVA2Renderer()
|
|||||||
SAFE_COM_RELEASE(m_RenderTarget);
|
SAFE_COM_RELEASE(m_RenderTarget);
|
||||||
SAFE_COM_RELEASE(m_ProcService);
|
SAFE_COM_RELEASE(m_ProcService);
|
||||||
SAFE_COM_RELEASE(m_Processor);
|
SAFE_COM_RELEASE(m_Processor);
|
||||||
|
|
||||||
|
#ifdef HAS_D3DX9
|
||||||
SAFE_COM_RELEASE(m_DebugOverlayFont);
|
SAFE_COM_RELEASE(m_DebugOverlayFont);
|
||||||
SAFE_COM_RELEASE(m_StatusOverlayFont);
|
SAFE_COM_RELEASE(m_StatusOverlayFont);
|
||||||
|
#endif
|
||||||
|
|
||||||
for (int i = 0; i < ARRAYSIZE(m_DecSurfaces); i++) {
|
for (int i = 0; i < ARRAYSIZE(m_DecSurfaces); i++) {
|
||||||
SAFE_COM_RELEASE(m_DecSurfaces[i]);
|
SAFE_COM_RELEASE(m_DecSurfaces[i]);
|
||||||
@ -744,6 +749,7 @@ bool DXVA2Renderer::initialize(PDECODER_PARAMETERS params)
|
|||||||
|
|
||||||
void DXVA2Renderer::notifyOverlayUpdated(Overlay::OverlayType type)
|
void DXVA2Renderer::notifyOverlayUpdated(Overlay::OverlayType type)
|
||||||
{
|
{
|
||||||
|
#ifdef HAS_D3DX9
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
@ -798,6 +804,9 @@ void DXVA2Renderer::notifyOverlayUpdated(Overlay::OverlayType type)
|
|||||||
SDL_assert(false);
|
SDL_assert(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
Q_UNUSED(type);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int DXVA2Renderer::getDecoderColorspace()
|
int DXVA2Renderer::getDecoderColorspace()
|
||||||
@ -1002,6 +1011,7 @@ void DXVA2Renderer::renderFrame(AVFrame *frame)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAS_D3DX9
|
||||||
if (m_DebugOverlayFont != nullptr) {
|
if (m_DebugOverlayFont != nullptr) {
|
||||||
if (Session::get()->getOverlayManager().isOverlayEnabled(Overlay::OverlayDebug)) {
|
if (Session::get()->getOverlayManager().isOverlayEnabled(Overlay::OverlayDebug)) {
|
||||||
SDL_Color color = Session::get()->getOverlayManager().getOverlayColor(Overlay::OverlayDebug);
|
SDL_Color color = Session::get()->getOverlayManager().getOverlayColor(Overlay::OverlayDebug);
|
||||||
@ -1025,6 +1035,7 @@ void DXVA2Renderer::renderFrame(AVFrame *frame)
|
|||||||
D3DCOLOR_ARGB(color.a, color.r, color.g, color.b));
|
D3DCOLOR_ARGB(color.a, color.r, color.g, color.b));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
hr = m_Device->EndScene();
|
hr = m_Device->EndScene();
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
|
@ -4,9 +4,12 @@
|
|||||||
#include "pacer/pacer.h"
|
#include "pacer/pacer.h"
|
||||||
|
|
||||||
#include <d3d9.h>
|
#include <d3d9.h>
|
||||||
#include <d3dx9.h>
|
|
||||||
#include <dxva2api.h>
|
#include <dxva2api.h>
|
||||||
|
|
||||||
|
#ifdef HAS_D3DX9
|
||||||
|
#include <d3dx9.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <libavcodec/dxva2.h>
|
#include <libavcodec/dxva2.h>
|
||||||
}
|
}
|
||||||
@ -63,7 +66,9 @@ private:
|
|||||||
DXVA2_ValueRange m_SaturationRange;
|
DXVA2_ValueRange m_SaturationRange;
|
||||||
DXVA2_VideoDesc m_Desc;
|
DXVA2_VideoDesc m_Desc;
|
||||||
REFERENCE_TIME m_FrameIndex;
|
REFERENCE_TIME m_FrameIndex;
|
||||||
|
#ifdef HAS_D3DX9
|
||||||
LPD3DXFONT m_DebugOverlayFont;
|
LPD3DXFONT m_DebugOverlayFont;
|
||||||
LPD3DXFONT m_StatusOverlayFont;
|
LPD3DXFONT m_StatusOverlayFont;
|
||||||
|
#endif
|
||||||
bool m_BlockingPresent;
|
bool m_BlockingPresent;
|
||||||
};
|
};
|
||||||
|
@ -8,9 +8,12 @@ SUBDIRS = \
|
|||||||
# Build the dependencies in parallel before the final app
|
# Build the dependencies in parallel before the final app
|
||||||
app.depends = qmdnsengine moonlight-common-c h264bitstream
|
app.depends = qmdnsengine moonlight-common-c h264bitstream
|
||||||
win32:!winrt {
|
win32:!winrt {
|
||||||
|
contains(QT_ARCH, i386)|contains(QT_ARCH, x86_64) {
|
||||||
|
# We don't build AntiHooking.dll for ARM64 (yet?)
|
||||||
SUBDIRS += AntiHooking
|
SUBDIRS += AntiHooking
|
||||||
app.depends += AntiHooking
|
app.depends += AntiHooking
|
||||||
}
|
}
|
||||||
|
}
|
||||||
!winrt:win32|macx {
|
!winrt:win32|macx {
|
||||||
SUBDIRS += soundio
|
SUBDIRS += soundio
|
||||||
app.depends += soundio
|
app.depends += soundio
|
||||||
|
@ -136,6 +136,7 @@ echo Copying DLL dependencies
|
|||||||
copy %SOURCE_ROOT%\libs\windows\lib\%ARCH%\*.dll %DEPLOY_FOLDER%
|
copy %SOURCE_ROOT%\libs\windows\lib\%ARCH%\*.dll %DEPLOY_FOLDER%
|
||||||
if !ERRORLEVEL! NEQ 0 goto Error
|
if !ERRORLEVEL! NEQ 0 goto Error
|
||||||
|
|
||||||
|
if /I "%ARCH%" NEQ "ARM64" (
|
||||||
echo Copying AntiHooking.dll
|
echo Copying AntiHooking.dll
|
||||||
copy %BUILD_FOLDER%\AntiHooking\%BUILD_CONFIG%\AntiHooking.dll %DEPLOY_FOLDER%
|
copy %BUILD_FOLDER%\AntiHooking\%BUILD_CONFIG%\AntiHooking.dll %DEPLOY_FOLDER%
|
||||||
if !ERRORLEVEL! NEQ 0 goto Error
|
if !ERRORLEVEL! NEQ 0 goto Error
|
||||||
@ -143,6 +144,7 @@ if !ERRORLEVEL! NEQ 0 goto Error
|
|||||||
echo Copying d3dx9_43.dll from DirectX SDK
|
echo Copying d3dx9_43.dll from DirectX SDK
|
||||||
expand "%DXSDK_DIR%\Redist\Jun2010_d3dx9_43_%ARCH%.cab" -F:d3dx9_43.dll %DEPLOY_FOLDER%
|
expand "%DXSDK_DIR%\Redist\Jun2010_d3dx9_43_%ARCH%.cab" -F:d3dx9_43.dll %DEPLOY_FOLDER%
|
||||||
if !ERRORLEVEL! NEQ 0 goto Error
|
if !ERRORLEVEL! NEQ 0 goto Error
|
||||||
|
)
|
||||||
|
|
||||||
echo Copying GC mapping list
|
echo Copying GC mapping list
|
||||||
copy %SOURCE_ROOT%\app\SDL_GameControllerDB\gamecontrollerdb.txt %DEPLOY_FOLDER%
|
copy %SOURCE_ROOT%\app\SDL_GameControllerDB\gamecontrollerdb.txt %DEPLOY_FOLDER%
|
||||||
|
Loading…
x
Reference in New Issue
Block a user