mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-28 11:57:28 +00:00
- Define data of struct gfb_font a const as it's only used to supply font
data and remove the array size from the definition as f.e. the gallant 12 x 22 font data is 256 * 44 in size, exceeding the previously hard- coded size. - Declare the bold8x16 instance of struct gfb_font as const as it's not intended to be changed at run-time as a whole either. - Use __FBSDID in xboxfb.c Tested by: rink
This commit is contained in:
parent
bcc231ecb6
commit
7a89ac4d26
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170837
@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <dev/fb/gfb.h>
|
||||
|
||||
struct gfb_font bold8x16 = {
|
||||
const struct gfb_font bold8x16 = {
|
||||
8,
|
||||
16,
|
||||
{
|
||||
|
@ -35,7 +35,7 @@
|
||||
struct gfb_font {
|
||||
int width;
|
||||
int height;
|
||||
u_char data[256 * 32];
|
||||
const u_char data[];
|
||||
};
|
||||
|
||||
#endif /* _FB_GFB_H_ */
|
||||
|
@ -23,10 +23,11 @@
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
/*
|
||||
* This is the syscon(4)-ized version of the Xbox Frame Buffer driver. It
|
||||
* supports about all features required, such as mouse support.
|
||||
@ -71,7 +72,7 @@ struct xboxfb_softc {
|
||||
char* sc_framebuffer;
|
||||
|
||||
/* pointer to the font used */
|
||||
struct gfb_font* sc_font;
|
||||
const struct gfb_font* sc_font;
|
||||
};
|
||||
|
||||
#define SCREEN_WIDTH 640
|
||||
@ -79,7 +80,7 @@ struct xboxfb_softc {
|
||||
|
||||
#define XBOXFB_DRIVER_NAME "xboxsc"
|
||||
|
||||
extern struct gfb_font bold8x16;
|
||||
extern const struct gfb_font bold8x16;
|
||||
|
||||
static vi_probe_t xboxfb_probe;
|
||||
static vi_init_t xboxfb_init;
|
||||
@ -593,7 +594,7 @@ xboxfb_putc(video_adapter_t *adp, vm_offset_t off, u_int8_t c, u_int8_t a)
|
||||
int i, j;
|
||||
struct xboxfb_softc* sc = &xboxfb_sc;
|
||||
uint32_t* ptri = (uint32_t*)sc->sc_framebuffer;
|
||||
uint8_t* fontdata;
|
||||
const uint8_t* fontdata;
|
||||
uint32_t clr;
|
||||
uint8_t mask;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user