Skip to content
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

Fix: Don't show screenshot GUI in screenshots #9674

Merged
merged 1 commit into from
Nov 7, 2021

Conversation

2TallTyler
Copy link
Member

Motivation / Problem

Screenshots captured using the "Normal screenshot" button show the screenshot GUI. The other screenshot modes do not.

Unnamed, 1920-11-20

I often see new players posting screenshots using this button on Discord, Reddit, etc., which is typically met with suggestions to use another screen capture tool which doesn't show the screenshot GUI.

I can imagine a player wanting to show other GUI elements like vehicle windows, the status bar ("look at how much money I have!"), and even the main toolbar at top. But I don't see a reason to show the screenshot GUI itself!

Description

Upstreams a JGRPP commit to hide the screenshot GUI when taking a screenshot.

Limitations

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR touches english.txt or translations? Check the guidelines
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, gs_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')

LordAro
LordAro previously requested changes Nov 6, 2021
Copy link
Member

@LordAro LordAro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't blame JGR for the codestyle issues, you did those all by yourself ;) (In theory you should be able to add JGRPP repo as a remote and just cherry-pick it)

src/screenshot_gui.cpp Outdated Show resolved Hide resolved
src/screenshot_gui.cpp Outdated Show resolved Hide resolved
src/screenshot_gui.cpp Outdated Show resolved Hide resolved
src/screenshot_gui.cpp Outdated Show resolved Hide resolved
@LordAro LordAro added the backport requested This PR should be backport to current release (RC / stable) label Nov 6, 2021
@2TallTyler
Copy link
Member Author

Someday I'll learn not to stay up past my bedtime to submit PRs and miss silly things. 🙄

I prefer not to cherry-pick because going through the motions of adding the code myself helps me understand it and (when I'm paying attention) catch missing code style, Doxygen, or references to other code not present in vanilla.

Copy link
Member

@TrueBrain TrueBrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is absolute nitpicking. But as you indicate you would like to learn from these PRs, here is some feedback. Despite this PR being a few lines, there are just some issues with the logic used :)

src/screenshot_gui.cpp Outdated Show resolved Hide resolved
src/screenshot_gui.cpp Outdated Show resolved Hide resolved
src/screenshot_gui.cpp Outdated Show resolved Hide resolved
src/screenshot_gui.cpp Outdated Show resolved Hide resolved
@2TallTyler
Copy link
Member Author

Thank you for the educational nitpicking! 😄

Let me know what you think of these changes.

src/screenshot_gui.h Outdated Show resolved Hide resolved
TrueBrain
TrueBrain previously approved these changes Nov 7, 2021
src/screenshot_gui.cpp Outdated Show resolved Hide resolved
@michicc michicc merged commit 08cb5ba into OpenTTD:master Nov 7, 2021
@2TallTyler 2TallTyler deleted the hide_screenshot_gui branch November 7, 2021 17:28
TrueBrain pushed a commit to TrueBrain/OpenTTD that referenced this pull request Nov 7, 2021
@TrueBrain TrueBrain added backported This PR is backported to a current release (RC / stable) and removed backport requested This PR should be backport to current release (RC / stable) labels Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported This PR is backported to a current release (RC / stable)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants