comparison src/video/dga/SDL_dgavideo.h @ 1895:c121d94672cb

SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 10 Jul 2006 21:04:37 +0000
parents 409974dedf2e
children
comparison
equal deleted inserted replaced
1894:c69cee13dd76 1895:c121d94672cb
48 #define UNLOCK_DISPLAY() 48 #define UNLOCK_DISPLAY()
49 #endif 49 #endif
50 50
51 51
52 /* This is the structure we use to keep track of video memory */ 52 /* This is the structure we use to keep track of video memory */
53 typedef struct vidmem_bucket { 53 typedef struct vidmem_bucket
54 struct vidmem_bucket *prev; 54 {
55 int used; 55 struct vidmem_bucket *prev;
56 int dirty; 56 int used;
57 Uint8 *base; 57 int dirty;
58 unsigned int size; 58 Uint8 *base;
59 struct vidmem_bucket *next; 59 unsigned int size;
60 struct vidmem_bucket *next;
60 } vidmem_bucket; 61 } vidmem_bucket;
61 62
62 /* Private display data */ 63 /* Private display data */
63 struct SDL_PrivateVideoData { 64 struct SDL_PrivateVideoData
64 Display *DGA_Display; 65 {
65 Colormap DGA_colormap; 66 Display *DGA_Display;
66 int visualClass; 67 Colormap DGA_colormap;
68 int visualClass;
67 69
68 #define NUM_MODELISTS 4 /* 8, 16, 24, and 32 bits-per-pixel */ 70 #define NUM_MODELISTS 4 /* 8, 16, 24, and 32 bits-per-pixel */
69 int SDL_nummodes[NUM_MODELISTS]; 71 int SDL_nummodes[NUM_MODELISTS];
70 SDL_Rect **SDL_modelist[NUM_MODELISTS]; 72 SDL_Rect **SDL_modelist[NUM_MODELISTS];
71 73
72 /* Information for the video surface */ 74 /* Information for the video surface */
73 Uint8 *memory_base; 75 Uint8 *memory_base;
74 int memory_pitch; 76 int memory_pitch;
75 SDL_mutex *hw_lock; 77 SDL_mutex *hw_lock;
76 int sync_needed; 78 int sync_needed;
77 int was_flipped; 79 int was_flipped;
78 80
79 /* Information for hardware surfaces */ 81 /* Information for hardware surfaces */
80 vidmem_bucket surfaces; 82 vidmem_bucket surfaces;
81 int surfaces_memtotal; 83 int surfaces_memtotal;
82 int surfaces_memleft; 84 int surfaces_memleft;
83 85
84 /* Information for double-buffering */ 86 /* Information for double-buffering */
85 int flip_page; 87 int flip_page;
86 int flip_yoffset[2]; 88 int flip_yoffset[2];
87 Uint8 *flip_address[2]; 89 Uint8 *flip_address[2];
88 90
89 /* Used to handle DGA events */ 91 /* Used to handle DGA events */
90 int event_base; 92 int event_base;
91 #ifdef LOCK_DGA_DISPLAY 93 #ifdef LOCK_DGA_DISPLAY
92 SDL_mutex *event_lock; 94 SDL_mutex *event_lock;
93 #endif 95 #endif
94 96
95 /* Screensaver settings */ 97 /* Screensaver settings */
96 int screensaver_timeout; 98 int screensaver_timeout;
97 BOOL dpms_enabled; 99 BOOL dpms_enabled;
98 }; 100 };
99 /* Old variable names */ 101 /* Old variable names */
100 #define DGA_Display (this->hidden->DGA_Display) 102 #define DGA_Display (this->hidden->DGA_Display)
101 #define DGA_Screen DefaultScreen(DGA_Display) 103 #define DGA_Screen DefaultScreen(DGA_Display)
102 #define DGA_colormap (this->hidden->DGA_colormap) 104 #define DGA_colormap (this->hidden->DGA_colormap)
118 #define event_lock (this->hidden->event_lock) 120 #define event_lock (this->hidden->event_lock)
119 #define screensaver_timeout (this->hidden->screensaver_timeout) 121 #define screensaver_timeout (this->hidden->screensaver_timeout)
120 #define dpms_enabled (this->hidden->dpms_enabled) 122 #define dpms_enabled (this->hidden->dpms_enabled)
121 123
122 #endif /* _SDL_dgavideo_h */ 124 #endif /* _SDL_dgavideo_h */
125 /* vi: set ts=4 sw=4 expandtab: */