X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;ds=sidebyside;f=src%2FCommon%2Ffreeglut_menu.c;h=7ad06ba6cb286540fac693fd0ad1054fd10eb3ee;hb=436c30c7420ccdfd10d93d2d9f4be3a540e06ce4;hp=2a963e2165aa8ab46031f4bed3be9e0eddc06b71;hpb=d2f7ea29ea6d946f455f4363c3f058ff2bdfba35;p=freeglut diff --git a/src/Common/freeglut_menu.c b/src/Common/freeglut_menu.c index 2a963e2..7ad06ba 100644 --- a/src/Common/freeglut_menu.c +++ b/src/Common/freeglut_menu.c @@ -84,6 +84,9 @@ static float menu_pen_hfore [4] = {0.0f, 0.0f, 0.0f, 1.0f}; static float menu_pen_hback [4] = {1.0f, 1.0f, 1.0f, 1.0f}; #endif + +extern GLvoid fgPlatformGetGameModeVMaxExtent( SFG_Window* window, int* x, int* y ); + /* -- PRIVATE FUNCTIONS ---------------------------------------------------- */ /* @@ -139,27 +142,28 @@ static void fghDeactivateSubMenu( SFG_MenuEntry *menuEntry ) /* * Private function to get the virtual maximum screen extent */ -static GLvoid fghGetVMaxExtent( SFG_Window* window, int* x, int* y ) -{ - if( fgStructure.GameModeWindow ) - { #if TARGET_HOST_POSIX_X11 - int wx, wy; - Window w; +static GLvoid fgPlatformGetGameModeVMaxExtent( SFG_Window* window, int* x, int* y ) +{ + int wx, wy; + Window w; - XTranslateCoordinates( - fgDisplay.Display, - window->Window.Handle, - fgDisplay.RootWindow, - 0, 0, &wx, &wy, &w); + XTranslateCoordinates( + fgDisplay.Display, + window->Window.Handle, + fgDisplay.RootWindow, + 0, 0, &wx, &wy, &w); - *x = fgState.GameModeSize.X + wx; - *y = fgState.GameModeSize.Y + wy; -#else - *x = glutGet ( GLUT_SCREEN_WIDTH ); - *y = glutGet ( GLUT_SCREEN_HEIGHT ); + *x = fgState.GameModeSize.X + wx; + *y = fgState.GameModeSize.Y + wy; +} #endif - } + + +static GLvoid fghGetVMaxExtent( SFG_Window* window, int* x, int* y ) +{ + if( fgStructure.GameModeWindow ) + fgPlatformGetGameModeVMaxExtent ( window, x, y ); else { *x = fgDisplay.ScreenWidth;