Skip to content

Commit

Permalink
imgui clang + header
Browse files Browse the repository at this point in the history
  • Loading branch information
scribam committed Sep 5, 2024
1 parent 1c1e9f5 commit 3df622a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions vita3k/gui/src/imgui_impl_sdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,22 @@
#include <renderer/state.h>
#include <util/log.h>

// Clang warnings with -Weverything
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wimplicit-int-float-conversion" // warning: implicit conversion from 'xxx' to 'float' may lose precision
#endif

// SDL
#include <SDL.h>
#include <SDL_syswm.h>
#include <SDL_vulkan.h>
#ifdef __APPLE__
#include <TargetConditionals.h>
#endif
#ifdef __EMSCRIPTEN__
#include <emscripten/em_js.h>
#endif

#if SDL_VERSION_ATLEAST(2,0,4) && !defined(__EMSCRIPTEN__) && !defined(__ANDROID__) && !(defined(__APPLE__) && TARGET_OS_IOS) && !defined(__amigaos4__)
#define SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE 1
Expand Down Expand Up @@ -675,6 +688,10 @@ void ImGui_ImplSDL2_NewFrame(ImGui_State *state)

//-----------------------------------------------------------------------------

#if defined(__clang__)
#pragma clang diagnostic pop
#endif

void ImGui_ImplSdl_RenderDrawData(ImGui_State *state) {
switch (state->renderer->current_backend) {
case renderer::Backend::OpenGL:
Expand Down

0 comments on commit 3df622a

Please sign in to comment.