VOGONS


First post, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

Before I try to reinvent the wheel, I wonder if anyone has done this already.

For my project, I would like to be able to put a string in the dosbox.conf file somewhere like this:

titlebar=My Program

and have the DOSBox titlebar read something like this:

DOSBox - My Program

I know how to remove things like cycles, RunningProgram, etc., from the titlebar, but I don't know how to get something from the config file into the titlebar. I've experimented with various methods, but all I can get in the titlebar is a "(Null)" where I want the string to be.

Has anyone done something like this already? If so, would you be willing to share your code? If not, I'll keep trying, as I think it might be useful for packaged versions of games, etc.

Reply 1 of 3, by Wengier

User metadata
Rank Member
Rank
Member

Yes, I have done this. You only need to modify the source file sdlmain.cpp. See the attachment for a modified version of sdlmain.cpp which supports this feature. To change the title string, simply add "titlebar=My Program" in the [sdl] section of dosbox.conf. I did not remove things like cycles, but it is obviously easy to be done. Hope this helps.

Attachments

  • Filename
    sdlmain.cpp
    File size
    67.9 KiB
    Downloads
    62 downloads
    File license
    Fair use/fair dealing exception

Reply 3 of 3, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

A loud thank you to both Wengier and ripsaw8080! You're right: I searched for "titlebar" as one word, which wasn't very clever of me. Next time, I'll look for *three* words: "ti tleb ar"... 😉