]> git.cworth.org Git - apitrace/blobdiff - dispatch.py
Minor tweaks to d3d9 spec.
[apitrace] / dispatch.py
index 666f94aee775a351da699b9c0ea1f90560ef20bd..a2f23e92d5f126bc47162f18ce8f9d4d7f9d7645 100644 (file)
@@ -28,7 +28,7 @@
 """ 
 
 
-import stdapi
+import specs.stdapi as stdapi
 
 
 def function_pointer_type(function):
@@ -109,15 +109,16 @@ class Dispatcher:
         print '    }'
 
     def fail_function(self, function):
-        print r'            OS::DebugMessage("error: unavailable function \"%s\"\n", __name);'
-        if function.fail is not None:
+        if function.type is stdapi.Void or function.fail is not None:
+            print r'            os::log("warning: ignoring call to unavailable function %s\n", __name);'
             if function.type is stdapi.Void:
-                assert function.fail == ''
+                assert function.fail is None
                 print '            return;' 
             else:
-                assert function.fail != ''
+                assert function.fail is not None
                 print '            return %s;' % function.fail
         else:
-            print '            OS::Abort();'
+            print r'            os::log("error: unavailable function %s\n", __name);'
+            print r'            os::abort();'