Qt: ImGui support
This commit is contained in:
@ -130,6 +130,8 @@ void QtHostInterface::refreshGameList(bool invalidate_cache /*= false*/)
|
||||
QWidget* QtHostInterface::createDisplayWidget(QWidget* parent)
|
||||
{
|
||||
m_display_window = new OpenGLDisplayWindow(this, nullptr);
|
||||
connect(m_display_window, &QtDisplayWindow::windowResizedEvent, this, &QtHostInterface::onDisplayWindowResized);
|
||||
|
||||
m_display.release();
|
||||
m_display = std::unique_ptr<HostDisplay>(m_display_window->getHostDisplayInterface());
|
||||
return QWidget::createWindowContainer(m_display_window, parent);
|
||||
@ -176,6 +178,11 @@ void QtHostInterface::doHandleKeyEvent(int key, bool pressed)
|
||||
iter->second(pressed);
|
||||
}
|
||||
|
||||
void QtHostInterface::onDisplayWindowResized(int width, int height)
|
||||
{
|
||||
m_display_window->onWindowResized(width, height);
|
||||
}
|
||||
|
||||
void QtHostInterface::updateInputMap()
|
||||
{
|
||||
if (!isOnWorkerThread())
|
||||
@ -352,16 +359,17 @@ void QtHostInterface::threadEntryPoint()
|
||||
|
||||
// rendering
|
||||
{
|
||||
// DrawImGui();
|
||||
|
||||
if (m_system)
|
||||
{
|
||||
DrawDebugWindows();
|
||||
m_system->GetGPU()->ResetGraphicsAPIState();
|
||||
}
|
||||
|
||||
DrawFPSWindow();
|
||||
DrawOSDMessages();
|
||||
|
||||
// ImGui::Render();
|
||||
m_display->Render();
|
||||
|
||||
// ImGui::NewFrame();
|
||||
|
||||
if (m_system)
|
||||
{
|
||||
m_system->GetGPU()->RestoreGraphicsAPIState();
|
||||
|
||||
Reference in New Issue
Block a user