summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2021-02-11 20:51:13 +0100
committeraap <aap@papnet.eu>2021-02-12 00:06:54 +0100
commitf3bfdd78571f9335f2274b047b127747457a8e79 (patch)
treef81772ce8d40f5956bb2677c1dd6e0826eb11e3f /src/core
parentMerge remote-tracking branch 'origin/master' (diff)
downloadre3-f3bfdd78571f9335f2274b047b127747457a8e79.tar
re3-f3bfdd78571f9335f2274b047b127747457a8e79.tar.gz
re3-f3bfdd78571f9335f2274b047b127747457a8e79.tar.bz2
re3-f3bfdd78571f9335f2274b047b127747457a8e79.tar.lz
re3-f3bfdd78571f9335f2274b047b127747457a8e79.tar.xz
re3-f3bfdd78571f9335f2274b047b127747457a8e79.tar.zst
re3-f3bfdd78571f9335f2274b047b127747457a8e79.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/main.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/main.cpp b/src/core/main.cpp
index af0d556a..58e77db3 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -1,8 +1,10 @@
#include "common.h"
+#include <time.h>
#include "rpmatfx.h"
#include "rphanim.h"
#include "rpskin.h"
#include "rtbmp.h"
+#include "rtpng.h"
#ifdef ANISOTROPIC_FILTERING
#include "rpanisot.h"
#endif
@@ -354,7 +356,11 @@ RwGrabScreen(RwCamera *camera, RwChar *filename)
strcpy(temp, CFileMgr::GetRootDirName());
strcat(temp, filename);
+#ifdef THIS_IS_STUPID
if (RtBMPImageWrite(pImage, &temp[0]) == nil)
+#else
+ if (RtPNGImageWrite(pImage, &temp[0]) == nil)
+#endif
result = false;
RwImageDestroy(pImage);
return result;
@@ -373,6 +379,7 @@ DoRWStuffEndOfFrame(void)
RsCameraShowRaster(Scene.camera);
#ifndef MASTER
char s[48];
+#ifdef THIS_IS_STUPID
if (CPad::GetPad(1)->GetLeftShockJustDown()) {
// try using both controllers for this thing... crazy bastards
if (CPad::GetPad(0)->GetRightStickY() > 0) {
@@ -384,6 +391,12 @@ DoRWStuffEndOfFrame(void)
RwGrabScreen(Scene.camera, s);
}
}
+#else
+ if (CPad::GetPad(1)->GetLeftShockJustDown() || CPad::GetPad(0)->GetFJustDown(11)) {
+ sprintf(s, "screen_%11lld.png", time(nil));
+ RwGrabScreen(Scene.camera, s);
+ }
+#endif
#endif // !MASTER
}