qt: add Direct3D 9 renderer
This commit is contained in:
@@ -281,6 +281,10 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
ui->actionVulkan->setVisible(false);
|
||||
ui->actionOpenGL_3_0_Core->setVisible(false);
|
||||
}
|
||||
#if !defined Q_OS_WINDOWS
|
||||
ui->actionDirect3D_9->setVisible(false);
|
||||
if (vid_api == 5) vid_api = 0;
|
||||
#endif
|
||||
|
||||
#if !QT_CONFIG(vulkan)
|
||||
if (vid_api == 4) vid_api = 0;
|
||||
@@ -295,6 +299,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
actGroup->addAction(ui->actionHardware_Renderer_OpenGL_ES);
|
||||
actGroup->addAction(ui->actionOpenGL_3_0_Core);
|
||||
actGroup->addAction(ui->actionVulkan);
|
||||
actGroup->addAction(ui->actionDirect3D_9);
|
||||
actGroup->setExclusive(true);
|
||||
|
||||
connect(actGroup, &QActionGroup::triggered, [this](QAction* action) {
|
||||
@@ -316,6 +321,9 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
case 4:
|
||||
ui->stackedWidget->switchRenderer(RendererStack::Renderer::Vulkan);
|
||||
break;
|
||||
case 5:
|
||||
ui->stackedWidget->switchRenderer(RendererStack::Renderer::Direct3D9);
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1341,6 +1349,7 @@ void MainWindow::processMacKeyboardInput(bool down, const QKeyEvent* event) {
|
||||
void MainWindow::on_actionFullscreen_triggered() {
|
||||
if (video_fullscreen > 0) {
|
||||
showNormal();
|
||||
if (vid_api == 5) ui->stackedWidget->switchRenderer(RendererStack::Renderer::Direct3D9);
|
||||
ui->menubar->show();
|
||||
if (!hide_status_bar) ui->statusbar->show();
|
||||
if (!hide_tool_bar) ui->toolBar->show();
|
||||
|
||||
Reference in New Issue
Block a user