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

ENGINES: add GUI warning when encountering a pirated game #2034

Merged
merged 2 commits into from Feb 3, 2020

Conversation

@ZvikaZ
Copy link
Contributor

ZvikaZ commented Feb 2, 2020

No description provided.

@@ -133,6 +134,8 @@ bool cleanupPirated(ADDetectedGames &matched) {
// We ruled out all variants and now have nothing
if (matched.empty()) {
warning("Illegitimate game copy detected. We provide no support in such cases");
GUI::MessageDialog dialog("Illegitimate game copy detected. We provide no support in such cases", "OK");

This comment has been minimized.

Copy link
@bgK

bgK Feb 2, 2020

Member

This crashes when executed from the command line (scummvm --detect for example). A simple way to fix it is to check is the GUI manager has been instantiated already, if not then the call comes from the command line. Another way, is to do the same thing as with the unknown game dialog. Store in the DetectedGame struct that the game is pirated and display the GUI message when the detection code is called from the GUI.

This comment has been minimized.

Copy link
@ZvikaZ

ZvikaZ Feb 2, 2020

Author Contributor

Thanks for the detailed explanations.
I implemented it with if (GUI::GuiManager::hasInstance()), and updated the PR.

@bluegr

This comment has been minimized.

Copy link
Member

bluegr commented Feb 3, 2020

Looks good now, thanks! Squashing + merging

@bluegr bluegr closed this Feb 3, 2020
@bluegr bluegr reopened this Feb 3, 2020
@bluegr bluegr merged commit de3011f into scummvm:master Feb 3, 2020
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.