mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-12 21:45:19 -04:00
Fix build on main for mac/linux (#40)
* fix builds, removing COMPOUND_LITERAL around GXColor use aurora's aurora_get_stats add aurora::gd to libraries linked to fixup linkage/symbol hiding on mac/linux squashed * aurora stat changes * fix --------- Co-authored-by: Jasper St. Pierre <jstpierre@mecheye.net> Co-authored-by: TakaRikka <takarikka@outlook.com>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <stdint.h>
|
||||
#include "JSystem/J2DGraph/J2DOrthoGraph.h"
|
||||
#include "JSystem/JFramework/JFWDisplay.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JUtility/JUTConsole.h"
|
||||
#include "JSystem/JUtility/JUTDbPrint.h"
|
||||
@@ -224,7 +225,17 @@ void JFWDisplay::endGX() {
|
||||
}
|
||||
|
||||
void JFWDisplay::beginRender() {
|
||||
#if TARGET_PC
|
||||
// Temporarily clear the current JKRHeap so that Aurora/Dawn/ImGui allocations
|
||||
// use malloc instead of JKRHeap. Without this, Dawn's internal std::string
|
||||
// allocations would go through JKRHeap and then crash when freed via standard delete.
|
||||
JKRHeap* savedHeap = JKRHeap::getCurrentHeap();
|
||||
JKRHeap::setCurrentHeap(nullptr);
|
||||
#endif
|
||||
aurora_begin_frame();
|
||||
#if TARGET_PC
|
||||
JKRHeap::setCurrentHeap(savedHeap);
|
||||
#endif
|
||||
if (field_0x40) {
|
||||
JUTProcBar::getManager()->wholeLoopEnd();
|
||||
}
|
||||
@@ -302,7 +313,16 @@ void JFWDisplay::endRender() {
|
||||
|
||||
JUTProcBar::getManager()->cpuStart();
|
||||
calcCombinationRatio();
|
||||
#if TARGET_PC
|
||||
{
|
||||
JKRHeap* savedHeap = JKRHeap::getCurrentHeap();
|
||||
JKRHeap::setCurrentHeap(nullptr);
|
||||
aurora_end_frame();
|
||||
JKRHeap::setCurrentHeap(savedHeap);
|
||||
}
|
||||
#else
|
||||
aurora_end_frame();
|
||||
#endif
|
||||
}
|
||||
|
||||
void JFWDisplay::endFrame() {
|
||||
|
||||
Reference in New Issue
Block a user