Qt: Hook up window size menu

This commit is contained in:
Connor McLaughlin
2020-11-18 23:15:16 +10:00
parent e4d2b7331b
commit 46b97dd4a8
5 changed files with 61 additions and 2 deletions

View File

@ -598,6 +598,15 @@ bool QtHostInterface::SetFullscreen(bool enabled)
return true;
}
bool QtHostInterface::RequestRenderWindowSize(s32 new_window_width, s32 new_window_height)
{
if (new_window_width <= 0 || new_window_height <= 0 || m_is_fullscreen || m_is_exclusive_fullscreen)
return false;
emit displaySizeRequested(new_window_width, new_window_height);
return true;
}
void QtHostInterface::PollAndUpdate()
{
CommonHostInterface::PollAndUpdate();
@ -1075,6 +1084,17 @@ void QtHostInterface::reloadPostProcessingShaders()
ReloadPostProcessingShaders();
}
void QtHostInterface::requestRenderWindowScale(qreal scale)
{
if (!isOnWorkerThread())
{
QMetaObject::invokeMethod(this, "requestRenderWindowScale", Qt::QueuedConnection, Q_ARG(qreal, scale));
return;
}
RequestRenderWindowScale(scale);
}
void QtHostInterface::executeOnEmulationThread(std::function<void()> callback, bool wait)
{
if (isOnWorkerThread())