Update ImGui
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
file(GLOB SOURCES *.cpp)
|
||||
file(GLOB HEADERS *.hpp)
|
||||
|
||||
if(WIN32)
|
||||
add_compile_definitions(SDL_MAIN_HANDLED)
|
||||
endif()
|
||||
|
||||
add_library(frontend-imgui ${SOURCES} ${HEADERS})
|
||||
@@ -3,7 +3,6 @@
|
||||
#include <nfd.hpp>
|
||||
#include <Core.hpp>
|
||||
#include <Audio.hpp>
|
||||
#define SDL_MAIN_HANDLED
|
||||
#include <SDL2/SDL.h>
|
||||
#include <Discord.hpp>
|
||||
|
||||
@@ -22,6 +21,12 @@ Window::Window(n64::Core& core) : settings(core) {
|
||||
&& event.window.windowID == SDL_GetWindowID(window);
|
||||
}
|
||||
|
||||
static void check_vk_result(VkResult err) {
|
||||
if (err) {
|
||||
Util::panic("[vulkan] Error: VkResult = {}", err);
|
||||
}
|
||||
}
|
||||
|
||||
void Window::InitSDL() {
|
||||
SDL_Init(SDL_INIT_EVERYTHING);
|
||||
n64::InitAudio();
|
||||
@@ -35,15 +40,7 @@ void Window::InitSDL() {
|
||||
SDL_WINDOW_VULKAN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI
|
||||
);
|
||||
|
||||
if(volkInitialize() != VK_SUCCESS) {
|
||||
Util::panic("Failed to load Volk!");
|
||||
}
|
||||
}
|
||||
|
||||
static void check_vk_result(VkResult err) {
|
||||
if (err) {
|
||||
Util::panic("[vulkan] Error: VkResult = {}", err);
|
||||
}
|
||||
check_vk_result(volkInitialize());
|
||||
}
|
||||
|
||||
void Window::InitImgui() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include <ParallelRDPWrapper.hpp>
|
||||
#include <imgui.h>
|
||||
#include <imgui_impl_sdl.h>
|
||||
#include <imgui_impl_sdl2.h>
|
||||
#include <imgui_impl_vulkan.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <backend/Core.hpp>
|
||||
|
||||
Reference in New Issue
Block a user