mirror of
https://github.com/zeldaret/mm.git
synced 2026-05-23 23:05:08 -04:00
7134e81898
* OK * Symbols and other documentation * Remove externs * spec * More documentation, decompile the texture files, some uintptr_t and size_t * Top-of-file comment * Move symbols back into right order * Use some defines * Missed an osTvType and a size_t * Add missing header to os.h * Use segment symbol macros * Remove duplicate header * Address review suggestions
55 lines
1.2 KiB
C
55 lines
1.2 KiB
C
#include "global.h"
|
|
|
|
void ViConfig_UpdateVi(u32 mode) {
|
|
if (mode != 0) {
|
|
switch (osTvType) {
|
|
case OS_TV_MPAL:
|
|
osViSetMode(&osViModeMpalLan1);
|
|
break;
|
|
case OS_TV_PAL:
|
|
osViSetMode(&osViModePalLan1);
|
|
break;
|
|
case OS_TV_NTSC:
|
|
default:
|
|
osViSetMode(&osViModeNtscLan1);
|
|
break;
|
|
}
|
|
|
|
if (gViConfigFeatures != 0) {
|
|
osViSetSpecialFeatures(gViConfigFeatures);
|
|
}
|
|
|
|
if (gViConfigYScale != 1) {
|
|
osViSetYScale(1);
|
|
}
|
|
} else {
|
|
osViSetMode(&gViConfigMode);
|
|
|
|
if (gViConfigAdditionalScanLines != 0) {
|
|
osViExtendVStart(gViConfigAdditionalScanLines);
|
|
}
|
|
|
|
if (gViConfigFeatures != 0) {
|
|
osViSetSpecialFeatures(gViConfigFeatures);
|
|
}
|
|
|
|
if (gViConfigXScale != 1) {
|
|
osViSetXScale(gViConfigXScale);
|
|
}
|
|
|
|
if (gViConfigYScale != 1) {
|
|
osViSetYScale(gViConfigYScale);
|
|
}
|
|
}
|
|
|
|
gViConfigUseDefault = mode;
|
|
}
|
|
|
|
void ViConfig_UpdateBlack(void) {
|
|
if (gViConfigUseDefault != 0) {
|
|
osViBlack(true);
|
|
} else {
|
|
osViBlack(false);
|
|
}
|
|
}
|