7

I've been trying to figure out how to get Dwarf Fortress to run in a fullscreen window (also know as a "borderless window") for a little while now. F11 sets the game to actual fullscreen, but that is not what I'm looking for as it closes when I Alt + Tab.

My AutoHotKey code to resize the window does not work; it sets the window to be far too small (less than 80x80). Just in case you wanted to see my AutoHotKey code, here it is:

^!g::
WinGetTitle, currentWindow, A
IfWinExist %currentWindow%
{
   WinSet, Style, -0xC00000 ; hide title bar
   WinSet, Style, -0x800000 ; hide thin-line border
   WinSet, Style, -0x400000 ; hide dialog frame
   WinSet, Style, -0x40000 ; hide thickframe/sizebox
   WinMove, , , 0, 0, 2560, 1440
}   
return

Press Ctrl + Alt + G and it should set the currently focused window to fullscreen (2560x1440 in my case).

1
  • I have been successfully done this with other software by writing my own launcher script (for example powershell) and overriding WindowStyle to maximized. This does only work if the Software is written in a particular way, however I am not sure Dwarf fortress is. docs.microsoft.com/en-us/powershell/module/… Jan 23 '18 at 17:12
4

You can adjust the window size via the init.txt file (which is in the data/init subdirectory of your Dwarf Fortress install).

You probably want to find the WINDOWEDX and WINDOWEDY keys and adjust them:

[WINDOWEDX:2560]
[WINDOWEDY:1440]

(This may need tweaking, since I'm not sure if DF uses these numbers for the size of the window or the size of the window's client area; you want the latter).

I don't think there is support in the game for windowed fullscreen otherwise, so hopefully your script does still correctly adjust the window style to eliminate the borders.

1

All you gotta do is change [WINDOWED] to NO

2
  • 2
    Where should that be set?
    – SQB
    Jan 23 '18 at 15:51
  • probably in /data/init/init.txt
    – aslum
    Jan 23 '18 at 21:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.