Skip to content

SUPERNOVA: Add keymapper support#6709

Merged
sev- merged 1 commit intoscummvm:masterfrom
aunnoman1:supernova
Jun 19, 2025
Merged

SUPERNOVA: Add keymapper support#6709
sev- merged 1 commit intoscummvm:masterfrom
aunnoman1:supernova

Conversation

@aunnoman1
Copy link
Contributor

No description provided.

@OMGPizzaGuy OMGPizzaGuy added the GSoC Part of a Google Summer of Code project label Jun 12, 2025
@aunnoman1 aunnoman1 marked this pull request as ready for review June 12, 2025 14:21
Copy link
Member

@criezy criezy left a comment

Choose a reason for hiding this comment

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

It looks good, and is working well. But I added a few comments on things that I think could maybe be improved.


keymapper->getKeymap("menu")->setEnabled(false);
keymapper->getKeymap("supernova-default")->setEnabled(true);
keymapper->getKeymap("improved-mode")->setEnabled(true);
Copy link
Member

Choose a reason for hiding this comment

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

I am wondering, would it make sense to only enable this keymap if _improved is true rather than check for _improved in GameManager::processInput?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is possible and should work. however it would mean writing checks for _improved every where this keymap is enabled, rather than a single check in GameManager::processInput . let me know if I should change it.

Copy link
Member

Choose a reason for hiding this comment

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

My suggestion was to replace keymapper->getKeymap("improved-mode")->setEnabled(true); with keymapper->getKeymap("improved-mode")->setEnabled(_improved); (or _vm->_improved). But that was a minor suggestion which I think might be a little bit cleaner, and I think your code is fine as it is. So unless another reviewer thinks it would be better to change it, I think you can leave it as it is currently.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh, it seems I misunderstood. I've left it unchanged for now.

Copy link
Member

@criezy criezy left a comment

Choose a reason for hiding this comment

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

It seems good to me.
There is an open question on whether it would be cleaner to only enable the improved keymap when the improved option is on. But I don't see any drawbacks with the way it is currently handled.

@sev-
Copy link
Member

sev- commented Jun 19, 2025

Thank you!

@sev- sev- merged commit aada306 into scummvm:master Jun 19, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GSoC Part of a Google Summer of Code project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants