Skip to content

Commit 642d4cc

Browse files
committed
border fix on pc intro
1 parent 6a428ac commit 642d4cc

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Source/PC/Graphics_PC.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,7 @@ void cGraphics_PC::Mission_Intro( const std::vector<cPosition>& pPositions, cons
945945
int16 word_42871 = 0;
946946
int16 word_42873 = 0;
947947
int16 word_42875 = 0;
948+
static int16 mouseCheck = 0;
948949

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

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

1018-
mFodder->Mouse_Inputs_Get();
1019+
// This loop runs fast enough that the cursor can get stuck at the window border
1020+
// as focus events havnt been received for the mouse leaving the window
1021+
++mouseCheck;
1022+
if (mouseCheck % 5 == 0) {
1023+
mouseCheck = 0;
1024+
mFodder->Mouse_Inputs_Get();
1025+
}
10191026
mFodder->Video_SurfaceRender();
10201027
mFodder->mWindow->Cycle();
10211028
mFodder->eventsProcess();

0 commit comments

Comments
 (0)