mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2026-08-12 20:55:31 -05:00
Use DEBUG_FUNCTION_LINE_ERR on error.
This commit is contained in:
@@ -19,12 +19,12 @@ void PluginData::freeMemory() {
|
||||
switch (memoryType) {
|
||||
default:
|
||||
case eMemTypeExpHeap:
|
||||
DEBUG_FUNCTION_LINE("Free PluginData buffer %08X on heap %08X", buffer, this->heapHandle);
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("Free PluginData buffer %08X on heap %08X", buffer, this->heapHandle);
|
||||
MEMFreeToExpHeap(this->heapHandle, buffer);
|
||||
this->buffer = nullptr;
|
||||
break;
|
||||
case eMemTypeMEM2:
|
||||
DEBUG_FUNCTION_LINE("Free PluginData buffer %08X on default heap", buffer);
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("Free PluginData buffer %08X on default heap", buffer);
|
||||
free(this->buffer);
|
||||
this->buffer = nullptr;
|
||||
break;
|
||||
@@ -44,7 +44,7 @@ PluginData::PluginData(const std::vector<uint8_t> &input, MEMHeapHandle heapHand
|
||||
data_copy = MEMAllocFromExpHeapEx(heapHandle, length, 4);
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("Allocated %d kb on ExpHeap", length / 1024);
|
||||
if (data_copy == nullptr) {
|
||||
DEBUG_FUNCTION_LINE("Failed to allocate space on exp heap");
|
||||
DEBUG_FUNCTION_LINE_ERR("Failed to allocate space on exp heap");
|
||||
} else {
|
||||
memcpy(data_copy, &input[0], length);
|
||||
}
|
||||
@@ -54,7 +54,7 @@ PluginData::PluginData(const std::vector<uint8_t> &input, MEMHeapHandle heapHand
|
||||
data_copy = memalign(4, length);
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("Allocated %d kb on default heap", length / 1024);
|
||||
if (data_copy == nullptr) {
|
||||
DEBUG_FUNCTION_LINE("Failed to allocate space on default heap");
|
||||
DEBUG_FUNCTION_LINE_ERR("Failed to allocate space on default heap");
|
||||
} else {
|
||||
memcpy(data_copy, &input[0], length);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user