mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-02 00:03:54 -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:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "JSystem/J3DU/J3DUClipper.h"
|
||||
#include <cmath>
|
||||
#include "global.h"
|
||||
|
||||
void J3DUClipper::init() {
|
||||
mNear = 1.0f;
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "JSystem/JGadget/binary.h"
|
||||
#include "JSystem/JGadget/define.h"
|
||||
#include "global.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#if DEBUG
|
||||
|
||||
@@ -9,7 +9,7 @@ s32 JStage::TAmbientLight::JSGFGetType() const {
|
||||
}
|
||||
|
||||
GXColor JStage::TAmbientLight::JSGGetColor() const {
|
||||
return COMPOUND_LITERAL(GXColor){255, 255, 255, 255};
|
||||
return GXColor{255, 255, 255, 255};
|
||||
}
|
||||
|
||||
void JStage::TAmbientLight::JSGSetColor(GXColor) {}
|
||||
|
||||
@@ -28,7 +28,7 @@ f32 JStage::TFog::JSGGetEndZ() const {
|
||||
void JStage::TFog::JSGSetEndZ(f32) {}
|
||||
|
||||
GXColor JStage::TFog::JSGGetColor() const {
|
||||
return COMPOUND_LITERAL(GXColor){255, 255, 255, 255};
|
||||
return GXColor{255, 255, 255, 255};
|
||||
}
|
||||
|
||||
void JStage::TFog::JSGSetColor(GXColor) {}
|
||||
|
||||
@@ -15,7 +15,7 @@ bool JStage::TLight::JSGGetLightType() const {
|
||||
void JStage::TLight::JSGSetLightType(JStage::TELight) {}
|
||||
|
||||
GXColor JStage::TLight::JSGGetColor() const {
|
||||
return COMPOUND_LITERAL(GXColor){255, 255, 255, 255};
|
||||
return GXColor{255, 255, 255, 255};
|
||||
}
|
||||
|
||||
void JStage::TLight::JSGSetColor(GXColor) {}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "JSystem/JUtility/JUTDirectPrint.h"
|
||||
#include <cstdio>
|
||||
#include <vi.h>
|
||||
#include "global.h"
|
||||
|
||||
namespace JUTAssertion {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user