Fixing notification dequeing.

This commit is contained in:
Ben Vanik 2015-06-02 22:12:00 -07:00
parent e186fcaf0d
commit 7f62e8a86d
3 changed files with 5 additions and 1 deletions

View File

@ -130,6 +130,7 @@ X_RESULT XXMPApp::XMPPlayTitlePlaylist(uint32_t playlist_handle,
active_song_index_ = 0;
state_ = State::kPlaying;
OnStateChanged();
kernel_state_->BroadcastNotification(kMsgPlaybackBehaviorChanged, 1);
return X_ERROR_SUCCESS;
}

View File

@ -77,9 +77,9 @@ bool XNotifyListener::DequeueNotification(XNotificationID id,
std::lock_guard<xe::mutex> lock(lock_);
bool dequeued = false;
if (notification_count_) {
dequeued = true;
auto it = notifications_.find(id);
if (it != notifications_.end()) {
dequeued = true;
*out_data = it->second;
notifications_.erase(it);
notification_count_--;

View File

@ -75,6 +75,9 @@ SHIM_CALL XNotifyGetNext_shim(PPCContext* ppc_context,
if (dequeued) {
SHIM_SET_MEM_32(id_ptr, id);
SHIM_SET_MEM_32(param_ptr, param);
} else {
SHIM_SET_MEM_32(id_ptr, 0);
SHIM_SET_MEM_32(param_ptr, 0);
}
SHIM_SET_RETURN_32(dequeued ? 1 : 0);