Skip to content

Commit

Permalink
border fix on pc intro
Browse files Browse the repository at this point in the history
  • Loading branch information
segrax committed Aug 25, 2023
1 parent 6a428ac commit 642d4cc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Source/PC/Graphics_PC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,7 @@ void cGraphics_PC::Mission_Intro( const std::vector<cPosition>& pPositions, cons
int16 word_42871 = 0;
int16 word_42873 = 0;
int16 word_42875 = 0;
static int16 mouseCheck = 0;

mFodder->mVideo_Draw_FrameDataPtr = mBriefing_ParaHeli->data();

Expand Down Expand Up @@ -1015,7 +1016,13 @@ void cGraphics_PC::Mission_Intro( const std::vector<cPosition>& pPositions, cons
if (word_42875 >= 320)
word_42875 = 0;

mFodder->Mouse_Inputs_Get();
// This loop runs fast enough that the cursor can get stuck at the window border
// as focus events havnt been received for the mouse leaving the window
++mouseCheck;
if (mouseCheck % 5 == 0) {
mouseCheck = 0;
mFodder->Mouse_Inputs_Get();
}
mFodder->Video_SurfaceRender();
mFodder->mWindow->Cycle();
mFodder->eventsProcess();
Expand Down

0 comments on commit 642d4cc

Please sign in to comment.