Remove full screen mode for now, doesn't seem practical in GNUstep
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@37 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
b79165766c
commit
bdadb3af68
@ -169,10 +169,6 @@ extern int debug;
|
||||
- (void) playiTunesPlaylist:(NSString *)playlist_name;
|
||||
- (void) pauseiTunes;
|
||||
|
||||
#ifdef GNUSTEP
|
||||
- (void) goX11Fullscreen;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
@ -851,68 +851,5 @@ static int _compareModes(id arg1, id arg2, void *context)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef GNUSTEP
|
||||
- (void) goX11Fullscreen
|
||||
{
|
||||
Display *dpy;
|
||||
int screen;
|
||||
|
||||
// already full screen?
|
||||
if(fullscreen)
|
||||
return;
|
||||
fullscreen=YES;
|
||||
|
||||
// use X11 to find the size of the current display.
|
||||
dpy=XOpenDisplay(NULL);
|
||||
if(!dpy)
|
||||
{
|
||||
NSLog(@"XOpenDisplay returned NULL!");
|
||||
return;
|
||||
}
|
||||
|
||||
screen=DefaultScreen(dpy);
|
||||
fsGeometry=NSMakeRect(0, 0,
|
||||
DisplayWidth(dpy, screen),
|
||||
DisplayHeight(dpy, screen));
|
||||
NSLog(@"fullscreen = %f x %f", fsGeometry.size.width, fsGeometry.size.height);
|
||||
// done with X
|
||||
XCloseDisplay(dpy);
|
||||
|
||||
fsGameWindow = [NSWindow alloc];
|
||||
fsGameWindow = [gameWindow initWithContentRect: fsGeometry
|
||||
styleMask: 0
|
||||
backing: NSBackingStoreBuffered
|
||||
defer: NO];
|
||||
[fsGameWindow makeKeyAndOrderFront: nil];
|
||||
/*
|
||||
fullScreenContext = [[NSOpenGLContext alloc]
|
||||
initWithFormat:[NSOpenGLView defaultPixelFormat]
|
||||
shareContext:[gameView openGLContext]];
|
||||
|
||||
if (fullScreenContext == nil)
|
||||
{
|
||||
NSLog(@"***** Failed to create fullScreenContext");
|
||||
return;
|
||||
} */
|
||||
|
||||
switchView = [[MyOpenGLView alloc]
|
||||
initWithFrame: fsGeometry
|
||||
pixelFormat: [NSOpenGLView defaultPixelFormat]];
|
||||
|
||||
[fsGameWindow setContentView: switchView];
|
||||
//[switchView setOpenGLContext: fullScreenContext];
|
||||
[switchView setOpenGLContext: [gameView openGLContext]];
|
||||
[[switchView openGLContext] setView: switchView];
|
||||
[switchView drawRect: fsGeometry];
|
||||
[fsGameWindow makeFirstResponder: switchView];
|
||||
[[switchView openGLContext] makeCurrentContext];
|
||||
[switchView initialiseGLWithSize: fsGeometry.size];
|
||||
|
||||
// set up the window to accept mouseMoved events
|
||||
[fsGameWindow setAcceptsMouseMovedEvents:YES];
|
||||
[self setGameView: switchView];
|
||||
}
|
||||
#endif // ifdef GNUSTEP
|
||||
|
||||
@end
|
||||
|
||||
|
@ -70,14 +70,14 @@ Your fair use and other rights are in no way affected by the above.
|
||||
#define GUI_ROW_OPTIONS_LOAD 9
|
||||
#define GUI_ROW_OPTIONS_BEGIN_NEW 10
|
||||
#define GUI_ROW_OPTIONS_OPTIONS 11
|
||||
#define GUI_ROW_OPTIONS_DISPLAY 12
|
||||
|
||||
#ifdef GNUSTEP
|
||||
#define GUI_ROW_OPTIONS_OOTUNES 13
|
||||
#define GUI_ROW_OPTIONS_DETAIL 14
|
||||
#define GUI_ROW_OPTIONS_STRICT 15
|
||||
#define GUI_ROW_OPTIONS_QUIT 16
|
||||
#define GUI_ROW_OPTIONS_OOTUNES 12
|
||||
#define GUI_ROW_OPTIONS_DETAIL 13
|
||||
#define GUI_ROW_OPTIONS_STRICT 14
|
||||
#define GUI_ROW_OPTIONS_QUIT 15
|
||||
#else
|
||||
#define GUI_ROW_OPTIONS_DISPLAY 12
|
||||
#define GUI_ROW_OPTIONS_SPEECH 13
|
||||
#define GUI_ROW_OPTIONS_OOTUNES 14
|
||||
#define GUI_ROW_OPTIONS_DETAIL 15
|
||||
|
@ -3318,13 +3318,13 @@ static BOOL queryPressed;
|
||||
int load_row = GUI_ROW_OPTIONS_LOAD;
|
||||
int begin_new_row = GUI_ROW_OPTIONS_BEGIN_NEW;
|
||||
int options_row = GUI_ROW_OPTIONS_OPTIONS;
|
||||
int display_row = GUI_ROW_OPTIONS_DISPLAY;
|
||||
#ifdef GNUSTEP
|
||||
// quit only appears in GNUstep as users aren't
|
||||
// used to Cmd-Q equivs.
|
||||
int quit_row = GUI_ROW_OPTIONS_QUIT;
|
||||
#else
|
||||
// Macintosh only
|
||||
int display_row = GUI_ROW_OPTIONS_DISPLAY;
|
||||
int speech_row = GUI_ROW_OPTIONS_SPEECH;
|
||||
#endif
|
||||
int ootunes_row = GUI_ROW_OPTIONS_OOTUNES;
|
||||
@ -3416,12 +3416,7 @@ static BOOL queryPressed;
|
||||
disc_operation_in_progress = NO;
|
||||
}
|
||||
|
||||
#ifdef GNUSTEP
|
||||
if (([gui selectedRow] == display_row) && [gameView isDown:13])
|
||||
{
|
||||
[controller goX11Fullscreen];
|
||||
}
|
||||
#else
|
||||
#ifndef GNUSTEP
|
||||
if (([gui selectedRow] == display_row)&&(([gameView isDown:gvArrowKeyRight])||([gameView isDown:gvArrowKeyLeft]))&&(!switching_resolution))
|
||||
{
|
||||
int direction = ([gameView isDown:gvArrowKeyRight]) ? 1 : -1;
|
||||
@ -6184,10 +6179,7 @@ static BOOL toggling_music;
|
||||
{
|
||||
mode=[(NSArray *)[controller displayModes] objectAtIndex:displayModeIndex];
|
||||
}
|
||||
#ifdef GNUSTEP
|
||||
// Full screen or not full screen are the only options.
|
||||
NSString *displayModeString=[NSString stringWithFormat:@" Full screen"];
|
||||
#else
|
||||
#ifndef GNUSTEP
|
||||
int modeWidth = [[mode objectForKey: (NSString *)kCGDisplayWidth] intValue];
|
||||
int modeHeight = [[mode objectForKey: (NSString *)kCGDisplayHeight] intValue];
|
||||
int modeRefresh = [[mode objectForKey: (NSString *)kCGDisplayRefreshRate] intValue];
|
||||
@ -6203,19 +6195,23 @@ static BOOL toggling_music;
|
||||
int load_row = GUI_ROW_OPTIONS_LOAD;
|
||||
int begin_new_row = GUI_ROW_OPTIONS_BEGIN_NEW;
|
||||
int options_row = GUI_ROW_OPTIONS_OPTIONS;
|
||||
int display_row = GUI_ROW_OPTIONS_DISPLAY;
|
||||
#ifdef GNUSTEP
|
||||
// GNUstep needs a quit option at present (no Cmd-Q) but
|
||||
// doesn't need speech.
|
||||
int quit_row = GUI_ROW_OPTIONS_QUIT;
|
||||
#else
|
||||
int display_row = GUI_ROW_OPTIONS_DISPLAY;
|
||||
int speech_row = GUI_ROW_OPTIONS_SPEECH;
|
||||
#endif
|
||||
int ootunes_row = GUI_ROW_OPTIONS_OOTUNES;
|
||||
int detail_row = GUI_ROW_OPTIONS_DETAIL;
|
||||
int strict_row = GUI_ROW_OPTIONS_STRICT;
|
||||
|
||||
|
||||
#ifdef GNUSTEP
|
||||
int first_sel_row = (canLoadOrSave)? save_row : ootunes_row;
|
||||
#else
|
||||
int first_sel_row = (canLoadOrSave)? save_row : display_row;
|
||||
#endif
|
||||
if (canQuickSave)
|
||||
first_sel_row = quicksave_row;
|
||||
|
||||
@ -6240,7 +6236,9 @@ static BOOL toggling_music;
|
||||
[gui setText:@" xine integration: ON " forRow:ootunes_row align:GUI_ALIGN_CENTER];
|
||||
else
|
||||
[gui setText:@" xine integration: OFF " forRow:ootunes_row align:GUI_ALIGN_CENTER];
|
||||
[gui setText:displayModeString forRow:display_row align:GUI_ALIGN_CENTER];
|
||||
// full screen mode is probably not possible in GNUstep.
|
||||
// [gui setText:displayModeString
|
||||
// forRow:display_row align:GUI_ALIGN_CENTER];
|
||||
|
||||
// quit menu option
|
||||
[gui setText:@" Exit game " forRow:quit_row align:GUI_ALIGN_CENTER];
|
||||
|
Loading…
x
Reference in New Issue
Block a user