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

[1.5] events: ignore ALT modifier if using Keyboard-as-Controller #7606

Merged
merged 1 commit into from
Dec 31, 2024

Conversation

Apaczer
Copy link
Contributor

@Apaczer Apaczer commented Dec 27, 2024

When using HAS_KBCTRL flag, fullscreen hotkey should be avoided IMO (end-user don't expect them to happen on gamepad as well). Generally I wouldn't mind leaving it as it was, but there is weird event happening in DialogUI when only left alone LALT is pressed and game switches between Fullscreen/Windowed mode, so there may be smth more to look in PressKey().

@AJenbo, compiling it for old OE Miyoo devices with F1C100S (ARMv5, 32MB of RAM). I must congratulate for ppl working on this project, cuz the code is very portable even for such obscure platform with little resources 👍 .

@StephenCWills StephenCWills added this to the 1.5.4 milestone Dec 28, 2024
@glebm
Copy link
Collaborator

glebm commented Dec 28, 2024

HAS_KBCTRL is only used on devices that only support fullscreen anyway, so this PR looks good to me (once the comment has been adressed).

OE Miyoo devices with F1C100S (ARMv5, 32MB of RAM)

You may have to use unpacked MPQs for this device to reduce RAM usage and improve load times (I had to for RG99 which also has 32 MiB of RAM). https://github.com/diasurgical/devilutionx-mpq-tools/

disable fullscreen hotkey as such
@Apaczer
Copy link
Contributor Author

Apaczer commented Dec 28, 2024

You may have to use unpacked MPQs for this device to reduce RAM usage and improve load times (I had to for RG99 which also has 32 MiB of RAM). https://github.com/diasurgical/devilutionx-mpq-tools/

Nice tks, the loading times seemed acceptable with spawn.mpq but any speedup is welcome!

@Apaczer
Copy link
Contributor Author

Apaczer commented Dec 28, 2024

@glebm now I remember that I tried with UNPACKED_MPQS, but even after placing unpacked spawn/ in binary directory I got error "Missing spawn.mpq" but VERBOSE says it has found MPQ directory in that spot. Not sure if I had missed some step

@glebm
Copy link
Collaborator

glebm commented Dec 29, 2024

@Apaczer The spawn.mpq from DevilutionX is not compatible with UNPACKED_MPQS (it has mp3 audio rather than wav), perhaps that was the issue? This spawn.mpq should be OK: https://d07riv.github.io/diabloweb/spawn.mpq

Also note that 1.5 and master should use different versions of https://github.com/diasurgical/devilutionx-mpq-tools/.
1.5 is only compatible with the latest release (https://github.com/diasurgical/devilutionx-mpq-tools/releases/tag/1.5.2),
master should use the main branch (but can also use the slightly less efficient output of the 1.5 unpacker)

The most important thing about using it for 32 MiB devices is RAM usage rather than load speed (faster loads are a nice side effect). I think without it you might simply run out of RAM in RAM-heavy places such as dungeon level 16 (depending on how much overhead there is from the OS).

@Apaczer
Copy link
Contributor Author

Apaczer commented Dec 30, 2024

Indeed it is much smoother with unpacked mpq! I continue to have an issue with spawn version (to not go off-topic: diasurgical/devilutionx-mpq-tools#14)

Going back to this change, I think this is good to have it regardless of the issue, but it would be also interesting to investigate why single pressed LALT forces FullScreen hotkey to even start in Dialog's UI (it is also happening on PC when HAS_KBCTRL is true and u have KBCTRL_BUTTON_B=SDLK_LALT assign at compile time)

@AJenbo
Copy link
Member

AJenbo commented Dec 31, 2024

@Apaczer The spawn.mpq from DevilutionX is not compatible with UNPACKED_MPQS (it has mp3 audio rather than wav), perhaps that was the issue? This spawn.mpq should be OK: https://d07riv.github.io/diabloweb/spawn.mpq

it has MP3 mislabeled as wav so it's probably even worse, but older ones do have wave, the right one will be about 50mb in size. You can extract it from the shareware installer using an MPQ tool (like smpq), link is in the main readme.

@AJenbo AJenbo merged commit 25dab89 into diasurgical:1.5 Dec 31, 2024
20 checks passed
@Apaczer Apaczer deleted the nomod_kbdctrl branch January 1, 2025 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants