Accounted for window pixel size for Linux window size.

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
pull/35/head
sigonasr2 11 months ago
parent 9ed0f23686
commit c56253c4cf
  1. 1
      Adventures in Lestoria/AdventuresInLestoria.cpp
  2. 2
      Adventures in Lestoria/olcPixelGameEngine.h

@ -102,6 +102,7 @@ AiL*game;
#undef KEY_SCROLLDOWN //Stupid Linux
#undef KEY_BACK //Stupid Linux
#undef KEY_SELECT //Stupid Linux
#undef KEY_ENTER //Stupid Linux
InputGroup AiL::KEY_LEFT;
InputGroup AiL::KEY_RIGHT;
InputGroup AiL::KEY_UP;

@ -6706,7 +6706,7 @@ namespace olc
virtual void SetWindowSize(vi2d size)override{
if(!ptrPGE->IsFullscreen()){
XMapWindow(olc_Display, olc_Window);
XResizeWindow(olc_Display, olc_Window, size.x, size.y);
XResizeWindow(olc_Display, olc_Window, size.x*ptrPGE->GetPixelSize().x, size.y*ptrPGE->GetPixelSize().y);
}
}

Loading…
Cancel
Save