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

Exclude Console API code from K95G #301

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

davidrg
Copy link
Owner

@davidrg davidrg commented Aug 30, 2024

K95G.EXE (the GUI version of K95) still includes a reasonable chunk of code for updating a text-mode console window as used by K95.EXE.

Most of this code is never called so all its doing is bloating the executable size (and probably memory use). But surprisingly _ some of it is actually still called. I can't imagine any of it is actually doing anything useful in the absence of a console window to work with and I suspect in most cases calling this code is unintentional. Just things missed in the port to a GUI.

In some cases I've just removed the calls, in other cases I've replaced the calls with what should be called, like replacing GetCurPos with VscrnGetCurPos as is done elsewhere where ONETERMUPD is defined.

The result seems ok, but its possible this could introduce subtle bugs. Testing required.

This stuff isn't used by k95g.exe so has no reason to be compiled for k95g.exe. Reduces executable size by around 16K
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.

1 participant