Skip to content

Commit

Permalink
attempt to fix mouse clipping. test compile soon.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bitl authored Oct 4, 2018
1 parent 77c5b1f commit 3cb0ef9
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions blackshades/Source/GameLoop.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#include "Game.h"
#include "SoundFX.h"

#ifdef OS9
#include <glut.h>
#else
#include <GL/glut.h>
#endif

extern double multiplier;

Expand Down Expand Up @@ -380,11 +384,15 @@ void Game::ProcessSDLEvents(void)
{
if(checked)
{
SDL_WarpMouse(screenwidth/2, screenheight/2);
int centerX = screenwidth/2;
int centerY = screenheight/2;
if (x != centerX || y != centerY)
{
glutWarpPointer(centerX, centerY);
}
checked = false;
}
else
if(!checked)
else if(!checked)
{
checked = true;
}
Expand Down

0 comments on commit 3cb0ef9

Please sign in to comment.