Build: Use precompiled headers
This commit is contained in:
@@ -4,6 +4,7 @@ add_executable(duckstation-nogui
|
||||
nogui_platform.h
|
||||
)
|
||||
|
||||
target_precompile_headers(duckstation-nogui PRIVATE "pch.h")
|
||||
target_link_libraries(duckstation-nogui PRIVATE core util common imgui scmversion)
|
||||
|
||||
if(WIN32)
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
<Import Project="..\..\dep\msvc\vsprops\Configurations.props" />
|
||||
<ItemGroup>
|
||||
<ClCompile Include="nogui_host.cpp" />
|
||||
<ClCompile Include="pch.cpp">
|
||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="wayland_nogui_platform.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
@@ -14,6 +17,7 @@
|
||||
<ItemGroup>
|
||||
<ClInclude Include="nogui_host.h" />
|
||||
<ClInclude Include="nogui_platform.h" />
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="wayland_nogui_platform.h">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
@@ -48,5 +52,12 @@
|
||||
</PropertyGroup>
|
||||
<Import Project="..\..\dep\msvc\vsprops\Win32Application.props" />
|
||||
<Import Project="..\core\core.props" />
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="..\..\dep\msvc\vsprops\Targets.props" />
|
||||
</Project>
|
||||
@@ -5,6 +5,7 @@
|
||||
<ClCompile Include="win32_nogui_platform.cpp" />
|
||||
<ClCompile Include="wayland_nogui_platform.cpp" />
|
||||
<ClCompile Include="x11_nogui_platform.cpp" />
|
||||
<ClCompile Include="pch.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="resource.h" />
|
||||
@@ -13,6 +14,7 @@
|
||||
<ClInclude Include="nogui_platform.h" />
|
||||
<ClInclude Include="wayland_nogui_platform.h" />
|
||||
<ClInclude Include="x11_nogui_platform.h" />
|
||||
<ClInclude Include="pch.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Manifest Include="duckstation-nogui.manifest" />
|
||||
|
||||
@@ -426,9 +426,6 @@ void NoGUIHost::ProcessPlatformWindowResize(s32 width, s32 height, float scale)
|
||||
|
||||
void NoGUIHost::ProcessPlatformMouseMoveEvent(float x, float y)
|
||||
{
|
||||
if (g_gpu_device)
|
||||
g_gpu_device->SetMousePosition(static_cast<s32>(x), static_cast<s32>(y));
|
||||
|
||||
InputManager::UpdatePointerAbsolutePosition(0, x, y);
|
||||
ImGuiManager::UpdateMousePosition(x, y);
|
||||
}
|
||||
@@ -650,7 +647,7 @@ void NoGUIHost::CPUThreadMainLoop()
|
||||
|
||||
Host::PumpMessagesOnCPUThread();
|
||||
System::Internal::IdlePollUpdate();
|
||||
Host::RenderDisplay(false);
|
||||
System::PresentDisplay(false);
|
||||
if (!g_gpu_device->IsVsyncEnabled())
|
||||
g_gpu_device->ThrottlePresentation();
|
||||
}
|
||||
|
||||
4
src/duckstation-nogui/pch.cpp
Normal file
4
src/duckstation-nogui/pch.cpp
Normal file
@@ -0,0 +1,4 @@
|
||||
// SPDX-FileCopyrightText: 2019-2023 Connor McLaughlin <stenzek@gmail.com>
|
||||
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
||||
|
||||
#include "pch.h"
|
||||
6
src/duckstation-nogui/pch.h
Normal file
6
src/duckstation-nogui/pch.h
Normal file
@@ -0,0 +1,6 @@
|
||||
// SPDX-FileCopyrightText: 2019-2023 Connor McLaughlin <stenzek@gmail.com>
|
||||
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/pch.h"
|
||||
Reference in New Issue
Block a user