mirror of https://github.com/zeldaret/mm.git
vigetcurrframebuf OK (#386)
* vigetcurrframebuf OK * Renamed framep to buffer throughout repo * Made tharo's suggestions * Fix functions.h
This commit is contained in:
parent
77b9431f11
commit
6b4c24014e
|
@ -468,7 +468,7 @@ float __ull_to_f(unsigned long long l);
|
||||||
// void osVoiceCheckWord(void);
|
// void osVoiceCheckWord(void);
|
||||||
// void osVoiceControlGain(void);
|
// void osVoiceControlGain(void);
|
||||||
// void osVoiceStartReadData(void);
|
// void osVoiceStartReadData(void);
|
||||||
void* osViGetCurrentFramebuffer(void);
|
u32* osViGetCurrentFramebuffer(void);
|
||||||
s32 __osSpSetPc(void* pc);
|
s32 __osSpSetPc(void* pc);
|
||||||
// void __osVoiceContWrite4(void);
|
// void __osVoiceContWrite4(void);
|
||||||
void __osGetHWIntrRoutine(s32 idx, OSMesgQueue** outQueue, OSMesg* outMsg);
|
void __osGetHWIntrRoutine(s32 idx, OSMesgQueue** outQueue, OSMesg* outMsg);
|
||||||
|
|
|
@ -16,13 +16,13 @@
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* 0x0 */ u16 state;
|
/* 0x0 */ u16 state;
|
||||||
/* 0x2 */ u16 retraceCount;
|
/* 0x2 */ u16 retraceCount;
|
||||||
/* 0x4 */ void* framep;
|
/* 0x4 */ void* buffer;
|
||||||
/* 0x8 */ OSViMode* modep;
|
/* 0x8 */ OSViMode* modep;
|
||||||
/* 0xC */ u32 control;
|
/* 0xC */ u32 control;
|
||||||
/* 0x10 */ OSMesgQueue* msgq;
|
/* 0x10 */ OSMesgQueue* msgq;
|
||||||
/* 0x14 */ OSMesg msg;
|
/* 0x14 */ OSMesg msg;
|
||||||
/* 0x18 */ __OSViScale x;
|
/* 0x18 */ __OSViScale x;
|
||||||
/* 0x24 */ __OSViScale y;
|
/* 0x24 */ __OSViScale y;
|
||||||
} __OSViContext;
|
} __OSViContext; // size = 0x30
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/vigetcurrframebuf/osViGetCurrentFramebuffer.s")
|
u32* osViGetCurrentFramebuffer(void) {
|
||||||
|
register u32 prevInt = __osDisableInt();
|
||||||
|
u32* curBuf = __osViCurr->buffer;
|
||||||
|
|
||||||
|
__osRestoreInt(prevInt);
|
||||||
|
|
||||||
|
return curBuf;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue