Overview
| Comment: | tests: Add output for Nintendo 3DS |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
e1762ab0afa52b0c9847bbc43842a9eb |
| User & Date: | js on 2016-02-22 00:17:33 |
| Other Links: | manifest | tags |
Context
|
2016-02-22
| ||
| 15:25 | OFDate: Do not use lrint() for microseconds (check-in: f1765412c7 user: js tags: trunk) | |
| 00:17 | tests: Add output for Nintendo 3DS (check-in: e1762ab0af user: js tags: trunk) | |
|
2016-02-21
| ||
| 20:41 | OFThread: Sleep using svcSleepThread() on 3DS (check-in: 032bfb52ed user: js tags: trunk) | |
Changes
Modified tests/Makefile from [ae7eab597c] to [f4cfed798e].
| ︙ | |||
136 137 138 139 140 141 142 143 144 145 146 147 | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | + + + |
${PROG_NOINST}.nds: ${PROG_NOINST}.arm9
rm -fr nds-data
mkdir -p nds-data
cp testfile.bin testfile.txt testfile.ini serialization.xml nds-data
ndstool -c $@ -9 $< -d nds-data
rm -fr nds-data
${PROG_NOINST}.3dsx: ${PROG_NOINST}
3dsxtool $< $@
CPPFLAGS += -I../src -I../src/exceptions -I../src/runtime -I.. -DSTDOUT
LIBS := -L../src -lobjfw ${TESTS_LIBS} ${LIBS}
LDFLAGS += ${MAP_LDFLAGS}
LD = ${OBJC}
|
Modified tests/TestsAppDelegate.m from [fb3c8c5bbc] to [9043414018].
| ︙ | |||
46 47 48 49 50 51 52 53 54 55 56 57 58 59 | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | + + + + |
#ifdef OF_NINTENDO_DS
# define asm __asm__
# include <nds.h>
# undef asm
#endif
#ifdef OF_NINTENDO_3DS
# include <3ds.h>
#endif
enum {
NO_COLOR,
RED,
GREEN,
YELLOW
};
|
| ︙ | |||
125 126 127 128 129 130 131 | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | + + + + + - + + | sceKernelStartThread(tid, 0, 0); #endif #ifdef OF_NINTENDO_DS consoleDemoInit(); #endif #ifdef OF_NINTENDO_3DS gfxInitDefault(); consoleInit(GFX_TOP, NULL); #endif |
| ︙ | |||
163 164 165 166 167 168 169 170 171 172 173 174 175 176 | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | + + + + + + + + + + + |
[delegate outputString: @"Press start button to exit!"
inColor: NO_COLOR];
for (;;) {
swiWaitForVBlank();
scanKeys();
if (keysDown() & KEY_START)
[OFApplication terminateWithStatus: 1];
}
# elif defined(OF_NINTENDO_3DS)
[delegate outputString: @"Press start button to exit!"
inColor: NO_COLOR];
for (;;) {
hidScanInput();
if (hidKeysDown() & KEY_START)
[OFApplication terminateWithStatus: 1];
gspWaitForVBlank();
}
# else
abort();
# endif
}
#else
return of_application_main(&argc, &argv, [TestsAppDelegate class]);
|
| ︙ | |||
308 309 310 311 312 313 314 315 316 317 318 319 320 321 | 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 | + + + + + + + + + + + + |
inColor: NO_COLOR];
for (;;) {
swiWaitForVBlank();
scanKeys();
if (keysDown() & KEY_A)
break;
}
# endif
# ifdef OF_NINTENDO_3DS
[self outputString: @"Press A to continue!"
inColor: NO_COLOR];
for (;;) {
hidScanInput();
if (hidKeysDown() & KEY_A)
break;
gspWaitForVBlank();
}
# endif
#else
[self outputString: @"failed\n"
inColor: RED];
#endif
}
|
| ︙ | |||
394 395 396 397 398 399 400 401 402 403 404 405 406 | 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 | + + + + + + + + + + + |
[self outputString: @"Press start button to exit!"
inColor: NO_COLOR];
for (;;) {
swiWaitForVBlank();
scanKeys();
if (keysDown() & KEY_START)
[OFApplication terminateWithStatus: _fails];
}
#elif defined(OF_NINTENDO_3DS)
[self outputString: @"Press start button to exit!"
inColor: NO_COLOR];
for (;;) {
hidScanInput();
if (hidKeysDown() & KEY_START)
[OFApplication terminateWithStatus: _fails];
gspWaitForVBlank();
}
#else
[OFApplication terminateWithStatus: _fails];
#endif
}
@end
|