mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 22:53:34 +00:00
reworking application and bridge
This commit is contained in:
@@ -47,7 +47,7 @@ namespace mlx
|
||||
DebugLog("SDL Manager initialized");
|
||||
}
|
||||
|
||||
Handle SDLManager::CreateWindow(const std::string& title, std::size_t w, std::size_t h, bool hidden, std::int32_t& id, bool is_resizable)
|
||||
Handle SDLManager::CreateWindow(const mlx_window_create_info* info, std::int32_t& id, bool hidden)
|
||||
{
|
||||
Internal::WindowInfos* infos = new Internal::WindowInfos;
|
||||
Verify(infos != nullptr, "SDL: window allocation failed");
|
||||
@@ -57,10 +57,10 @@ namespace mlx
|
||||
flags |= SDL_WINDOW_HIDDEN;
|
||||
else
|
||||
flags |= SDL_WINDOW_SHOWN;
|
||||
if(is_resizable)
|
||||
if(info->is_resizable)
|
||||
flags |= SDL_WINDOW_RESIZABLE;
|
||||
|
||||
infos->window = SDL_CreateWindow(title.c_str(), SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, w, h, flags);
|
||||
infos->window = SDL_CreateWindow(info->title, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, info->width, info->height, flags);
|
||||
if(!infos->window)
|
||||
FatalError("SDL: unable to open a new window; %", SDL_GetError());
|
||||
infos->icon = SDL_CreateRGBSurfaceFrom(static_cast<void*>(logo_mlx), logo_mlx_width, logo_mlx_height, 32, 4 * logo_mlx_width, rmask, gmask, bmask, amask);
|
||||
|
||||
Reference in New Issue
Block a user