mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1873 b08762b0-b915-fc4b-9d8c-17b2551a87ff
82 lines
2.2 KiB
C
82 lines
2.2 KiB
C
/*---------------------------------------------------------------------------*
|
|
Project: TwlIPL
|
|
File: DS_Chat.c
|
|
|
|
Copyright 2007 Nintendo. All rights reserved.
|
|
|
|
These coded instructions, statements, and computer programs contain
|
|
proprietary information of Nintendo of America Inc. and/or Nintendo
|
|
Company Ltd., and are protected by Federal copyright law. They may
|
|
not be disclosed to third parties or copied or duplicated in any form,
|
|
in whole or in part, without the prior written consent of Nintendo.
|
|
|
|
$Date:: $
|
|
$Rev$
|
|
$Author$
|
|
*---------------------------------------------------------------------------*/
|
|
|
|
#include <twl.h>
|
|
#include <sysmenu.h>
|
|
#include "misc.h"
|
|
#include "SimpleBenchmark.h"
|
|
|
|
// define data------------------------------------------
|
|
#define RETURN_BUTTON_TOP_X 2
|
|
#define RETURN_BUTTON_TOP_Y 21
|
|
#define RETURN_BUTTON_BOTTOM_X ( RETURN_BUTTON_TOP_X + 8 )
|
|
#define RETURN_BUTTON_BOTTOM_Y ( RETURN_BUTTON_TOP_Y + 2 )
|
|
|
|
// extern data------------------------------------------
|
|
|
|
// function's prototype declaration---------------------
|
|
|
|
// global variable -------------------------------------
|
|
RTCDrawProperty g_rtcDraw = {
|
|
TRUE, RTC_DATE_TOP_X, RTC_DATE_TOP_Y, RTC_TIME_TOP_X, RTC_TIME_TOP_Y
|
|
};
|
|
|
|
// テストプログラムの初期化
|
|
void SimpleBenchmarkInit( void )
|
|
{
|
|
GX_DispOff();
|
|
GXS_DispOff();
|
|
NNS_G2dCharCanvasClear( &gCanvas, TXT_COLOR_WHITE );
|
|
|
|
PutStringUTF16( 1 * 8, 0 * 8, TXT_COLOR_BLUE, (const u16 *)L"SimpleBenchmarkTest");
|
|
GetAndDrawRTCData( &g_rtcDraw, TRUE );
|
|
|
|
GXS_SetVisiblePlane( GX_PLANEMASK_BG0 );
|
|
GX_DispOn();
|
|
GXS_DispOn();
|
|
}
|
|
|
|
|
|
// テストプログラムのメインループ
|
|
void SimpleBenchmarkMain(void)
|
|
{
|
|
BOOL tp_cancel = FALSE;
|
|
|
|
|
|
ReadTP(); // タッチパネル入力の取得
|
|
|
|
// [RETURN]ボタン押下チェック
|
|
if(tpd.disp.touch) {
|
|
tp_cancel = WithinRangeTP( RETURN_BUTTON_TOP_X * 8, RETURN_BUTTON_TOP_Y * 8 - 4,
|
|
RETURN_BUTTON_BOTTOM_X * 8, RETURN_BUTTON_BOTTOM_Y * 8 - 4, &tpd.disp );
|
|
}
|
|
|
|
if( ( pad.trg & PAD_BUTTON_A ) ) {
|
|
}
|
|
|
|
if( ( pad.trg & PAD_BUTTON_X ) ) {
|
|
}
|
|
|
|
if( ( pad.trg & PAD_BUTTON_B ) || tp_cancel ) {
|
|
// SYSM_RebootLauncher();
|
|
}
|
|
|
|
GetAndDrawRTCData( &g_rtcDraw, FALSE );
|
|
}
|
|
|
|
|