stoopid pointer

This commit is contained in:
Hane 2023-08-23 23:12:30 +02:00
commit e1dd3dc532
3 changed files with 4 additions and 4 deletions

View file

@ -42,7 +42,7 @@ HRESULT EndpointCallback::OnNotify(PAUDIO_VOLUME_NOTIFICATION_DATA pNotify) {
//TODO: MEMORY LEAK. FREE DATA4 FROM NGUID.
//TODO: el default = objcopy frees?
//delete osh->getEndpointHandlers().at(this->ep->getIndex())->getCallbackInfo()->caller;
memcpy(osh->getEndpointHandlers().at(this->ep->getIndex())->getCallbackInfo()->caller, &pNotify->guidEventContext,sizeof(NGuid) );
memcpy(&osh->getEndpointHandlers().at(this->ep->getIndex())->getCallbackInfo()->caller, &pNotify->guidEventContext,sizeof(NGuid) );
osh->getEndpointHandlers().at(this->ep->getIndex())->getCallbackInfo()->muted = pNotify->bMuted;
osh->getEndpointHandlers().at(this->ep->getIndex())->getCallbackInfo()->mainVolume = pNotify->fMasterVolume;