📄 main.c
字号:
/* * Copyright (C) 2008 dhewg, #wiidev efnet * * this file is part of wiifuse * http://wiibrew.org/index.php?title=Wiifuse * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */#include <malloc.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <gccore.h>#include <ogcsys.h>#include "../../shared.h"#include "global.h"#include "usb.h"#include "server.h"static void *xfb = NULL;static GXRModeObj *rmode;// TODO reset/power cbvoid (*reload)() = (void (*) ()) 0x80001800;int main() { unsigned int geckoattached; PAD_Init (); VIDEO_Init (); switch (VIDEO_GetCurrentTvMode()) { case VI_NTSC: rmode = &TVNtsc480IntDf; break; case VI_PAL: rmode = &TVPal528IntDf; break; case VI_MPAL: rmode = &TVMpal480IntDf; break; default: rmode = &TVNtsc480IntDf; break; } xfb = MEM_K0_TO_K1 (SYS_AllocateFramebuffer (rmode)); VIDEO_Configure (rmode); VIDEO_SetNextFramebuffer (xfb); VIDEO_SetBlack (FALSE); VIDEO_Flush (); VIDEO_WaitVSync (); if (rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync(); console_init(xfb, 20, 64, rmode->fbWidth, rmode->xfbHeight, rmode->fbWidth * 2); VIDEO_SetNextFramebuffer (xfb); printf ("wiifuse server " WIIFUSE_VERSION "\n" "coded by dhewg, #wiidev efnet/blitzed\n\n" "running under ios version %d v%d.%d\n\n", IOS_GetVersion (), IOS_GetRevisionMajor (), IOS_GetRevisionMinor ()); geckoattached = _usb_checkgecko (); if (!geckoattached) { printf ("usb gecko not found\n"); } else { _usb_flush (); server_run (); } printf ("reloading\n"); sleep (1); reload (); return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -