Skip to content

Commit

Permalink
Fix for windows adjustable view size
Browse files Browse the repository at this point in the history
  • Loading branch information
Oddzball committed Feb 24, 2013
1 parent 9cbffdf commit cfe3bf0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ debug.log
logg.txt
bindist/
cataclysmdda-*
objwin/*.*
*.exe
6 changes: 3 additions & 3 deletions catacurse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ fin.open("data\\FONTDATA");
}
halfwidth=fontwidth / 2;
halfheight=fontheight / 2;
WindowWidth=80*fontwidth;
WindowHeight=25*fontheight;
WindowWidth=((80*fontwidth) + (OPTIONS[OPT_VIEWPORT_X]));
WindowHeight=((25*fontheight) + (OPTIONS[OPT_VIEWPORT_Y]));
WindowX=(GetSystemMetrics(SM_CXSCREEN) / 2)-WindowWidth/2; //center this
WindowY=(GetSystemMetrics(SM_CYSCREEN) / 2)-WindowHeight/2; //sucker
WinCreate(); //Create the actual window, register it, etc
Expand Down Expand Up @@ -323,7 +323,7 @@ fin.open("data\\FONTDATA");
// WindowCount=0;

delete typeface_c;
mainwin = newwin(25,80,0,0);
mainwin = newwin((25 + OPTIONS[OPT_VIEWPORT_Y]),(80 + OPTIONS[OPT_VIEWPORT_X]),0,0);
return mainwin; //create the 'stdscr' window and return its ref
};

Expand Down

0 comments on commit cfe3bf0

Please sign in to comment.