Skip to content

dosbox-x.conf from GitHub and binary macOS app don't match, where is the code? #5654

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

Closed
2 tasks done
checktext00 opened this issue Apr 25, 2025 · 4 comments
Closed
2 tasks done
Labels

Comments

@checktext00
Copy link
Contributor

Question

The dosbox-x.conf files from the GitHub repo and the local app don't match

For example, for DOSBox-X 2025.02.01, the GitHub files dosbox-x.reference.conf and dosbox-x.reference.full.conf don't mention either gamelink or raw_mouse_input

See line 18 of the GitHub dosbox-x.reference.conf:

Possible values: default, surface, overlay, ttf, opengl, openglnb, openglhq, openglpp, ddraw, direct3d.

line 18 of the local macOS SDL2 app (the filename on macOS is DOSBox-X 2025.02.01 Preferences):

Possible values: default, surface, overlay, ttf, opengl, openglnb, openglhq, openglpp, gamelink, ddraw, direct3d.

And line 74 of GitHub dosbox-x.reference.conf:

# -> mapperfile_sdl1; mapperfile_sdl2; forcesquarecorner

line 74 of the local macOS SDL2 app:

# -> raw_mouse_input; mapperfile_sdl1; mapperfile_sdl2; forcesquarecorner; gamelink master; gamelink snoop

What's also weird is that a GitHub code search for raw_mouse_input returns zero results, and a search for gamelink returns only results in other files besides the dosbox-x.reference.conf and dosbox-x.reference.full.conf files. So where is the code hosted? The binaries seem to have text strings not found anywhere in the GitHub source repo


There is also a missing gamelink string in the GitHub dosbox-x.reference.full.conf on line 18, and the following lines are completely absent in the GitHub version:

lines 44-45 in the local macOS version:

(from the DOSBox-X command prompt, enter config -all -wc to get this file)

#       raw_mouse_input: Enable this setting to bypass your operating system's mouse acceleration and sensitivity settings.
#                          This works in fullscreen or when the mouse is captured in window mode (SDL2 builds only).

lines 72-73 in the local macOS version:

#       gamelink master: Allow Game Link connections e.g. from Grid Cartographer; required for output=gamelink, otherwise optional.
#        gamelink snoop: Configure the original load address of the software (when running in plain DOSBox) so that gamelink accesses are adjusted for different load addresses.

tested with DOSBox-X 2025.02.01 SDL2 for macOS x86_64 (dosbox-x-macosx-x86_64-20250201150724.zip) on macOS 11

Have you checked that no similar question(s) exist?

  • I have searched and didn't find any similar question.

Code of Conduct & Contributing Guidelines

  • I agree to follow the code of conduct and the contributing guidelines.
@checktext00
Copy link
Contributor Author

It seems the reference .conf files hosted on GitHub (dosbox-x.reference.conf & dosbox-x.reference.full.conf) are both included (byte for byte) in both the SDL1 and SDL2 versions of the dosbox-x.app folder structure:

SDL1
dosbox-x/dosbox-x.app/Contents/Resources/dosbox-x.reference.conf
dosbox-x/dosbox-x.app/Contents/Resources/dosbox-x.reference.full.conf
SDL2
dosbox-x-sdl2/dosbox-x.app/Contents/Resources/dosbox-x.reference.conf
dosbox-x-sdl2/dosbox-x.app/Contents/Resources/dosbox-x.reference.full.conf

but the SDL2 version of the DOSBox-X binary (dosbox-x.app/Contents/MacOS/dosbox-x) injects some extra strings into the .conf files when generating its preference file on startup in

~/Library/Preferences/DOSBox-X 2025.02.01 Preferences

and when generating the full .conf file when using the command config -all -wc from the DOSBox-X command prompt.


Check the extra strings included in the SDL2 dosbox-x.app binary, from a macOS Terminal with the strings command:

gamelink
strings ~/Downloads/dosbox-x-macosx-x86_64-20250201150724/dosbox-x-sdl2/dosbox-x.app/Contents/MacOS/dosbox-x | grep gamelink       
gamelink
gamelink master
Allow Game Link connections e.g. from Grid Cartographer; required for output=gamelink, otherwise optional.
gamelink snoop
gamelink load address
Configure the original load address of the software (when running in plain DOSBox) so that gamelink accesses are adjusted for different load addresses.
output_gamelink
gamelink load address=
OUTPUT_GAMELINK: Not enabled via `gamelink master = true`, falling back to `output=opengl`.
gamelink load address = %i
gamelink load address = %i
raw_mouse_input
strings ~/Downloads/dosbox-x-macosx-x86_64-20250201150724/dosbox-x-sdl2/dosbox-x.app/Contents/MacOS/dosbox-x | grep -e "mouse acceleration" -e raw_mouse_input
raw_mouse_input
Enable this setting to bypass your operating system's mouse acceleration and sensitivity settings.

@checktext00
Copy link
Contributor Author

I have verified that the macOS builds from GitHub Actions also contain these strings, but I can't figure out where they are getting the strings from

Linked macos.yml workflow for GH Actions builds

@checktext00
Copy link
Contributor Author

I found the strings, they are located in src/gui/sdlmain.cpp

gamelink
#if C_GAMELINK
    Pbool = sdl_sec->Add_bool("gamelink master", Property::Changeable::OnlyAtStart, false);
    Pbool->Set_help("Allow Game Link connections e.g. from Grid Cartographer; required for output=gamelink, otherwise optional.");
    Pbool = sdl_sec->Add_bool("gamelink snoop", Property::Changeable::OnlyAtStart, false);
    Pbool->Set_help("Connect to an existing Game Link session and output link data instead of sending own data. Compares memory contents to find a suitable memory offset of peeks.");
    Pint = sdl_sec->Add_int("gamelink load address", Property::Changeable::Always, 0);
    Pbool->Set_help("Configure the original load address of the software (when running in plain DOSBox) so that gamelink accesses are adjusted for different load addresses.");
#endif
raw_mouse_input
#if defined(C_SDL2)
    Pbool = sdl_sec->Add_bool("raw_mouse_input", Property::Changeable::OnlyAtStart, false);
    Pbool->Set_help("Enable this setting to bypass your operating system's mouse acceleration and sensitivity settings.\n"
        "This works in fullscreen or when the mouse is captured in window mode (SDL2 builds only).");
#endif

The reason I couldn't find these strings with the GitHub code search is because GitHub limits searches to files 350 kiB or smaller:

Your search did not match any code

Why wasn't my code found?

Empty files and files over 350 kiB are excluded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant