Index: src/OGKEvent.m ================================================================== --- src/OGKEvent.m +++ src/OGKEvent.m @@ -45,11 +45,11 @@ @implementation OGKCharacterTypedEvent - (of_unichar_t)character { if (event.keyboard.unichar < 1) - return 0xFFFD; + return 0; return event.keyboard.unichar; } - (unsigned)modifiers Index: tests/TestMain.h ================================================================== --- tests/TestMain.h +++ tests/TestMain.h @@ -29,11 +29,10 @@ OGKDisplay *display; OGKEventQueue *eventQueue; OGKBitmap *bitmap; of_point_t position; of_dimension_t scale; - BOOL running; ogk_rotation_t rotation; ogk_color_t tint; OFThread *animationThread; BOOL stopAnimation; } Index: tests/TestMain.m ================================================================== --- tests/TestMain.m +++ tests/TestMain.m @@ -34,11 +34,11 @@ @implementation TestMain - (void)display: (OGKDisplay*)display wasClosed: (OGKCloseEvent*)event { - running = NO; + [OFApplication terminate]; } - (void)keyWasPressed: (OGKKeyPressEvent*)event display: (OGKDisplay*)display { @@ -78,11 +78,11 @@ break; case OGK_KEY_A: [self toggleAnimation]; break; case OGK_KEY_Q: - running = NO; + [OFApplication terminate]; break; } } - (void)mouseWasMoved: (OGKMouseMovedEvent*)event @@ -189,13 +189,13 @@ scale = of_dimension(1, 1); rotation = ogk_rotation(bitmap.size.width / 2, bitmap.size.height / 2, 0); tint = ogk_color(1, 1, 1, 0); - for (running = YES; running;) { + for (;;) { @autoreleasepool { [self handleEvents]; [self draw]; } } } @end