Mercurial > sdl-ios-xcode
comparison src/video/ps3/SDL_ps3video.h @ 3257:94fb40a4a9a7
Merged Martin's code changes from Google Summer of Code 2009
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 07 Sep 2009 04:51:29 +0000 |
parents | |
children | f7b03b6838cb |
comparison
equal
deleted
inserted
replaced
3256:83c87f2b2aab | 3257:94fb40a4a9a7 |
---|---|
1 /* | |
2 SDL - Simple DirectMedia Layer | |
3 Copyright (C) 1997-2009 Sam Lantinga | |
4 | |
5 This library is free software; you can redistribute it and/or | |
6 modify it under the terms of the GNU Lesser General Public | |
7 License as published by the Free Software Foundation; either | |
8 version 2.1 of the License, or (at your option) any later version. | |
9 | |
10 This library is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 Lesser General Public License for more details. | |
14 | |
15 You should have received a copy of the GNU Lesser General Public | |
16 License along with this library; if not, write to the Free Software | |
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
18 | |
19 Sam Lantinga | |
20 slouken@libsdl.org | |
21 */ | |
22 #include "SDL_config.h" | |
23 | |
24 #ifndef _SDL_ps3video_h | |
25 #define _SDL_ps3video_h | |
26 | |
27 #include "../SDL_sysvideo.h" | |
28 #include "SDL_ps3spe_c.h" | |
29 | |
30 #include <linux/fb.h> | |
31 #include <asm/ps3fb.h> | |
32 | |
33 /* Debugging | |
34 * 0: No debug messages | |
35 * 1: Video debug messages | |
36 * 2: SPE debug messages | |
37 * 3: Memory adresses | |
38 */ | |
39 #define DEBUG_LEVEL 0 | |
40 | |
41 #ifdef DEBUG_LEVEL | |
42 #define deprintf( level, fmt, args... ) \ | |
43 do \ | |
44 { \ | |
45 if ( (unsigned)(level) <= DEBUG_LEVEL ) \ | |
46 { \ | |
47 fprintf( stdout, fmt, ##args ); \ | |
48 fflush( stdout ); \ | |
49 } \ | |
50 } while ( 0 ) | |
51 #else | |
52 #define deprintf( level, fmt, args... ) | |
53 #endif | |
54 | |
55 /* Default framebuffer device on PS3 */ | |
56 #define PS3DEV "/dev/fb0" | |
57 | |
58 /* Private display data */ | |
59 typedef struct SDL_VideoData | |
60 { | |
61 /* Framebuffer device descriptor */ | |
62 int fbdev; | |
63 /* mmap'd access to fbdev */ | |
64 uint8_t * frame_buffer; | |
65 /* SPE threading stuff of the framebuffer */ | |
66 spu_data_t * fb_thread_data; | |
67 /* Framebuffer transfer data */ | |
68 volatile struct fb_writer_parms_t * fb_parms __attribute__((aligned(128))); | |
69 } SDL_VideoData; | |
70 | |
71 typedef struct SDL_DisplayModeData | |
72 { | |
73 unsigned long mode; | |
74 //struct ps3fb_ioctl_res res; | |
75 } PS3_DisplayModeData; | |
76 | |
77 #endif /* _SDL_ps3video_h */ | |
78 | |
79 /* vi: set ts=4 sw=4 expandtab: */ |