mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-24 10:09:19 +01:00
Follow imgui recommendation and streamline build dependencies (#355)
This commit is contained in:
parent
431c5a101f
commit
52cc7c5996
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -13,3 +13,6 @@
|
||||
[submodule "dependencies/Vulkan-Headers"]
|
||||
path = dependencies/Vulkan-Headers
|
||||
url = https://github.com/KhronosGroup/Vulkan-Headers
|
||||
[submodule "dependencies/imgui"]
|
||||
path = dependencies/imgui
|
||||
url = https://github.com/ocornut/imgui
|
||||
|
@ -83,7 +83,6 @@ find_package(Threads REQUIRED)
|
||||
find_package(SDL2 REQUIRED)
|
||||
find_package(CURL REQUIRED)
|
||||
find_package(pugixml REQUIRED)
|
||||
find_package(imgui REQUIRED)
|
||||
find_package(RapidJSON REQUIRED)
|
||||
find_package(Boost COMPONENTS program_options filesystem nowide REQUIRED)
|
||||
find_package(libzip REQUIRED)
|
||||
|
1
dependencies/imgui
vendored
Submodule
1
dependencies/imgui
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 8a44c31c95c8e0217f6e1fc814cbbbcca4981f14
|
@ -491,7 +491,6 @@ target_link_libraries(CemuCafe PRIVATE
|
||||
fmt::fmt
|
||||
glslang::SPIRV
|
||||
ih264d
|
||||
imgui::imgui
|
||||
OpenSSL::Crypto
|
||||
OpenSSL::SSL
|
||||
PNG::PNG
|
||||
|
@ -1,25 +1,11 @@
|
||||
#include "Cafe/HW/Latte/Renderer/Vulkan/RendererShaderVk.h"
|
||||
|
||||
#if __has_include(<glslang/build_info.h>)
|
||||
#include <glslang/build_info.h>
|
||||
#else
|
||||
#define GLSLANG_VERSION_LESS_OR_EQUAL_TO (false)
|
||||
#endif
|
||||
|
||||
#include <glslang/Public/ShaderLang.h>
|
||||
#if GLSLANG_VERSION_LESS_OR_EQUAL_TO(11, 0, 0)
|
||||
#include <glslang/SPIRV/GlslangToSpv.h>
|
||||
#else
|
||||
#include <SPIRV/Logger.h>
|
||||
#include <SPIRV/GlslangToSpv.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "Cafe/HW/Latte/Renderer/Vulkan/VulkanAPI.h"
|
||||
#include "Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.h"
|
||||
|
||||
#include <thread>
|
||||
|
||||
#include "config/ActiveSettings.h"
|
||||
#include "config/CemuConfig.h"
|
||||
#include "util/helpers/ConcurrentQueue.h"
|
||||
|
@ -11,6 +11,16 @@ set_property(TARGET imguiImpl PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CO
|
||||
|
||||
target_include_directories(imguiImpl PUBLIC "../")
|
||||
|
||||
# imgui source files
|
||||
target_sources(imguiImpl PRIVATE
|
||||
"../../dependencies/imgui/imgui.cpp"
|
||||
"../../dependencies/imgui/imgui_draw.cpp"
|
||||
"../../dependencies/imgui/imgui_tables.cpp"
|
||||
"../../dependencies/imgui/imgui_widgets.cpp"
|
||||
)
|
||||
|
||||
target_include_directories(imguiImpl PUBLIC "../../dependencies/imgui/")
|
||||
|
||||
target_link_libraries(imguiImpl PRIVATE
|
||||
CemuCafe
|
||||
CemuCommon
|
||||
@ -18,5 +28,4 @@ target_link_libraries(imguiImpl PRIVATE
|
||||
CemuInput
|
||||
CemuResource
|
||||
CemuUtil
|
||||
imgui::imgui
|
||||
)
|
||||
|
@ -136,8 +136,8 @@ void ImGui_UpdateWindowInformation(bool mainWindow)
|
||||
auto key = keyboard_mapping.find(key_code);
|
||||
if (key != keyboard_mapping.end())
|
||||
return key->second;
|
||||
ImGuiKey mapped_key = current_key + ImGuiKey_NamedKey_BEGIN;
|
||||
current_key = (current_key + 1) % ImGuiKey_NamedKey_COUNT ;
|
||||
ImGuiKey mapped_key = (ImGuiKey)((uint32)current_key + ImGuiKey_NamedKey_BEGIN);
|
||||
current_key = (current_key + 1) % (uint32)ImGuiKey_NamedKey_COUNT;
|
||||
keyboard_mapping[key_code] = mapped_key;
|
||||
return mapped_key;
|
||||
};
|
||||
|
@ -3,7 +3,6 @@
|
||||
"version-string": "1.0",
|
||||
"builtin-baseline": "1b0252ca70ca2244a711535462c7f981eb439e83",
|
||||
"dependencies": [
|
||||
"imgui",
|
||||
"pugixml",
|
||||
"zlib",
|
||||
"libpng",
|
||||
|
Loading…
Reference in New Issue
Block a user