gl: Fixes for asahi linux

This commit is contained in:
kd-11 2024-07-31 03:36:08 +03:00 committed by kd-11
parent 7884bcc21d
commit f64c912d02
9 changed files with 43 additions and 6 deletions

View file

@ -113,8 +113,14 @@ gs_frame::gs_frame(QScreen* screen, const QRect& geometry, const QIcon& appIcon,
setScreen(screen);
setGeometry(geometry);
setTitle(qstr(m_window_title));
setVisibility(startup_visibility);
create();
if (g_cfg.video.renderer != video_renderer::opengl)
{
// Do not display the window before OpenGL is configured!
// This works fine in windows and X11 but wayland-egl will crash later.
setVisibility(startup_visibility);
create();
}
// TODO: enable in Qt6
//m_shortcut_handler = new shortcut_handler(gui::shortcuts::shortcut_handler_id::game_window, this, m_gui_settings);
@ -1216,3 +1222,8 @@ void gs_frame::progress_set_limit(int limit)
{
m_progress_indicator->set_range(0, limit);
}
bool gs_frame::has_alpha()
{
return format().hasAlpha();
}