Fix some errors in 8-bit color conversion macros; Fix tools/incdir.sh when g++ is used; Fix bad cast that caused problems with the background window is released
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4064 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
57f1567dc2
commit
988f400b74
7 changed files with 27 additions and 16 deletions
|
@ -2172,3 +2172,9 @@
|
|||
interfaces to read from graphics memory
|
||||
* graphics/nxbe/nxbe_bitmap.c: Fix an error in the error handling that
|
||||
can cause valid bitmaps to fail to render.
|
||||
* include/nuttx/rgbcolors.h: Fix errors in some 16- and 8-bit color
|
||||
conversion macros.
|
||||
* tools/incdir.sh: Fix issues when g++ is used as the compiler. It was
|
||||
not being recognized and handled properly.
|
||||
* graphics/nxsu/nx_releasebkgdg.c: Fix a bad cast that was causing
|
||||
problems with the backgournd window was released.
|
||||
|
|
|
@ -58,6 +58,7 @@ CONFIG_ARCH_BOARD_SIM=y
|
|||
# CONFIG_DEBUG_VERBOSE - enables verbose debug output
|
||||
# CONFIG_DEBUG_SYMBOLS - build without optimization and with
|
||||
# debug symbols (needed for use with a debugger).
|
||||
# CONFIG_HAVE_CXX - Enable support for C++
|
||||
# CONFIG_MM_REGIONS - If the architecture includes multiple
|
||||
# regions of memory to allocate from, this specifies the
|
||||
# number of memory regions that the memory manager must
|
||||
|
@ -118,6 +119,7 @@ CONFIG_ARCH_BOARD_SIM=y
|
|||
CONFIG_DEBUG=y
|
||||
CONFIG_DEBUG_VERBOSE=y
|
||||
CONFIG_DEBUG_SYMBOLS=n
|
||||
CONFIG_HAVE_CXX=n
|
||||
CONFIG_MM_REGIONS=1
|
||||
CONFIG_ARCH_LOWPUTC=y
|
||||
CONFIG_RR_INTERVAL=0
|
||||
|
|
|
@ -65,6 +65,7 @@ CONFIG_SIM_FBBPP=8
|
|||
# CONFIG_DEBUG_VERBOSE - enables verbose debug output
|
||||
# CONFIG_DEBUG_SYMBOLS - build without optimization and with
|
||||
# debug symbols (needed for use with a debugger).
|
||||
# CONFIG_HAVE_CXX - Enable support for C++
|
||||
# CONFIG_MM_REGIONS - If the architecture includes multiple
|
||||
# regions of memory to allocate from, this specifies the
|
||||
# number of memory regions that the memory manager must
|
||||
|
@ -126,6 +127,7 @@ CONFIG_DEBUG=y
|
|||
CONFIG_DEBUG_VERBOSE=y
|
||||
CONFIG_DEBUG_SYMBOLS=n
|
||||
CONFIG_DEBUG_GRAPHICS=y
|
||||
CONFIG_HAVE_CXX=n
|
||||
CONFIG_MM_REGIONS=1
|
||||
CONFIG_ARCH_LOWPUTC=y
|
||||
CONFIG_RR_INTERVAL=0
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* graphics/nxmu/nx_releasebkgd.c
|
||||
*
|
||||
* Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* graphics/nxsu/nx_releasebkgd.c
|
||||
*
|
||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
@ -86,11 +86,10 @@
|
|||
|
||||
int nx_releasebkgd(NXWINDOW hwnd)
|
||||
{
|
||||
FAR struct nxfe_state_s *fe = (FAR struct nxfe_state_s *)hwnd;
|
||||
FAR struct nxbe_state_s *be = &fe->be;
|
||||
FAR struct nxbe_window_s *bkgd = (FAR struct nxbe_window_s *)hwnd;
|
||||
|
||||
#ifdef CONFIG_DEBUG
|
||||
if (!fe)
|
||||
if (!bkgd)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return ERROR;
|
||||
|
@ -99,12 +98,12 @@ int nx_releasebkgd(NXWINDOW hwnd)
|
|||
|
||||
/* Restore the NX background window callbacks */
|
||||
|
||||
be->bkgd.cb = &g_bkgdcb;
|
||||
be->bkgd.arg = NULL;
|
||||
bkgd->cb = &g_bkgdcb;
|
||||
bkgd->arg = NULL;
|
||||
|
||||
/* Redraw the background window */
|
||||
|
||||
nxfe_redrawreq(&be->bkgd, &be->bkgd.bounds);
|
||||
nxfe_redrawreq(bkgd, &bkgd->bounds);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
/* This macro creates RGB8 (3:3:2) from 8:8:8 RGB */
|
||||
|
||||
#define RGBTO8(r,g,b) \
|
||||
((((uint8_t)(r) << 5) & 0xe0) | (((uint8_t)(r) << 2) & 0x1c) | ((uint8_t)(r) & 0x03))
|
||||
((((uint8_t)(r) << 5) & 0xe0) | (((uint8_t)(g) << 2) & 0x1c) | ((uint8_t)(b) & 0x03))
|
||||
|
||||
/* And these macros perform the inverse transformation */
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# tools/incdir.sh
|
||||
#
|
||||
# Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
@ -111,27 +111,29 @@ fi
|
|||
|
||||
os=`uname -o 2>/dev/null || echo "Other"`
|
||||
|
||||
# Let's assume that all GCC compiler paths contain the string gcc and
|
||||
# no non-GCC compiler pathes include this substring
|
||||
# Let's assume that all GCC compiler paths contain the string gcc or
|
||||
# g++ and no non-GCC compiler pathes include these substrings
|
||||
|
||||
gcc=`echo $ccpath | grep gcc`
|
||||
if [ -z "${gcc}" ]; then
|
||||
gcc=`echo $ccpath | grep g++`
|
||||
fi
|
||||
|
||||
sdcc=`echo $ccpath | grep sdcc`
|
||||
|
||||
if [ "X$os" = "XCygwin" ]; then
|
||||
# We can treat Cygwin native toolchains just like Linux native
|
||||
# toolchains in the Linux. Let's assume:
|
||||
# 1. GCC or SDCC are the only possible Cygwin native compilers
|
||||
# 2. If this is a Window native GCC version, then -w provided
|
||||
# on the command line (wintool=y)
|
||||
# 2. If this is a Window native GCC version, then -w must be
|
||||
# provided on the command line (wintool=y)
|
||||
|
||||
if [ -z "$gcc" -a -z "$sdcc" ]; then
|
||||
|
||||
# Not GCC or SDCC, must be Windows native
|
||||
windows=yes
|
||||
compiler=`cygpath -u "$ccpath"`
|
||||
else
|
||||
if [ "X$wintool" == "Xy" ]; then
|
||||
|
||||
# It is a native GCC or SDCC compiler
|
||||
windows=yes
|
||||
compiler=`cygpath -u "$ccpath"`
|
||||
|
|
Loading…
Reference in a new issue