fixing warnings in kvf

This commit is contained in:
Kbz-8
2024-09-15 10:11:08 +02:00
parent 527a88ebaa
commit 83432cb356
9 changed files with 45 additions and 2 deletions

View File

@@ -45,6 +45,12 @@ extern "C"
return static_cast<mlx::Application*>(mlx)->NewGraphicsSuport(w, h, title);
}
void mlx_set_window_position(void *mlx, void *win, int x, int y)
{
MLX_CHECK_APPLICATION_POINTER(mlx);
static_cast<mlx::Application*>(mlx)->SetGraphicsSupportPosition(win, x, y);
}
int mlx_loop_hook(void* mlx, int (*f)(void*), void* param)
{
MLX_CHECK_APPLICATION_POINTER(mlx);

View File

@@ -173,6 +173,11 @@ namespace mlx
*y = DM.h;
}
void SDLManager::SetWindowPosition(Handle window, int x, int y) const noexcept
{
SDL_SetWindowPosition(static_cast<SDL_Window*>(window), x, y);
}
std::int32_t SDLManager::GetX() const noexcept
{
int dummy;

View File

@@ -1,3 +1,4 @@
#include <mlx_profile.h>
#include <PreCompiled.h>
#define KVF_IMPLEMENTATION
@@ -5,7 +6,14 @@
#define KVF_ENABLE_VALIDATION_LAYERS
#endif
#include <kvf.h>
#if defined(MLX_COMPILER_GCC) || defined(MLX_COMPILER_CLANG)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
#include <kvf.h>
#pragma clang diagnostic pop
#else
#include <kvf.h>
#endif
#include <Renderer/RenderCore.h>
#include <Renderer/Vulkan/VulkanLoader.h>