mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
cellMusic: Fix resume, fast forward and rewind
- Sadly rewind does not work with the QMediaPlayer on windows
This commit is contained in:
parent
577f379a12
commit
d80146c704
7 changed files with 198 additions and 156 deletions
|
|
@ -61,8 +61,9 @@ void fmt_class_string<QMediaPlayer::State>::format(std::string& out, u64 arg)
|
|||
});
|
||||
}
|
||||
|
||||
qt_music_error_handler::qt_music_error_handler(std::shared_ptr<QMediaPlayer> media_player)
|
||||
qt_music_error_handler::qt_music_error_handler(std::shared_ptr<QMediaPlayer> media_player, std::function<void(QMediaPlayer::MediaStatus)> status_callback)
|
||||
: m_media_player(std::move(media_player))
|
||||
, m_status_callback(std::move(status_callback))
|
||||
{
|
||||
if (m_media_player)
|
||||
{
|
||||
|
|
@ -79,6 +80,11 @@ qt_music_error_handler::~qt_music_error_handler()
|
|||
void qt_music_error_handler::handle_media_status(QMediaPlayer::MediaStatus status)
|
||||
{
|
||||
music_log.notice("New media status: %s (status=%d)", status, static_cast<int>(status));
|
||||
|
||||
if (m_status_callback)
|
||||
{
|
||||
m_status_callback(status);
|
||||
}
|
||||
}
|
||||
|
||||
void qt_music_error_handler::handle_music_state(QMediaPlayer::State state)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue