ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/video_macosx.h
Revision: 1.11
Committed: 2007-06-30T07:33:30Z (17 years, 4 months ago) by gbeauche
Content type: text/plain
Branch: MAIN
Changes since 1.10: +6 -1 lines
Log Message:
Use NSIMAGE graphics mode for MacOS X on Intel platforms for now. Otherwise
it's crashing in some Apple code.

File Contents

# User Rev Content
1 nigel 1.1 /*
2     * video_macosx.h - Some video constants and globals
3     *
4 gbeauche 1.11 * $Id: video_macosx.h,v 1.10 2005/01/30 21:42:13 gbeauche Exp $
5 nigel 1.1 *
6 gbeauche 1.10 * Basilisk II (C) 1997-2005 Christian Bauer
7 nigel 1.1 *
8     * This program is free software; you can redistribute it and/or modify
9     * it under the terms of the GNU General Public License as published by
10     * the Free Software Foundation; either version 2 of the License, or
11     * (at your option) any later version.
12     *
13     * This program is distributed in the hope that it will be useful,
14     * but WITHOUT ANY WARRANTY; without even the implied warranty of
15     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16     * GNU General Public License for more details.
17     *
18     * You should have received a copy of the GNU General Public License
19     * along with this program; if not, write to the Free Software
20     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21     */
22    
23     #import <video.h>
24    
25     /* Set the strategy for drawing the bitmap in the Mac OS X window */
26 nigel 1.6 //#define CGDRAWBITMAP
27 gbeauche 1.11 #if defined __i386__
28     //#define CGIMAGEREF
29     #define NSBITMAP
30     #else
31 nigel 1.6 #define CGIMAGEREF
32 nigel 1.4 //#define NSBITMAP
33 gbeauche 1.11 #endif
34 nigel 1.4
35 nigel 1.8 // Using Core Graphics is fastest when rendering 32bit data.
36     // Using CGImageRefs allows us to use all the bitmaps that BasiliskII supports.
37     // When both Basilisk II and OS X are set to 'Thousands', updating a 312x342
38     // window happens at over 500fps under 10.2, and over 600fps on 10.3!
39 nigel 1.4
40     /* When the BasiliskII video driver respects the alpha bits, set this to let us use */
41     /* kCGImageAlphaPremultipliedFirst, and to have nice rounded corners on the screen. */
42     //#define CG_USE_ALPHA
43 nigel 1.9 /* At the moment, it writes in the full 32bits :-( */
44 nigel 1.4
45 nigel 1.1
46     #define MIN_WIDTH 512
47 nigel 1.5 #define MIN_HEIGHT 384
48     #define MIN_HEIGHTC 342 // For classic emulation
49 nigel 1.1
50     #define MAX_WIDTH 1240
51     #define MAX_HEIGHT 1024
52    
53     // Display types
54     enum
55     {
56     DISPLAY_OPENGL,
57     DISPLAY_SCREEN,
58     DISPLAY_WINDOW
59     };
60    
61    
62     extern uint8 display_type,
63     frame_skip;
64     extern uint16 init_width,
65     init_height,
66 nigel 1.3 init_depth;
67 nigel 1.1
68     extern bool parse_screen_prefs (const char *);
69     extern void resizeWinTo (const uint16, const uint16);
70    
71     #import <AppKit/NSWindow.h>
72     #import "EmulatorView.h"
73    
74     extern NSWindow *the_win;
75     extern EmulatorView *output;