[AD] iPhone specific additions |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
I want to add two very simple functions to the iphone port. These allow you to use Game Center in your games and I assume other screen overlay thingies like the on screen keyboard. The additions, minus declarations are here:
Index: allegroAppDelegate.m
===================================================================
--- allegroAppDelegate.m (revision 14796)
+++ allegroAppDelegate.m (working copy)
@@ -18,6 +18,16 @@
static volatile bool waiting_for_program_halt = false;
static float scale_override = -1.0;
+UIWindow *al_iphone_get_window(void)
+{
+ return [global_delegate window];
+}
+
+UIView *al_iphone_get_view(void)
+{
+ return [global_delegate view];
+}
+
static bool is_ipad(void)
{
#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 30200)
Basically just two accessors. I don't think there's any reason now to include them, but before I begin exposing some innards I figured I'd check. Elias has more experience with this than me.
Trent