comparison src/video/fbcon/SDL_fbvideo.h @ 4256:ba587a51f899 SDL-1.2

Vitaly Minko to slouken Hi all, I wrote a patch, which allows user to rotate the screen in case of fbcon driver. The rotation angle is controlled by SDL_VIDEO_FBCON_ROTATION environment variable and possible values are: not set - Not rotating, no shadow. "NONE" - Not rotating, but still using shadow. "CW" - Rotating screen clockwise. "UD" - Rotating screen upside down. "CCW" - Rotating screen counter clockwise. The patch is based on wscons driver, written by Staffan Ulfberg. I tested it on Device: Sharp Zaurus SL-C1000 SDL version: 1.2.13 Kernel version: 2.6.24.4 Best regards, Vitaly.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 28 Sep 2009 06:23:22 +0000
parents a1b03ba2fcd0
children
comparison
equal deleted inserted replaced
4255:5a203e2b0162 4256:ba587a51f899
36 #endif 36 #endif
37 37
38 /* Hidden "this" pointer for the video functions */ 38 /* Hidden "this" pointer for the video functions */
39 #define _THIS SDL_VideoDevice *this 39 #define _THIS SDL_VideoDevice *this
40 40
41 typedef void FB_bitBlit(
42 Uint8 *src_pos,
43 int src_right_delta, /* pixels, not bytes */
44 int src_down_delta, /* pixels, not bytes */
45 Uint8 *dst_pos,
46 int dst_linebytes,
47 int width,
48 int height);
41 49
42 /* This is the structure we use to keep track of video memory */ 50 /* This is the structure we use to keep track of video memory */
43 typedef struct vidmem_bucket { 51 typedef struct vidmem_bucket {
44 struct vidmem_bucket *prev; 52 struct vidmem_bucket *prev;
45 int used; 53 int used;
67 #if SDL_INPUT_TSLIB 75 #if SDL_INPUT_TSLIB
68 struct tsdev *ts_dev; 76 struct tsdev *ts_dev;
69 #endif 77 #endif
70 78
71 char *mapped_mem; 79 char *mapped_mem;
80 char *shadow_mem;
72 int mapped_memlen; 81 int mapped_memlen;
73 int mapped_offset; 82 int mapped_offset;
74 char *mapped_io; 83 char *mapped_io;
75 long mapped_iolen; 84 long mapped_iolen;
76 int flip_page; 85 int flip_page;
77 char *flip_address[2]; 86 char *flip_address[2];
87 int rotate;
88 int shadow_fb; /* Tells whether a shadow is being used. */
89 FB_bitBlit *blitFunc;
90 int physlinebytes; /* Length of a line in bytes in physical fb */
78 91
79 #define NUM_MODELISTS 4 /* 8, 16, 24, and 32 bits-per-pixel */ 92 #define NUM_MODELISTS 4 /* 8, 16, 24, and 32 bits-per-pixel */
80 int SDL_nummodes[NUM_MODELISTS]; 93 int SDL_nummodes[NUM_MODELISTS];
81 SDL_Rect **SDL_modelist[NUM_MODELISTS]; 94 SDL_Rect **SDL_modelist[NUM_MODELISTS];
82 95
108 #define cache_vinfo (this->hidden->cache_vinfo) 121 #define cache_vinfo (this->hidden->cache_vinfo)
109 #define saved_vinfo (this->hidden->saved_vinfo) 122 #define saved_vinfo (this->hidden->saved_vinfo)
110 #define saved_cmaplen (this->hidden->saved_cmaplen) 123 #define saved_cmaplen (this->hidden->saved_cmaplen)
111 #define saved_cmap (this->hidden->saved_cmap) 124 #define saved_cmap (this->hidden->saved_cmap)
112 #define mapped_mem (this->hidden->mapped_mem) 125 #define mapped_mem (this->hidden->mapped_mem)
126 #define shadow_mem (this->hidden->shadow_mem)
113 #define mapped_memlen (this->hidden->mapped_memlen) 127 #define mapped_memlen (this->hidden->mapped_memlen)
114 #define mapped_offset (this->hidden->mapped_offset) 128 #define mapped_offset (this->hidden->mapped_offset)
115 #define mapped_io (this->hidden->mapped_io) 129 #define mapped_io (this->hidden->mapped_io)
116 #define mapped_iolen (this->hidden->mapped_iolen) 130 #define mapped_iolen (this->hidden->mapped_iolen)
117 #define flip_page (this->hidden->flip_page) 131 #define flip_page (this->hidden->flip_page)
118 #define flip_address (this->hidden->flip_address) 132 #define flip_address (this->hidden->flip_address)
133 #define rotate (this->hidden->rotate)
134 #define shadow_fb (this->hidden->shadow_fb)
135 #define blitFunc (this->hidden->blitFunc)
136 #define physlinebytes (this->hidden->physlinebytes)
119 #define SDL_nummodes (this->hidden->SDL_nummodes) 137 #define SDL_nummodes (this->hidden->SDL_nummodes)
120 #define SDL_modelist (this->hidden->SDL_modelist) 138 #define SDL_modelist (this->hidden->SDL_modelist)
121 #define surfaces (this->hidden->surfaces) 139 #define surfaces (this->hidden->surfaces)
122 #define surfaces_memtotal (this->hidden->surfaces_memtotal) 140 #define surfaces_memtotal (this->hidden->surfaces_memtotal)
123 #define surfaces_memleft (this->hidden->surfaces_memleft) 141 #define surfaces_memleft (this->hidden->surfaces_memleft)