projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
John Fay: Implement the modified logic of the direct/indirect rendering context.
[freeglut]
/
src
/
freeglut_gamemode.c
diff --git
a/src/freeglut_gamemode.c
b/src/freeglut_gamemode.c
index
b909655
..
afa0e7a
100644
(file)
--- a/
src/freeglut_gamemode.c
+++ b/
src/freeglut_gamemode.c
@@
-29,7
+29,7
@@
#include "config.h"
#endif
#include "config.h"
#endif
-#include "../include/GL/freeglut.h"
+#include <GL/freeglut.h>
#include "freeglut_internal.h"
/*
#include "freeglut_internal.h"
/*
@@
-89,7
+89,7
@@
void fghRememberState( void )
/*
* Query the current display settings:
*/
/*
* Query the current display settings:
*/
- fgDisplay.DisplayModeValid =
+ fgDisplay.DisplayModeValid =
XF86VidModeGetModeLine(
fgDisplay.Display,
fgDisplay.Screen,
XF86VidModeGetModeLine(
fgDisplay.Display,
fgDisplay.Screen,
@@
-101,13
+101,16
@@
void fghRememberState( void )
fgWarning( "Runtime use of XF86VidModeGetModeLine failed.\n" );
# else
fgWarning( "Runtime use of XF86VidModeGetModeLine failed.\n" );
# else
-# warning fghRememberState: missing XFree86 video mode extensions, game mode will not change screen resolution when activated
+ /*
+ * XXX warning fghRememberState: missing XFree86 video mode extensions,
+ * XXX game mode will not change screen resolution when activated
+ */
# endif
# endif
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
/* DEVMODE devMode; */
/* DEVMODE devMode; */
-
+
/*
* Grab the current desktop settings...
*/
/*
* Grab the current desktop settings...
*/
@@
-195,10
+198,13
@@
void fghRestoreState( void )
}
# else
}
# else
-# warning fghRestoreState: missing XFree86 video mode extensions, game mode will not change screen resolution when activated
+ /*
+ * XXX warning fghRestoreState: missing XFree86 video mode extensions,
+ * XXX game mode will not change screen resolution when activated
+ */
# endif
# endif
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
/*
* Restore the previously rememebered desktop display settings
/*
* Restore the previously rememebered desktop display settings
@@
-282,10
+288,13
@@
GLboolean fghChangeDisplayMode( GLboolean haveToTest )
return GL_FALSE;
# else
return GL_FALSE;
# else
-# warning fghChangeDisplayMode: missing XFree86 video mode extensions, game mode will not change screen resolution when activated
+ /*
+ * XXX warning fghChangeDisplayMode: missing XFree86 video mode extensions,
+ * XXX game mode will not change screen resolution when activated
+ */
# endif
# endif
-#elif TARGET_HOST_WIN32
+#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
unsigned int displayModes = 0, mode = 0xffffffff;
GLboolean success = GL_FALSE;
unsigned int displayModes = 0, mode = 0xffffffff;
GLboolean success = GL_FALSE;
@@
-423,7
+432,7
@@
int FGAPIENTRY glutEnterGameMode( void )
return FALSE;
}
return FALSE;
}
- fgStructure.GameMode = fgCreateWindow(
+ fgStructure.GameMode = fgCreateWindow(
NULL, "FREEGLUT", 0, 0,
fgState.GameModeSize.X, fgState.GameModeSize.Y, GL_TRUE, GL_FALSE
);
NULL, "FREEGLUT", 0, 0,
fgState.GameModeSize.X, fgState.GameModeSize.Y, GL_TRUE, GL_FALSE
);
@@
-444,7
+453,7
@@
int FGAPIENTRY glutEnterGameMode( void )
/* Move the Pointer to the middle of the fullscreen window */
XWarpPointer(
fgDisplay.Display,
/* Move the Pointer to the middle of the fullscreen window */
XWarpPointer(
fgDisplay.Display,
- None,
+ None,
fgDisplay.RootWindow,
0, 0, 0, 0,
fgState.GameModeSize.X/2, fgState.GameModeSize.Y/2
fgDisplay.RootWindow,
0, 0, 0, 0,
fgState.GameModeSize.X/2, fgState.GameModeSize.Y/2
@@
-467,7
+476,7
@@
int FGAPIENTRY glutEnterGameMode( void )
GrabModeAsync, GrabModeAsync,
fgStructure.GameMode->Window.Handle, None, CurrentTime) )
usleep( 100 );
GrabModeAsync, GrabModeAsync,
fgStructure.GameMode->Window.Handle, None, CurrentTime) )
usleep( 100 );
-
+
/*
* Change input focus to the new window. This will exit the application
* if the new window is not viewable yet, see the XGrabPointer loop above.
/*
* Change input focus to the new window. This will exit the application
* if the new window is not viewable yet, see the XGrabPointer loop above.