30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#ifdef OF_WII
# define asm __asm__
# include <gccore.h>
# include <wiiuse/wpad.h>
# undef asm
#endif
#ifdef OF_NINTENDO_3DS
/* Newer versions of libctru started using id as a parameter name. */
# define id id_3ds
# include <3ds.h>
# undef id
#endif
|
>
>
>
>
>
>
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#ifdef OF_WII
# define asm __asm__
# include <gccore.h>
# include <wiiuse/wpad.h>
# undef asm
#endif
#ifdef OF_NINTENDO_DS
# define asm __asm__
# include <nds.h>
# undef asm
#endif
#ifdef OF_NINTENDO_3DS
/* Newer versions of libctru started using id as a parameter name. */
# define id id_3ds
# include <3ds.h>
# undef id
#endif
|
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
VIDEO_WaitVSync();
if (mode->viTVMode & VI_NON_INTERLACE)
VIDEO_WaitVSync();
CON_InitEx(mode, 2, 2, mode->fbWidth - 4, mode->xfbHeight - 4);
VIDEO_ClearFrameBuffer(mode, nextFB, COLOR_BLACK);
#elif defined(OF_NINTENDO_3DS)
gfxInitDefault();
atexit(gfxExit);
consoleInit(GFX_TOP, NULL);
#endif
}
|
>
>
|
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
VIDEO_WaitVSync();
if (mode->viTVMode & VI_NON_INTERLACE)
VIDEO_WaitVSync();
CON_InitEx(mode, 2, 2, mode->fbWidth - 4, mode->xfbHeight - 4);
VIDEO_ClearFrameBuffer(mode, nextFB, COLOR_BLACK);
#elif defined(OF_NINTENDO_DS)
consoleDemoInit();
#elif defined(OF_NINTENDO_3DS)
gfxInitDefault();
atexit(gfxExit);
consoleInit(GFX_TOP, NULL);
#endif
}
|
233
234
235
236
237
238
239
240
241
242
243
244
245
246
|
for (;;) {
WPAD_ScanPads();
if (WPAD_ButtonsDown(0) & WPAD_BUTTON_A)
break;
VIDEO_WaitVSync();
}
#elif defined(OF_NINTENDO_3DS)
[OFStdOut setForegroundColor: [OFColor silver]];
[OFStdOut writeLine: @"Press A to continue"];
for (;;) {
hidScanInput();
|
>
>
>
>
>
>
>
>
>
>
>
|
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
|
for (;;) {
WPAD_ScanPads();
if (WPAD_ButtonsDown(0) & WPAD_BUTTON_A)
break;
VIDEO_WaitVSync();
}
#elif defined(OF_NINTENDO_DS)
[OFStdOut setForegroundColor: [OFColor silver]];
[OFStdOut writeLine: @"Press A to continue"];
for (;;) {
swiWaitForVBlank();
scanKeys();
if (keysDown() & KEY_A)
break;
}
#elif defined(OF_NINTENDO_3DS)
[OFStdOut setForegroundColor: [OFColor silver]];
[OFStdOut writeLine: @"Press A to continue"];
for (;;) {
hidScanInput();
|
472
473
474
475
476
477
478
479
480
481
482
483
484
485
|
for (;;) {
WPAD_ScanPads();
if (WPAD_ButtonsDown(0) & WPAD_BUTTON_HOME)
break;
VIDEO_WaitVSync();
}
#elif defined(OF_NINTENDO_3DS)
[OFStdOut setForegroundColor: [OFColor silver]];
[OFStdOut writeLine: @"Press start button to exit"];
for (;;) {
hidScanInput();
|
>
>
>
>
>
>
>
>
>
>
>
|
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
|
for (;;) {
WPAD_ScanPads();
if (WPAD_ButtonsDown(0) & WPAD_BUTTON_HOME)
break;
VIDEO_WaitVSync();
}
#elif defined(OF_NINTENDO_DS)
[OFStdOut setForegroundColor: [OFColor silver]];
[OFStdOut writeLine: @"Press start button to exit"];
for (;;) {
swiWaitForVBlank();
scanKeys();
if (keysDown() & KEY_START)
break;
}
#elif defined(OF_NINTENDO_3DS)
[OFStdOut setForegroundColor: [OFColor silver]];
[OFStdOut writeLine: @"Press start button to exit"];
for (;;) {
hidScanInput();
|