This commit is contained in:
2025-03-12 21:37:59 +01:00
parent f478bb4a9e
commit 2798a43674
5 changed files with 31 additions and 9 deletions

View File

@@ -21,10 +21,8 @@ namespace mlx
{
using namespace std::literals;
#ifndef DEBUG
if(type == LogType::Debug)
return;
#endif
if(type == LogType::Debug && std::getenv("MLX_DEBUG_LOGS") == nullptr)
return;
std::string code_infos;
if((type == LogType::Error || type == LogType::FatalError) && !file.empty() && !function.empty())

View File

@@ -31,6 +31,8 @@ namespace mlx
SDL_SetHint(SDL_HINT_VIDEODRIVER, "wayland,x11");
#endif
//SDL_SetHintWithPriority(SDL_HINT_SHUTDOWN_DBUS_ON_QUIT, "1", SDL_HINT_OVERRIDE);
if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS | SDL_INIT_TIMER) != 0)
FatalError("SDL: unable to init all subsystems; %", SDL_GetError());
DebugLog("SDL Manager initialized");
@@ -252,6 +254,7 @@ namespace mlx
case SDL_WINDOWEVENT_FOCUS_GAINED: functor(MLX_WINDOW_EVENT, id, 5); break;
case SDL_WINDOWEVENT_LEAVE: functor(MLX_WINDOW_EVENT, id, 6); break;
case SDL_WINDOWEVENT_FOCUS_LOST: functor(MLX_WINDOW_EVENT, id, 7); break;
case SDL_WINDOWEVENT_SIZE_CHANGED: functor(MLX_WINDOW_EVENT, id, 8); break;
default : break;
}