Check for full screen (no windows system support) before having PUI draw
it's ugly excuse for a mouse. :-) The check is probably not general enough, but it can be improved as more and varied hardware is tested.
This commit is contained in:
parent
3a6278c4e0
commit
e3cd2005ba
1 changed files with 54 additions and 38 deletions
42
GUI/gui.cxx
42
GUI/gui.cxx
|
@ -22,8 +22,14 @@
|
|||
* (Log is kept at end of this file)
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <Include/general.h>
|
||||
|
||||
#include "gui.h"
|
||||
#define USING_3DFX
|
||||
|
||||
|
||||
puMenuBar *mainMenuBar;
|
||||
puButton *hideMenuButton;
|
||||
|
@ -125,16 +131,32 @@ puCallback helpSubmenuCb [] = { notCb, notCb, NULL };
|
|||
|
||||
void guiInit()
|
||||
{
|
||||
fgGENERAL *g;
|
||||
char *mesa_win_state;
|
||||
|
||||
g = &general;
|
||||
|
||||
// Initialize PUI
|
||||
puInit();
|
||||
#ifdef USING_3DFX
|
||||
|
||||
// Determine if we need to render the cursor, or if the windowing
|
||||
// system will do it. First test if we are rendering with glide.
|
||||
if ( strstr ( g->glRenderer, "Glide" ) ) {
|
||||
// Test for the MESA_GLX_FX env variable
|
||||
if ( (mesa_win_state = getenv( "MESA_GLX_FX" )) != NULL) {
|
||||
// test if we are fullscreen mesa/glide
|
||||
if ( (mesa_win_state[0] == 'f') || (mesa_win_state[0] == 'F') ) {
|
||||
puShowCursor ();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// puSetDefaultStyle ( PUSTYLE_SMALL_BEVELLED );
|
||||
puSetDefaultStyle ( PUSTYLE_DEFAULT );
|
||||
puSetDefaultColourScheme (0.2, 0.4, 0.8);
|
||||
|
||||
/* OK the rest is largerly put in here to mimick Steve Baker's "complex" example
|
||||
It should change in future versions */
|
||||
/* OK the rest is largerly put in here to mimick Steve Baker's
|
||||
"complex" example It should change in future versions */
|
||||
|
||||
timerText = new puText (300, 10);
|
||||
timerText -> setColour (PUCOL_LABEL, 1.0, 1.0, 1.0);
|
||||
|
@ -153,15 +175,9 @@ void guiInit()
|
|||
mainMenuBar -> add_submenu ("Edit", editSubmenu, editSubmenuCb);
|
||||
mainMenuBar -> add_submenu ("View", viewSubmenu, viewSubmenuCb);
|
||||
mainMenuBar -> add_submenu ("Aircraft", aircraftSubmenu, aircraftSubmenuCb);
|
||||
mainMenuBar -> add_submenu ("Environment", environmentSubmenu, environmentSubmenuCb);
|
||||
mainMenuBar -> add_submenu ("Environment", environmentSubmenu,
|
||||
environmentSubmenuCb);
|
||||
mainMenuBar -> add_submenu ("Options", optionsSubmenu, optionsSubmenuCb);
|
||||
mainMenuBar -> add_submenu ("Help", helpSubmenu, helpSubmenuCb);
|
||||
mainMenuBar-> close ();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue