add X11 + Linux check functions
This commit is contained in:
@@ -71,6 +71,7 @@ void checkDestroyOutputDevice(gnOutputDeviceHandle device) {
|
|||||||
return nextLayer->instanceFunctions._gnDestroyOutputDevice(device);
|
return nextLayer->instanceFunctions._gnDestroyOutputDevice(device);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef GN_PLATFORM_MACOS
|
||||||
gnReturnCode checkCreateSurfaceMacOS(gnWindowSurfaceHandle windowSurface, gnInstanceHandle instance, gnMacOSWindowSurfaceInfo createInfo) {
|
gnReturnCode checkCreateSurfaceMacOS(gnWindowSurfaceHandle windowSurface, gnInstanceHandle instance, gnMacOSWindowSurfaceInfo createInfo) {
|
||||||
loaderLayer* nextLayer = loaderGetNextLayer(instance);
|
loaderLayer* nextLayer = loaderGetNextLayer(instance);
|
||||||
if (nextLayer->instanceFunctions._gnCreateMacOSWindowSurface == NULL) {
|
if (nextLayer->instanceFunctions._gnCreateMacOSWindowSurface == NULL) {
|
||||||
@@ -82,6 +83,22 @@ gnReturnCode checkCreateSurfaceMacOS(gnWindowSurfaceHandle windowSurface, gnInst
|
|||||||
}
|
}
|
||||||
return nextLayer->instanceFunctions._gnCreateMacOSWindowSurface(windowSurface, instance, createInfo);
|
return nextLayer->instanceFunctions._gnCreateMacOSWindowSurface(windowSurface, instance, createInfo);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef GN_PLATFORM_LINUX
|
||||||
|
#ifdef GN_WINDOW_X11
|
||||||
|
gnReturnCode checkCreateX11WindowSurface(gnWindowSurface surface, gnInstance instance, gnX11WindowSurfaceInfo info) {
|
||||||
|
loaderLayer* nextLayer = loaderGetNextLayer(instance);
|
||||||
|
if (nextLayer->instanceFunctions._gnCreateX11WindowSurface == NULL) {
|
||||||
|
gnDebuggerSetErrorMessage(instance->debugger, (gnMessageData){
|
||||||
|
.message = gnCreateString("Failed to load _gnCreateX11WindowSurface this may indicate a bug within gryphn")
|
||||||
|
});
|
||||||
|
resetLayer(instance);
|
||||||
|
return GN_FAILED_TO_LOAD_FUNCTION;
|
||||||
|
}
|
||||||
|
return nextLayer->instanceFunctions._gnCreateX11WindowSurface(surface, instance, info);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
void checkDestroyWindowSurface(gnWindowSurfaceHandle windowSurface) {
|
void checkDestroyWindowSurface(gnWindowSurfaceHandle windowSurface) {
|
||||||
loaderLayer* nextLayer = loaderGetNextLayer(windowSurface->instance);
|
loaderLayer* nextLayer = loaderGetNextLayer(windowSurface->instance);
|
||||||
|
@@ -14,6 +14,11 @@ void checkDestroyOutputDevice(gnOutputDeviceHandle device);
|
|||||||
#ifdef GN_PLATFORM_MACOS
|
#ifdef GN_PLATFORM_MACOS
|
||||||
gnReturnCode checkCreateSurfaceMacOS(gnWindowSurfaceHandle windowSurface, gnInstanceHandle instance, gnMacOSWindowSurfaceInfo createInfo);
|
gnReturnCode checkCreateSurfaceMacOS(gnWindowSurfaceHandle windowSurface, gnInstanceHandle instance, gnMacOSWindowSurfaceInfo createInfo);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef GN_PLATFORM_LINUX
|
||||||
|
#ifdef GN_WINDOW_X11
|
||||||
|
gnReturnCode checkCreateX11WindowSurface(gnWindowSurface surface, gnInstance instance, gnX11WindowSurfaceInfo info);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
void checkDestroyWindowSurface(gnWindowSurfaceHandle windowSurface);
|
void checkDestroyWindowSurface(gnWindowSurfaceHandle windowSurface);
|
||||||
gnSurfaceDetails checkGetSurfaceDetails(gnWindowSurfaceHandle windowSurface, gnPhysicalDevice device);
|
gnSurfaceDetails checkGetSurfaceDetails(gnWindowSurfaceHandle windowSurface, gnPhysicalDevice device);
|
||||||
|
Reference in New Issue
Block a user