From 4121600ce05a9071b9b48b09ea4c9ec2db1d141a Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Sun, 9 Sep 2012 15:18:07 +0200 Subject: [PATCH] Adjust to ObjFW change. Applications don't terminate after applicationDidFinishLaunching anymore. --- src/OGKEvent.m | 2 +- tests/TestMain.h | 1 - tests/TestMain.m | 6 +++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/OGKEvent.m b/src/OGKEvent.m index b06b649..a9c53ba 100644 --- a/src/OGKEvent.m +++ b/src/OGKEvent.m @@ -47,7 +47,7 @@ - (of_unichar_t)character { if (event.keyboard.unichar < 1) - return 0xFFFD; + return 0; return event.keyboard.unichar; } diff --git a/tests/TestMain.h b/tests/TestMain.h index d8ccb9d..8fd6bc4 100644 --- a/tests/TestMain.h +++ b/tests/TestMain.h @@ -31,7 +31,6 @@ OGKBitmap *bitmap; of_point_t position; of_dimension_t scale; - BOOL running; ogk_rotation_t rotation; ogk_color_t tint; OFThread *animationThread; diff --git a/tests/TestMain.m b/tests/TestMain.m index ec06a7c..a15e1b3 100644 --- a/tests/TestMain.m +++ b/tests/TestMain.m @@ -36,7 +36,7 @@ OF_APPLICATION_DELEGATE(TestMain) - (void)display: (OGKDisplay*)display wasClosed: (OGKCloseEvent*)event { - running = NO; + [OFApplication terminate]; } - (void)keyWasPressed: (OGKKeyPressEvent*)event @@ -80,7 +80,7 @@ OF_APPLICATION_DELEGATE(TestMain) [self toggleAnimation]; break; case OGK_KEY_Q: - running = NO; + [OFApplication terminate]; break; } } @@ -191,7 +191,7 @@ OF_APPLICATION_DELEGATE(TestMain) 0); tint = ogk_color(1, 1, 1, 0); - for (running = YES; running;) { + for (;;) { @autoreleasepool { [self handleEvents]; [self draw];