diff --git a/freeglut/freeglut/src/fg_menu.c b/freeglut/freeglut/src/fg_menu.c index ff1b21e..6a7d96d 100644 --- a/freeglut/freeglut/src/fg_menu.c +++ b/freeglut/freeglut/src/fg_menu.c @@ -76,6 +76,7 @@ static float menu_pen_hback [4] = FREEGLUT_MENU_PEN_HBACK_COLORS; extern GLvoid fgPlatformGetGameModeVMaxExtent( SFG_Window* window, int* x, int* y ); +extern void fghPlatformGetCursorPos(SFG_XYUse *mouse_pos); /* -- PRIVATE FUNCTIONS ---------------------------------------------------- */ @@ -721,7 +722,7 @@ void fgDeactivateMenu( SFG_Window *window ) { /* Get cursor position on screen and convert to relative to parent_window's client area */ SFG_XYUse mouse_pos; - fghPlatformGetMousePos(&mouse_pos); + fghPlatformGetCursorPos(&mouse_pos); mouse_pos.X -= glutGet( GLUT_WINDOW_X ); mouse_pos.Y -= glutGet( GLUT_WINDOW_Y ); diff --git a/freeglut/freeglut/src/mswin/fg_cursor_mswin.c b/freeglut/freeglut/src/mswin/fg_cursor_mswin.c index b0eda70..1241e0a 100644 --- a/freeglut/freeglut/src/mswin/fg_cursor_mswin.c +++ b/freeglut/freeglut/src/mswin/fg_cursor_mswin.c @@ -113,3 +113,12 @@ void fgPlatformWarpPointer ( int x, int y ) } +void fghPlatformGetCursorPos(SFG_XYUse *mouse_pos) +{ + POINT pos; + GetCursorPos(&pos); + + mouse_pos->X = pos.x; + mouse_pos->Y = pos.y; + mouse_pos->Use = GL_TRUE; +} \ No newline at end of file diff --git a/freeglut/freeglut/src/mswin/fg_window_mswin.c b/freeglut/freeglut/src/mswin/fg_window_mswin.c index b09c008..ff47404 100644 --- a/freeglut/freeglut/src/mswin/fg_window_mswin.c +++ b/freeglut/freeglut/src/mswin/fg_window_mswin.c @@ -371,16 +371,6 @@ void fgPlatformSetWindow ( SFG_Window *window ) } -void fghPlatformGetMousePos(SFG_XYUse *mouse_pos) -{ - POINT pos; - GetCursorPos(&pos); - - mouse_pos->X = pos.x; - mouse_pos->Y = pos.y; - mouse_pos->Use = GL_TRUE; -} - /* Returns the width of the window borders based on the window's style. */ void fghGetBorderWidth(const DWORD windowStyle, int* xBorderWidth, int* yBorderWidth)