summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2021-01-21 10:19:01 +0100
committeraap <aap@papnet.eu>2021-01-21 10:19:01 +0100
commit6df52f06b658ebe0267fe5de9cd414d9e46aefb4 (patch)
tree79b3d6057a41b383b54b523190402b2301304316
parent8e825fa629dc3a0d82d1bc3ea8807ac10c986c82 (diff)
enable screenshots for librw
-rw-r--r--src/skel/glfw/glfw.cpp4
-rw-r--r--src/skel/win/win.cpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp
index 5f87d600..786ada5e 100644
--- a/src/skel/glfw/glfw.cpp
+++ b/src/skel/glfw/glfw.cpp
@@ -202,6 +202,10 @@ psGrabScreen(RwCamera *pCamera)
RwImageSetFromRaster(pImage, pRaster);
return pImage;
}
+#else
+ rw::Image *image = RwCameraGetRaster(pCamera)->toImage();
+ if(image)
+ return image;
#endif
return nil;
}
diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp
index 5a0c7db2..cea6c3c0 100644
--- a/src/skel/win/win.cpp
+++ b/src/skel/win/win.cpp
@@ -249,6 +249,10 @@ psGrabScreen(RwCamera *pCamera)
RwImageSetFromRaster(pImage, pRaster);
return pImage;
}
+#else
+ rw::Image *image = RwCameraGetRaster(pCamera)->toImage();
+ if(image)
+ return image;
#endif
return nil;
}