load all instance functions

This commit is contained in:
Greg Wells
2025-06-29 08:43:58 -04:00
parent bb6b1c175d
commit 1a4101bf4d
9 changed files with 45 additions and 25 deletions

View File

@@ -73,7 +73,13 @@ void checkDestroyOutputDevice(gnOutputDeviceHandle device) {
gnReturnCode checkCreateSurfaceMacOS(gnWindowSurfaceHandle windowSurface, gnInstanceHandle instance, gnMacOSWindowSurfaceInfo createInfo) {
loaderLayer* nextLayer = loaderGetNextLayer(instance);
if (nextLayer->instanceFunctions._gnCreateMacOSWindowSurface == NULL) { return GN_FAILED_TO_LOAD_FUNCTION; }
if (nextLayer->instanceFunctions._gnCreateMacOSWindowSurface == NULL) {
gnDebuggerSetErrorMessage(instance->debugger, (gnMessageData){
.message = gnCreateString("Failed to load create window surface function")
});
resetLayer(instance);
return GN_FAILED_TO_LOAD_FUNCTION;
}
return nextLayer->instanceFunctions._gnCreateMacOSWindowSurface(windowSurface, instance, createInfo);
}