Skip to content

Commit

Permalink
Remove duplicate resizing code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dyrewulfe committed Mar 14, 2018
1 parent 8e04b4d commit 70cb269
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/wincurse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,22 +310,6 @@ LRESULT CALLBACK ProcessMessages(HWND__ *hWnd,unsigned int Msg,
case WM_SIZE:
case WM_SIZING:
needs_resize = true;
RECT WndRect;
if( GetClientRect( WindowHandle, &WndRect ) ) {
TERMINAL_WIDTH = WndRect.right / fontwidth;
TERMINAL_HEIGHT = WndRect.bottom / fontheight;
WindowWidth = TERMINAL_WIDTH * fontwidth;
WindowHeight = TERMINAL_HEIGHT * fontheight;
catacurses::resizeterm();
create_backbuffer();
SetBkMode(backbuffer, TRANSPARENT);//Transparent font backgrounds
SelectObject(backbuffer, font);//Load our font into the DC
color_loader<RGBQUAD>().load( windowsPalette );
if( SetDIBColorTable(backbuffer, 0, windowsPalette.size(), windowsPalette.data() ) == 0 ) {
throw std::runtime_error( "SetDIBColorTable failed" );
}
catacurses::refresh();
}
return 0;

case WM_SYSCHAR:
Expand Down

0 comments on commit 70cb269

Please sign in to comment.