From 2bbe6a1e97e438045e3432613f358ae8054af4fd Mon Sep 17 00:00:00 2001 From: Steve Date: Thu, 26 Nov 2015 08:16:54 +0000 Subject: [PATCH] Warp mouse to center of screen, to prevent scrolling after dismissing dialog. --- src/galaxy/galacticMap.c | 5 +---- src/galaxy/galacticMap.h | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/galaxy/galacticMap.c b/src/galaxy/galacticMap.c index 884bcc9..f9f19e0 100644 --- a/src/galaxy/galacticMap.c +++ b/src/galaxy/galacticMap.c @@ -129,10 +129,6 @@ static void logic(void) case SHOW_STAR_SYSTEM: doStarSystemView(); break; - - case SHOW_STATS: - doStats(); - break; } doPulses(); @@ -606,6 +602,7 @@ static void handleKeyboard(void) break; case SHOW_STAR_SYSTEM: + setMouse(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2); show = SHOW_GALAXY; break; diff --git a/src/galaxy/galacticMap.h b/src/galaxy/galacticMap.h index 13b340d..6b37f44 100644 --- a/src/galaxy/galacticMap.h +++ b/src/galaxy/galacticMap.h @@ -65,7 +65,7 @@ extern void initStatsDisplay(void); extern void updateStarSystemMissions(void); extern StarSystem *getStarSystem(char *name); extern int getDistance(int x1, int y1, int x2, int y2); -extern void doStats(void); +extern void setMouse(int x, int y); extern App app; extern Colors colors;