mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-07-09 17:25:18 -06:00
Qt: stop movies when the main window gets inactive
This commit is contained in:
parent
5e745ac661
commit
5c4be5dd3b
@ -1237,6 +1237,12 @@ void game_list_frame::ShowCustomConfigIcon(const game_info& game)
|
||||
RepaintIcons();
|
||||
}
|
||||
|
||||
void game_list_frame::stop_movie()
|
||||
{
|
||||
if (m_game_list) m_game_list->stop_movie();
|
||||
if (m_game_grid) m_game_grid->stop_movie();
|
||||
}
|
||||
|
||||
void game_list_frame::ResizeIcons(int slider_pos)
|
||||
{
|
||||
m_icon_size_index = slider_pos;
|
||||
|
||||
@ -56,10 +56,10 @@ public:
|
||||
|
||||
void SetShowHidden(bool show);
|
||||
|
||||
content_integrity* GetIsoIntegrity() const { return m_iso_integrity; }
|
||||
content_integrity* GetPsnContentIntegrity() const { return m_psn_content_integrity; }
|
||||
content_integrity* GetPsnDlcIntegrity() const { return m_psn_dlc_integrity; }
|
||||
content_integrity* GetPsnUpdateIntegrity() const { return m_psn_update_integrity; }
|
||||
content_integrity* GetIsoIntegrity() const { return ensure(m_iso_integrity); }
|
||||
content_integrity* GetPsnContentIntegrity() const { return ensure(m_psn_content_integrity); }
|
||||
content_integrity* GetPsnDlcIntegrity() const { return ensure(m_psn_dlc_integrity); }
|
||||
content_integrity* GetPsnUpdateIntegrity() const { return ensure(m_psn_update_integrity); }
|
||||
game_compatibility* GetGameCompatibility() const { return ensure(m_game_compat); }
|
||||
config_database* GetConfigDatabase() const { return ensure(m_config_db); }
|
||||
const std::vector<game_info>& GetGameInfo() const { return m_game_data; }
|
||||
@ -75,6 +75,8 @@ public:
|
||||
|
||||
void ShowCustomConfigIcon(const game_info& game);
|
||||
|
||||
void stop_movie();
|
||||
|
||||
// Enqueue slot for refreshed signal
|
||||
// Allowing for an individual container for each distinct use case (currently disabled and contains only one such entry)
|
||||
template <typename KeySlot = void, typename Func>
|
||||
|
||||
@ -4100,6 +4100,19 @@ void main_window::closeEvent(QCloseEvent* closeEvent)
|
||||
Emu.Quit(true);
|
||||
}
|
||||
|
||||
void main_window::changeEvent(QEvent* event)
|
||||
{
|
||||
if (event->type() == QEvent::ActivationChange)
|
||||
{
|
||||
if (m_game_list_frame && !isActiveWindow())
|
||||
{
|
||||
m_game_list_frame->stop_movie();
|
||||
}
|
||||
}
|
||||
|
||||
QMainWindow::changeEvent(event);
|
||||
}
|
||||
|
||||
/**
|
||||
Add valid disc games to gamelist (games.yml)
|
||||
@param paths = dir paths to scan for game
|
||||
|
||||
@ -126,6 +126,7 @@ private Q_SLOTS:
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
void changeEvent(QEvent *event) override;
|
||||
void mouseDoubleClickEvent(QMouseEvent *event) override;
|
||||
void dropEvent(QDropEvent* event) override;
|
||||
void dragEnterEvent(QDragEnterEvent* event) override;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user