summaryrefslogtreecommitdiff
path: root/src/libultra_boot_O2/__osViSwapContext.c
diff options
context:
space:
mode:
authorRoman971 <32455037+Roman971@users.noreply.github.com>2021-11-26 23:37:33 +0100
committerGitHub <noreply@github.com>2021-11-26 17:37:33 -0500
commit6efb59069962abeeaa2ebf1d959cd344ed2aacb9 (patch)
tree3738ef704bbf4025ef923aa66a8bb29d2883af81 /src/libultra_boot_O2/__osViSwapContext.c
parentc36decaf50c2deaf5010edbf73de8e0e3d725d48 (diff)
Various minor cleanups (#1029)
* Fix some disp usage in EffectSsGMagma2 * Fix some incorrect SAC flags * Remove some instances where bool was used * Fix a few line numbers to be decimal * Remove MatrixInternal and use Mtx instead * Fix gs flag names to be plural for consistency * Fix some hex numbers to be uppercase * Fix instances of 0X for hex numbers
Diffstat (limited to 'src/libultra_boot_O2/__osViSwapContext.c')
-rw-r--r--src/libultra_boot_O2/__osViSwapContext.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libultra_boot_O2/__osViSwapContext.c b/src/libultra_boot_O2/__osViSwapContext.c
index aeadb75af..d82d5cce6 100644
--- a/src/libultra_boot_O2/__osViSwapContext.c
+++ b/src/libultra_boot_O2/__osViSwapContext.c
@@ -17,14 +17,14 @@ void __osViSwapContext(void) {
s2 = osVirtualToPhysical(viNext->buffer);
origin = (viMode->fldRegs[field].origin) + s2;
if (viNext->state & 2) {
- viNext->x.scale |= viMode->comRegs.xScale & ~0xfff;
+ viNext->x.scale |= viMode->comRegs.xScale & ~0xFFF;
} else {
viNext->x.scale = viMode->comRegs.xScale;
}
if (viNext->state & 4) {
- sp34 = (u32)(viMode->fldRegs[field].yScale & 0xfff);
+ sp34 = (u32)(viMode->fldRegs[field].yScale & 0xFFF);
viNext->y.scale = viNext->y.factor * sp34;
- viNext->y.scale |= viMode->fldRegs[field].yScale & ~0xfff;
+ viNext->y.scale |= viMode->fldRegs[field].yScale & ~0xFFF;
} else {
viNext->y.scale = viMode->fldRegs[field].yScale;
}
@@ -40,7 +40,7 @@ void __osViSwapContext(void) {
origin = osVirtualToPhysical(viNext->buffer);
}
if (viNext->state & 0x80) {
- viNext->y.scale = (viNext->y.offset << 0x10) & 0x3ff0000;
+ viNext->y.scale = (viNext->y.offset << 0x10) & 0x3FF0000;
origin = osVirtualToPhysical(viNext->buffer);
}
HW_REG(VI_ORIGIN_REG, u32) = origin;