]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
add missing functions
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 5 Aug 2009 18:41:01 +0000 (18:41 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 5 Aug 2009 18:41:01 +0000 (18:41 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9096 d7cf8633-e32d-0410-b094-e92efae38249

vid_agl.c

index dc67e3b92b86025eced4d41c00b65ef02f8bf7e6..cffbe855d58770589b11aa0c20fd9af6a58e5de2 100644 (file)
--- a/vid_agl.c
+++ b/vid_agl.c
@@ -1122,6 +1122,23 @@ void IN_Move (void)
 {
 }
 
+static bool GetDictionaryBoolean(CFDictionaryRef d, const void *key)
+{
+    CFBooleanRef ref = (CFBooleanRef) CFDictionaryGetValue(d, key);
+    if(ref)
+        return CFBooleanGetValue(ref);
+    return false;
+}
+
+long GetDictionaryLong(CFDictionaryRef d, const void *key)
+{
+       long value = 0;
+    CFBooleanRef ref = (CFBooleanRef) CFDictionaryGetValue(d, key);
+    if(ref)
+        CFNumberGetValue(ref, kCFNumberLongType, &value);
+    return value;
+}
+
 size_t VID_ListModes(vid_mode_t *modes, size_t maxcount)
 {
        CFArrayRef vidmodes = CGDisplayAvailableModes(mainDisplay);