Files
aaruremote/wii/wii.c

49 lines
1.5 KiB
C
Raw Normal View History

2019-10-20 19:23:34 +01:00
/*
* This file is part of the DiscImageChef Remote Server.
* Copyright (c) 2019 Natalia Portillo.
*
* 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, version 3.
*
* 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, see <http://www.gnu.org/licenses/>.
*/
2019-10-20 21:50:25 +01:00
#include "../dicmote.h"
2019-10-20 21:58:08 +01:00
#include <debug.h>
#include <errno.h>
#include <gccore.h>
#include <wiiuse/wpad.h>
2019-10-20 21:50:25 +01:00
void Initialize()
{
2019-10-20 21:58:08 +01:00
void* framebuffer;
static GXRModeObj* rmode = NULL;
VIDEO_Init();
WPAD_Init();
rmode = VIDEO_GetPreferredMode(NULL);
framebuffer = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode));
console_init(framebuffer, 20, 20, rmode->fbWidth, rmode->xfbHeight, rmode->fbWidth * VI_DISPLAY_PIX_SZ);
VIDEO_Configure(rmode);
VIDEO_SetNextFramebuffer(framebuffer);
VIDEO_SetBlack(FALSE);
VIDEO_Flush();
VIDEO_WaitVSync();
if(rmode->viTVMode & VI_NON_INTERLACE) VIDEO_WaitVSync();
2019-10-20 21:50:25 +01:00
}
void PlatformLoop(DicPacketHello* pkt_server_hello)
{
// TODO: Call working loop in a background thread and wait for pad control
}