mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
Qt: use last window state when leaving fullscreen
This commit is contained in:
parent
66371457fd
commit
737b0dfd42
2 changed files with 10 additions and 1 deletions
|
@ -262,10 +262,18 @@ void gs_frame::toggle_fullscreen()
|
||||||
{
|
{
|
||||||
if (visibility() == FullScreen)
|
if (visibility() == FullScreen)
|
||||||
{
|
{
|
||||||
setVisibility(Windowed);
|
// Change to the last recorded visibility. Sanitize it just in case.
|
||||||
|
if (m_last_visibility != Visibility::Maximized && m_last_visibility != Visibility::Windowed)
|
||||||
|
{
|
||||||
|
m_last_visibility = Visibility::Windowed;
|
||||||
|
}
|
||||||
|
setVisibility(m_last_visibility);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Backup visibility for exiting fullscreen mode later. Don't do this in the visibilityChanged slot,
|
||||||
|
// since entering fullscreen from maximized will first change the visibility to windowed.
|
||||||
|
m_last_visibility = visibility();
|
||||||
setVisibility(FullScreen);
|
setVisibility(FullScreen);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -40,6 +40,7 @@ private:
|
||||||
|
|
||||||
u64 m_frames = 0;
|
u64 m_frames = 0;
|
||||||
std::string m_window_title;
|
std::string m_window_title;
|
||||||
|
QWindow::Visibility m_last_visibility = Visibility::Windowed;
|
||||||
atomic_t<bool> m_show_mouse = true;
|
atomic_t<bool> m_show_mouse = true;
|
||||||
bool m_disable_mouse = false;
|
bool m_disable_mouse = false;
|
||||||
bool m_disable_kb_hotkeys = false;
|
bool m_disable_kb_hotkeys = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue