-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add game information report and SDL screenshot (#2) #30313
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
8e20fd6
Replay work.
neitsa e23d520
Rework mods_loaded().
neitsa 8dacccd
Remove function from cata_tiles (moved to game.[h,cpp])
neitsa 909b702
Add save_screenshot function.
neitsa 9ca5591
Change ensure_valid_file_name() with actually used parameter.
neitsa b0f04ce
[WIP] report and screenshot actual implementation.
neitsa 812a32c
Astyle game.cpp.
neitsa 92dc655
Add success and error message for screenshot.
neitsa b6eb8d0
Rework all menu options and entries selection.
neitsa 6628a4f
Pass filename to screenshot function...
neitsa 8a5028b
Add missing lambda param.
neitsa cf26131
Move save_screenshot() to sldtiles.cpp.
neitsa 2b6dcef
Astyle.
neitsa e6d4b03
Move "quit to main menu" to debug only.
neitsa a53575a
Add guard for include.
neitsa b1698f6
Remove unused function parameters.
neitsa 567b7d5
get save_screenshot() outside of 'TILES' definition.
neitsa fd93c7d
'extern'-ize save_screenshot().
neitsa 5d1f793
typos.
neitsa 2d39a0a
The save_screenshot() function can't be guarded by TILES define.
neitsa 02487e9
Astyle.
neitsa 382d209
Proper location outside TILES define.
neitsa 1896f25
Proper location.
neitsa 3468b89
silence compiler warning.
neitsa 92a4324
Astyle.
neitsa 2ba01d3
Linux clang and Apple clang do not agree on required lambda parameter…
neitsa a14359d
Fix differing parameter name in declaration and function comment.
neitsa 0b708b3
Integrate codemime's review.
neitsa 45ca9fc
Remove unused headers.
neitsa 69d3cfa
Update src/debug.cpp
neitsa e5bb2b1
Update src/debug_menu.cpp
neitsa 447f33c
Update src/debug.cpp
neitsa 30d9ab0
Update src/game.cpp
neitsa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This doesn't return values properly for function keys, e.g. if debug action is set for F10,
hotkey_for_action
would return -1, thus rendering debug menu unavailable (tested on Windows with VS and MSYS).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.
Yep you're right, I can confirm this behavior, functions keys are not understood by
keys_bound_to
. Hmmm I don't know exactly what should be the next step here...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.
This is the check that returns the bound key from
keys_bound_to
(which returns nothing at the moment):Cataclysm-DDA/src/input.cpp
Lines 667 to 670 in f2df59c
The above comparison with F9 bound to the debug menu:
events_event.type == CATA_INPUT_KEYBOARD
: trueevents_event.sequence.size() == 1
: trueevents_event.sequence.front() < 0xFF
: false (0x111 for F9 for ex.)isprint( events_event.sequence.front()
: false (0x111 is not printable)So technically there's a bound key but the check enforces that it must be a 8-bit key code and be printable...
Is it worth a new function or a patch? should I kill this PR?
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.
We can address this in another PR. It is not your fault and this function behavior existed before.
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.
Ok understood! Thanks for your feedback. I'll try to address this in another PR as you suggested. Thank you!