fixing macOS issue

This commit is contained in:
Kbz-8
2025-01-11 22:28:39 +01:00
parent 712ac4be64
commit 2030534cf2
12 changed files with 12 additions and 644 deletions

View File

@@ -44,10 +44,10 @@ namespace mlx
private:
struct Hook
{
func::function<void(void*)> fn;
std::function<void(void*)> fn;
void* param;
Hook(func::function<void(void*)> fn, void* param) : fn(fn), param(param) {}
Hook(std::function<void(void*)> fn, void* param) : fn(fn), param(param) {}
};
private:

View File

@@ -9,7 +9,7 @@ namespace mlx
{
public:
EventListener() = delete;
EventListener(func::function<void(const EventBase&)> functor, std::string name);
EventListener(std::function<void(const EventBase&)> functor, std::string name);
inline const std::string& GetName() const { return m_name; }
inline void Call(const EventBase& event) const noexcept { m_listen_functor(event); }
@@ -17,7 +17,7 @@ namespace mlx
~EventListener() = default;
private:
func::function<void(const EventBase&)> m_listen_functor;
std::function<void(const EventBase&)> m_listen_functor;
std::string m_name;
};
}

View File

@@ -14,7 +14,7 @@ namespace mlx
Handle CreateWindow(const mlx_window_create_info* info, std::int32_t& id, bool hidden);
void DestroyWindow(Handle window) noexcept;
void InputsFetcher(func::function<void(mlx_event_type, int, int)> functor);
void InputsFetcher(std::function<void(mlx_event_type, int, int)> functor);
VkSurfaceKHR CreateVulkanSurface(Handle window, VkInstance instance) const noexcept;
std::vector<const char*> GetRequiredVulkanInstanceExtentions(Handle window) const noexcept;