Overview
Comment: | Move +[waitForConsoleVBlank] to OFThread |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | gamecontroller |
Files: | files | file ages | folders |
SHA3-256: |
684435a48d4d04f7991c82b86d89057e |
User & Date: | js on 2024-05-20 10:29:47 |
Other Links: | branch diff | manifest | tags |
Context
2024-05-20
| ||
10:45 | OFStdIOStream: Use bottom screen on 3DS check-in: 3bc1f4ac3c user: js tags: gamecontroller | |
10:29 | Move +[waitForConsoleVBlank] to OFThread check-in: 684435a48d user: js tags: gamecontroller | |
09:53 | OFGameController: Support 3DS analog right stick check-in: d5329de5f4 user: js tags: gamecontroller | |
Changes
Modified src/OFStdIOStream.h from [bf6a6dd043] to [6c775cbf62].
︙ | |||
77 78 79 80 81 82 83 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | - - - - - - - | /** * @brief Sets up a console for @ref OFStdOut / @ref OFStdErr output on systems * that don't have a console by default. * * @note This method is only available on Wii, Nintendo DS and Nintendo 3DS. */ + (void)setUpConsole; |
︙ |
Modified src/OFStdIOStream.m from [a1da571ef3] to [e861d0675e].
︙ | |||
299 300 301 302 303 304 305 | 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 | - - - - - - - - - - - - - - - | 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); } |
︙ |
Modified src/OFThread.h from [c158340505] to [93ed835b5a].
︙ | |||
242 243 244 245 246 247 248 249 250 251 252 253 254 255 | 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | + + + + + + + + + + | + (void)sleepUntilDate: (OFDate *)date; /** * @brief Yields a processor voluntarily and moves the thread to the end of the * queue for its priority. */ + (void)yield; #if defined(OF_WII) || defined(OF_NINTENDO_DS) || defined(OF_NINTENDO_3DS) || \ defined(DOXYGEN) /** * @brief Waits for the vertical blank. * * @note This method is only available on Wii, Nintendo DS and Nintendo 3DS. */ + (void)waitForVerticalBlank; #endif #ifdef OF_HAVE_THREADS /** * @brief Terminates the current thread, letting it return `nil`. */ + (void)terminate OF_NO_RETURN; |
︙ |
Modified src/OFThread.m from [f0b78222ad] to [9e1f600d33].
︙ | |||
38 39 40 41 42 43 44 45 46 47 48 49 50 | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | + + + + + + + + + + + - + + | # define Class IntuitionClass # include <proto/exec.h> # include <proto/dos.h> # undef Class #endif #ifdef OF_WII # define asm __asm__ # define nanosleep ogc_nanosleep # include <gccore.h> # include <ogcsys.h> # undef nanosleep # 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 |
︙ | |||
308 309 310 311 312 313 314 315 316 317 318 319 320 321 | 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | + + + + + + + + + + + + + + + + + | { #ifdef OF_HAVE_SCHED_YIELD sched_yield(); #else [self sleepForTimeInterval: 0]; #endif } #if defined(OF_WII) + (void)waitForVerticalBlank { VIDEO_WaitVSync(); } #elif defined(OF_NINTENDO_DS) + (void)waitForVerticalBlank { swiWaitForVBlank(); } #elif defined(OF_NINTENDO_3DS) + (void)waitForVerticalBlank { gspWaitForVBlank(); } #endif #ifdef OF_HAVE_THREADS + (void)terminate { [self terminateWithObject: nil]; /* |
︙ |
Modified src/test/OTAppDelegate.m from [b0a9356d5a] to [5bb1d1d168].
︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | + | #import "OFApplication.h" #import "OFColor.h" #import "OFDictionary.h" #import "OFMethodSignature.h" #import "OFSet.h" #import "OFStdIOStream.h" #import "OFThread.h" #import "OFValue.h" #import "OTTestCase.h" #import "OFGameController.h" #import "OTAssertionFailedException.h" |
︙ | |||
279 280 281 282 283 284 285 | 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | - + | [controller retrieveState]; if ([controller.pressedButtons containsObject: OFGameControllerEastButton]) break; |
︙ | |||
560 561 562 563 564 565 566 | 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 | - + | OFGameControllerHomeButton]) # else if ([controller.pressedButtons containsObject: OFGameControllerStartButton]) # endif break; |
Modified tests/gamecontroller/GameControllerTests.m from [2fbd7efe4d] to [9d9395a639].
︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - | #import "OFDate.h" #import "OFGameController.h" #import "OFNumber.h" #import "OFSet.h" #import "OFStdIOStream.h" #import "OFThread.h" |
︙ | |||
130 131 132 133 134 135 136 | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | - + | [OFStdOut writeFormat: @"(%5.2f, %5.2f)", position.x, position.y]; } [OFStdOut writeString: @"\n"]; } #if defined(OF_WII) || defined(OF_NINTENDO_DS) || defined(OF_NINTENDO_3DS) |