-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved screenshot plugin + screenshot effects in screenshot / after state change fix #4082
base: develop
Are you sure you want to change the base?
Improved screenshot plugin + screenshot effects in screenshot / after state change fix #4082
Conversation
You did the meme! Thanks for working on this :) |
|
eric already did a fix for this in a seperate branch months ago, idk why he didnt merge it to the latest version tho |
Wait, really? Did I spend all that time for nothing? |
Since we have over 100 open PRs (and many more merged), it's very likely that you'll come up with the same idea as someone else. I recommend doing a thorough search for similar PRs before creating a new one. |
That's actually hilarious |
Just checked, this is a unique PR. |
Sadly no, but I could do that.
Yay! |
Ok, I've got it to show the preview on the last image in the buffer. Ayo.It.s.Fixed.mp4The only thing it needs now is either some sort of delay for when saving each screenshot in the buffer (timers won't work because they reset between states) and/or multi-threading of the screenshot saving, as you can see, it causes the screen to freeze while it processes the images. |
I appreciate you doing the meme every time Please let us know when you get this working with a preview at the end! |
Uh, I just did that? |
Well, your video freezes right now, so we wouldn't want to add that to the game just yet |
Oh, right.
I guess not. |
Alright, I've got it saving asynchronously. I can uncomment the timer so that it saves each screenshot with a delay, though if I do that, whenever the state changes any screenshots not already saved will be lost. If anyone knows of a way to delay the screenshots without that issue I'll update it. |
@EliteMasterEric Alright, I've done what you've requested and finally fixed the screenshot effects sticking around after a state change too! That means this PR now closes 3 issues! Hmm, should I sign my username at the top because it's basically a rework of the entire plugin? |
Because the timer has been killed
457af5d
to
54f502c
Compare
I could make it save the unsaved images on window close/crash too, like the chart editor does with charts (though only if there's less than 100 images in the buffer, of course). I can't decide if I should do it though? |
I think that there should be a very short hard limit on the number of images in the buffer (since you'd only encounter it if you spam the key really hard), like around 10 images maybe. |
Hmm, idk, that's quite a low number. I figured 100 images would be acceptable because it takes a good 20+ seconds of spamming the button really hard to reach it (so much so that it hurts your finger a bit) - for example, in the fourth video #4082 (comment) I took about ~20 images in 4 seconds, and saving them didn't effect gameplay that much since they're spaced out every second. The cap is only really there to catch the people that want to crash the game (or their computer) by making it save thousands of images for no reason or have a macro for the screenshot button to save one every frame or some crap. Hmm, maybe I could make the cap 50 images, rather than 100? I still think there might be a few people who would unintentionally hit that limit though. Perhaps I should investigate how other games handle screenshot saving. I asked how UT2004's screenshots work, and it's nothing like this screenshot plugin - if the screenshot button is pressed, then at the end of the the main draw loop it'll read out the render device's pixels into a buffer and then save them out into a bitmap. It has no buffer and it saves really fast! So I don't think there's a game that has to handle screenshots similar to this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems you removed a feature where you could click on a screenshot preview and it would take you to the screenshot in file explorer. Please add it back.
Dang it, why did you have to spot something? It had just gotten the reviewing internally status back... If you're wondering, it was removed when I commented out that buggy fancy screenshot preview, with the thinking that since steam doesn't do anything like that (it just has a hotkey for opening the screenshot folder), I decided that it wasn't really necessary.
|
0780999
to
98060f4
Compare
Also now saves on window close/crash. Also standardised the option descriptions.
98060f4
to
254748e
Compare
Does this PR close any issues? If so, link them below.
Closes #3765, fixes #2811, fixes #2284
Briefly describe the issue(s) fixed.
The screenshot preview isn't hidden before a bitmap of the screen is taken, now it has it's alpha set to zero right before the bitmap is taken.The screenshot plugin in general.
Ok, that should be the final version. All the issues are fixed now.
Include any relevant screenshots or videos.
First version
ayo.it.s.kinda.fixed.mp4
This doesn't fix screenshot spamming completely, so I'm going to work on this a bit more to see if I can get it to not still break, maybe by making it hold off on showing the preview and cursor again if the screenshot button is constantly pressed.
Second version
2025-02-02.16-59-12.mp4
Third version
2025-02-02.20-53-42.1.mp4
Fourth version - Epilepsy Warning
Epilepsy Warning (just in case you missed the first one)
Ayo.finally.fixed.mp4
22 Screenshots (most are taken on the same second), the encoding and saving of each shot is spaced out one second:






















Final version - Epilepsy Warning
Epilepsy Warning (just in case you missed the first one)
2025-02-16.22-29-14.mp4