ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/video_macosx.h
Revision: 1.5
Committed: 2003-01-10T23:18:02Z (21 years, 10 months ago) by nigel
Content type: text/plain
Branch: MAIN
Changes since 1.4: +3 -2 lines
Log Message:
Change MIN_HEIGHT, add new one for classic mode

File Contents

# Content
1 /*
2 * video_macosx.h - Some video constants and globals
3 *
4 * $Id: video_macosx.h,v 1.4 2002/12/18 12:05:48 nigel Exp $
5 *
6 * Basilisk II (C) 1997-2001 Christian Bauer
7 *
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 #define CGDRAWBITMAP
27 //#define CGIMAGEREF
28 //#define NSBITMAP
29
30 // The frames-per-second benchmark function on my machine does roughly:
31 //
32 // OS: 10.1.5 10.2.2
33 // CGDRAWBITMAP 15.2 36.6
34 // CGIMAGEREF 15.0 27-135(i)
35 // NSBITMAP 15.1 26.9
36 //
37 // (i) This seems to vary wildly between different builds on the same machine.
38 // I don't know why, but I definately don't trust it. Recently I noticed
39 // that it also varies by alpha channel strategy:
40 // kCGImageAlphaNone 36.6fps
41 // kCGImageAlphaPremultipliedFirst 112fps
42 // kCGImageAlphaNoneSkipFirst 135fps
43
44 /* When the BasiliskII video driver respects the alpha bits, set this to let us use */
45 /* kCGImageAlphaPremultipliedFirst, and to have nice rounded corners on the screen. */
46 //#define CG_USE_ALPHA
47 /* At the moment, it writes in the fill 32bits :-( */
48
49
50 #define MIN_WIDTH 512
51 #define MIN_HEIGHT 384
52 #define MIN_HEIGHTC 342 // For classic emulation
53
54 #define MAX_WIDTH 1240
55 #define MAX_HEIGHT 1024
56
57 // Display types
58 enum
59 {
60 DISPLAY_OPENGL,
61 DISPLAY_SCREEN,
62 DISPLAY_WINDOW
63 };
64
65
66 extern uint8 display_type,
67 frame_skip;
68 extern uint16 init_width,
69 init_height,
70 init_depth;
71
72 extern bool parse_screen_prefs (const char *);
73 extern void resizeWinTo (const uint16, const uint16);
74
75 #import <AppKit/NSWindow.h>
76 #import "EmulatorView.h"
77
78 extern NSWindow *the_win;
79 extern EmulatorView *output;