mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-09-03 01:20:00 +02:00
Fixed an annoying bug where the application would freeze when resizing the window This pull request made it so the SDL window's resizing event now broadcasts a new event specifically asking the swapchain to recreate itself, which will in turn broadcast the original event when done. It also removed the Event enum specific values, as they were irrelevant.
33 lines
491 B
C++
33 lines
491 B
C++
#ifndef __MLX_CORE_ENUMS__
|
|
#define __MLX_CORE_ENUMS__
|
|
|
|
#include <cstddef>
|
|
|
|
namespace mlx
|
|
{
|
|
enum class LogType
|
|
{
|
|
Message = 0,
|
|
Warning,
|
|
Error,
|
|
FatalError,
|
|
Debug,
|
|
|
|
EndEnum
|
|
};
|
|
constexpr std::size_t LogTypeCount = static_cast<std::size_t>(LogType::EndEnum);
|
|
|
|
enum class Event
|
|
{
|
|
ResizeEventCode = 1,
|
|
SwapchainResizeEventCode,
|
|
FrameBeginEventCode,
|
|
FatalErrorEventCode,
|
|
|
|
EndEnum
|
|
};
|
|
constexpr std::size_t EventCount = static_cast<std::size_t>(Event::EndEnum);
|
|
}
|
|
|
|
#endif
|