Accounted for window pixel size for Linux window size.

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
sigonasr2 2024-02-19 02:14:47 -06:00
parent 9ed0f23686
commit c56253c4cf
2 changed files with 2 additions and 1 deletions

View File

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

View File

@ -6706,7 +6706,7 @@ namespace olc
virtual void SetWindowSize(vi2d size)override{ virtual void SetWindowSize(vi2d size)override{
if(!ptrPGE->IsFullscreen()){ if(!ptrPGE->IsFullscreen()){
XMapWindow(olc_Display, olc_Window); 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);
} }
} }