mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-25 19:02:45 -06:00
qt: handle wayland-egl platform name
This commit is contained in:
parent
9ff891ce71
commit
b81caf1879
2 changed files with 7 additions and 3 deletions
|
@ -269,12 +269,14 @@ static Core::Frontend::WindowSystemType GetWindowSystemType() {
|
||||||
return Core::Frontend::WindowSystemType::X11;
|
return Core::Frontend::WindowSystemType::X11;
|
||||||
else if (platform_name == QStringLiteral("wayland"))
|
else if (platform_name == QStringLiteral("wayland"))
|
||||||
return Core::Frontend::WindowSystemType::Wayland;
|
return Core::Frontend::WindowSystemType::Wayland;
|
||||||
|
else if (platform_name == QStringLiteral("wayland-egl"))
|
||||||
|
return Core::Frontend::WindowSystemType::Wayland;
|
||||||
else if (platform_name == QStringLiteral("cocoa"))
|
else if (platform_name == QStringLiteral("cocoa"))
|
||||||
return Core::Frontend::WindowSystemType::Cocoa;
|
return Core::Frontend::WindowSystemType::Cocoa;
|
||||||
else if (platform_name == QStringLiteral("android"))
|
else if (platform_name == QStringLiteral("android"))
|
||||||
return Core::Frontend::WindowSystemType::Android;
|
return Core::Frontend::WindowSystemType::Android;
|
||||||
|
|
||||||
LOG_CRITICAL(Frontend, "Unknown Qt platform!");
|
LOG_CRITICAL(Frontend, "Unknown Qt platform {}!", platform_name.toStdString());
|
||||||
return Core::Frontend::WindowSystemType::Windows;
|
return Core::Frontend::WindowSystemType::Windows;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -314,7 +316,8 @@ GRenderWindow::GRenderWindow(GMainWindow* parent, EmuThread* emu_thread_,
|
||||||
input_subsystem->Initialize();
|
input_subsystem->Initialize();
|
||||||
this->setMouseTracking(true);
|
this->setMouseTracking(true);
|
||||||
|
|
||||||
strict_context_required = QGuiApplication::platformName() == QStringLiteral("wayland");
|
strict_context_required = QGuiApplication::platformName() == QStringLiteral("wayland") ||
|
||||||
|
QGuiApplication::platformName() == QStringLiteral("wayland-egl");
|
||||||
|
|
||||||
connect(this, &GRenderWindow::FirstFrameDisplayed, parent, &GMainWindow::OnLoadComplete);
|
connect(this, &GRenderWindow::FirstFrameDisplayed, parent, &GMainWindow::OnLoadComplete);
|
||||||
connect(this, &GRenderWindow::ExecuteProgramSignal, parent, &GMainWindow::OnExecuteProgram,
|
connect(this, &GRenderWindow::ExecuteProgramSignal, parent, &GMainWindow::OnExecuteProgram,
|
||||||
|
|
|
@ -2917,7 +2917,8 @@ static QScreen* GuessCurrentScreen(QWidget* window) {
|
||||||
|
|
||||||
bool GMainWindow::UsingExclusiveFullscreen() {
|
bool GMainWindow::UsingExclusiveFullscreen() {
|
||||||
return Settings::values.fullscreen_mode.GetValue() == Settings::FullscreenMode::Exclusive ||
|
return Settings::values.fullscreen_mode.GetValue() == Settings::FullscreenMode::Exclusive ||
|
||||||
QGuiApplication::platformName() == QStringLiteral("wayland");
|
QGuiApplication::platformName() == QStringLiteral("wayland") ||
|
||||||
|
QGuiApplication::platformName() == QStringLiteral("wayland-egl");
|
||||||
}
|
}
|
||||||
|
|
||||||
void GMainWindow::ShowFullscreen() {
|
void GMainWindow::ShowFullscreen() {
|
||||||
|
|
Loading…
Reference in a new issue