Qt: Implement display linear filtering
This commit is contained in:
parent
abf48b6cc2
commit
736d85b0f3
|
@ -67,8 +67,6 @@ bool QtDisplayWindow::createDeviceResources()
|
|||
|
||||
void QtDisplayWindow::destroyDeviceResources() {}
|
||||
|
||||
void QtDisplayWindow::Render() {}
|
||||
|
||||
void QtDisplayWindow::onWindowResized(int width, int height)
|
||||
{
|
||||
m_window_width = width;
|
||||
|
|
|
@ -22,7 +22,9 @@ public:
|
|||
virtual bool initializeDeviceContext(bool debug_device);
|
||||
virtual void destroyDeviceContext();
|
||||
|
||||
virtual void Render();
|
||||
virtual void SetDisplayLinearFiltering(bool enabled) = 0;
|
||||
virtual void SetDisplayTopMargin(int height) = 0;
|
||||
virtual void Render() = 0;
|
||||
|
||||
// this comes back on the emu thread
|
||||
virtual void onWindowResized(int width, int height);
|
||||
|
|
|
@ -117,6 +117,7 @@ void QtHostInterface::applySettings()
|
|||
const bool old_vsync_enabled = m_settings.video_sync_enabled;
|
||||
const bool old_audio_sync_enabled = m_settings.audio_sync_enabled;
|
||||
const bool old_speed_limiter_enabled = m_settings.speed_limiter_enabled;
|
||||
const bool old_display_linear_filtering = m_settings.display_linear_filtering;
|
||||
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(m_qsettings_mutex);
|
||||
|
@ -140,6 +141,9 @@ void QtHostInterface::applySettings()
|
|||
{
|
||||
m_system->UpdateGPUSettings();
|
||||
}
|
||||
|
||||
if (m_settings.display_linear_filtering != old_display_linear_filtering)
|
||||
m_display_window->SetDisplayLinearFiltering(m_settings.display_linear_filtering);
|
||||
}
|
||||
|
||||
void QtHostInterface::checkSettings()
|
||||
|
@ -192,6 +196,7 @@ QWidget* QtHostInterface::createDisplayWidget(QWidget* parent)
|
|||
|
||||
m_display.release();
|
||||
m_display = std::unique_ptr<HostDisplay>(m_display_window->getHostDisplayInterface());
|
||||
m_display->SetDisplayLinearFiltering(m_settings.display_linear_filtering);
|
||||
|
||||
QWidget* widget = QWidget::createWindowContainer(m_display_window, parent);
|
||||
widget->setFocusPolicy(Qt::StrongFocus);
|
||||
|
|
Loading…
Reference in New Issue