mirror of
https://github.com/zeldaret/oot
synced 2026-08-19 05:52:22 -04:00
Fix misc GCC compatibility issues (#1463)
* Fix osGetMemSize being optimized to `return 8MB` by gcc Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> Co-authored-by: ariahiro64 <45049787+ariahiro64@users.noreply.github.com> * Workaround f32 to s16 cast for binang being UB if binang doesn't fit s16 Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> Co-authored-by: ariahiro64 <45049787+ariahiro64@users.noreply.github.com> * osGetMemSize fixup * include z64math in z64camera Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> Co-authored-by: ariahiro64 <45049787+ariahiro64@users.noreply.github.com>
This commit is contained in:
@@ -3,13 +3,13 @@
|
||||
#define STEP 0x100000
|
||||
|
||||
u32 osGetMemSize(void) {
|
||||
u32* ptr;
|
||||
vu32* ptr;
|
||||
u32 size = 0x400000;
|
||||
u32 data0;
|
||||
u32 data1;
|
||||
|
||||
while (size < 0x800000) {
|
||||
ptr = (u32*)(0xA0000000 + size);
|
||||
ptr = (vu32*)(K1BASE + size);
|
||||
|
||||
data0 = *ptr;
|
||||
data1 = ptr[STEP / 4 - 1];
|
||||
|
||||
Reference in New Issue
Block a user