mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 22:53:34 +00:00
fixing compilation issues
This commit is contained in:
@@ -44,7 +44,7 @@ namespace mlx
|
||||
inline void LoopHook(int (*f)(void*), void* param);
|
||||
inline void LoopEnd() noexcept;
|
||||
|
||||
inline void LoadFont(Handle win, const std::filesystem::path& filepath, float scale);
|
||||
inline void LoadFont(const std::filesystem::path& filepath, float scale);
|
||||
|
||||
void Run() noexcept;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include <Core/Application.h>
|
||||
#include <Embedded/DogicaTTF.h>
|
||||
|
||||
#ifndef DISABLE_ALL_SAFETIES
|
||||
#define CHECK_WINDOW_PTR(win) \
|
||||
@@ -137,11 +138,17 @@ namespace mlx
|
||||
m_graphics[*static_cast<int*>(win)]->StringPut(x, y, color, str);
|
||||
}
|
||||
|
||||
void Application::LoadFont(Handle win, const std::filesystem::path& filepath, float scale)
|
||||
void Application::LoadFont(const std::filesystem::path& filepath, float scale)
|
||||
{
|
||||
MLX_PROFILE_FUNCTION();
|
||||
CHECK_WINDOW_PTR(win);
|
||||
m_graphics[*static_cast<int*>(win)]->LoadFont(filepath, scale);
|
||||
std::shared_ptr<Font> font;
|
||||
if(filepath.string() == "default")
|
||||
font = std::make_shared<Font>("default", dogica_ttf, scale);
|
||||
else
|
||||
font = std::make_shared<Font>(filepath, scale);
|
||||
if(!m_font_registry.IsFontKnown(font))
|
||||
return;
|
||||
m_font_registry.RegisterFont(font);
|
||||
}
|
||||
|
||||
void Application::TexturePut(Handle win, Handle img, int x, int y)
|
||||
|
||||
@@ -28,8 +28,6 @@ namespace mlx
|
||||
inline void StringPut(int x, int y, std::uint32_t color, std::string str);
|
||||
inline void TexturePut(NonOwningPtr<class Texture> texture, int x, int y);
|
||||
|
||||
inline void LoadFont(const std::filesystem::path& filepath, float scale);
|
||||
|
||||
inline void TryEraseSpritesInScene(NonOwningPtr<Texture> texture) noexcept;
|
||||
|
||||
[[nodiscard]] MLX_FORCEINLINE bool HasWindow() const noexcept { return m_has_window; }
|
||||
|
||||
@@ -46,13 +46,6 @@ namespace mlx
|
||||
p_scene->BringToFront(std::move(sprite));
|
||||
}
|
||||
|
||||
void GraphicsSupport::LoadFont(const std::filesystem::path& filepath, float scale)
|
||||
{
|
||||
MLX_PROFILE_FUNCTION();
|
||||
(void)filepath;
|
||||
(void)scale;
|
||||
}
|
||||
|
||||
void GraphicsSupport::TryEraseSpritesInScene(NonOwningPtr<Texture> texture) noexcept
|
||||
{
|
||||
MLX_PROFILE_FUNCTION();
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace mlx
|
||||
void InputsFetcher(func::function<void(mlx_event_type, int, int)> functor);
|
||||
|
||||
VkSurfaceKHR CreateVulkanSurface(Handle window, VkInstance instance) const noexcept;
|
||||
std::vector<const char*> GetRequiredVulkanInstanceExtentions() const noexcept;
|
||||
std::vector<const char*> GetRequiredVulkanInstanceExtentions(Handle window) const noexcept;
|
||||
Vec2ui GetVulkanDrawableSize(Handle window) const noexcept;
|
||||
void MoveMouseOnWindow(Handle window, int x, int y) const noexcept;
|
||||
void GetScreenSizeWindowIsOn(Handle window, int* x, int* y) const noexcept;
|
||||
|
||||
Reference in New Issue
Block a user