stoopid pointer
This commit is contained in:
parent
8c1cea2da9
commit
e1dd3dc532
3 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ struct NGuid {
|
|||
};
|
||||
|
||||
struct BackEndpointCallbackInfo {
|
||||
NGuid* caller = new NGuid();
|
||||
NGuid caller;
|
||||
bool muted;
|
||||
float mainVolume;
|
||||
size_t channels;
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ EndpointWidget::EndpointWidget(uint64_t idx, EndpointHandler* eph, QWidget *pare
|
|||
|
||||
//TODO: el default = objcopy frees?
|
||||
//delete eph->getCallbackInfo()->caller;
|
||||
*eph->getCallbackInfo()->caller = *osh->getGuid();
|
||||
eph->getCallbackInfo()->caller = *osh->getGuid();
|
||||
mainSlider->blockSignals(false);
|
||||
muteButton->blockSignals(false);
|
||||
});
|
||||
|
|
@ -188,7 +188,7 @@ void MainWindow::reloadEndpointWidgets() {
|
|||
size_t i = 0;
|
||||
for (; i < (osh->getEndpointHandlers().size()); i++) {
|
||||
log_debugcpp("EPWidget creation");
|
||||
*osh->getEndpointHandlers().at(i)->getCallbackInfo()->caller = *osh->getGuid();
|
||||
osh->getEndpointHandlers().at(i)->getCallbackInfo()->caller = *osh->getGuid();
|
||||
EndpointWidget *epw = new EndpointWidget(i, osh->getEndpointHandlers().at(i), widget);
|
||||
//TODO: ALWAYS PUSH BACK??? PSZ CHANGE DIS WHEN IMPLEMENTING DYN ENDPOINT DET
|
||||
ews.push_back(epw);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue