fixing allocation issues with texts

This commit is contained in:
Kbz-8
2024-01-18 13:57:41 +01:00
parent a0b536483a
commit 58e687c952
28 changed files with 303 additions and 134 deletions

View File

@@ -55,10 +55,11 @@ namespace mlx::core
_in->onEvent(_graphics[*static_cast<int*>(win)]->getWindow()->getID(), event, funct_ptr, param);
}
void Application::getScreenSize(int* w, int* h) noexcept
void Application::getScreenSize(void* win, int* w, int* h) noexcept
{
CHECK_WINDOW_PTR(win);
SDL_DisplayMode DM;
SDL_GetDesktopDisplayMode(0, &DM);
SDL_GetDesktopDisplayMode(SDL_GetWindowDisplayIndex(_graphics[*static_cast<int*>(win)]->getWindow()->getNativeWindow()), &DM);
*w = DM.w;
*h = DM.h;
}