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: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4064 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
parent
4b6de6f9c1
commit
ad3e58a69a
|
@ -2172,3 +2172,9 @@
|
||||||
interfaces to read from graphics memory
|
interfaces to read from graphics memory
|
||||||
* graphics/nxbe/nxbe_bitmap.c: Fix an error in the error handling that
|
* graphics/nxbe/nxbe_bitmap.c: Fix an error in the error handling that
|
||||||
can cause valid bitmaps to fail to render.
|
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_VERBOSE - enables verbose debug output
|
||||||
# CONFIG_DEBUG_SYMBOLS - build without optimization and with
|
# CONFIG_DEBUG_SYMBOLS - build without optimization and with
|
||||||
# debug symbols (needed for use with a debugger).
|
# debug symbols (needed for use with a debugger).
|
||||||
|
# CONFIG_HAVE_CXX - Enable support for C++
|
||||||
# CONFIG_MM_REGIONS - If the architecture includes multiple
|
# CONFIG_MM_REGIONS - If the architecture includes multiple
|
||||||
# regions of memory to allocate from, this specifies the
|
# regions of memory to allocate from, this specifies the
|
||||||
# number of memory regions that the memory manager must
|
# number of memory regions that the memory manager must
|
||||||
|
@ -118,6 +119,7 @@ CONFIG_ARCH_BOARD_SIM=y
|
||||||
CONFIG_DEBUG=y
|
CONFIG_DEBUG=y
|
||||||
CONFIG_DEBUG_VERBOSE=y
|
CONFIG_DEBUG_VERBOSE=y
|
||||||
CONFIG_DEBUG_SYMBOLS=n
|
CONFIG_DEBUG_SYMBOLS=n
|
||||||
|
CONFIG_HAVE_CXX=n
|
||||||
CONFIG_MM_REGIONS=1
|
CONFIG_MM_REGIONS=1
|
||||||
CONFIG_ARCH_LOWPUTC=y
|
CONFIG_ARCH_LOWPUTC=y
|
||||||
CONFIG_RR_INTERVAL=0
|
CONFIG_RR_INTERVAL=0
|
||||||
|
|
|
@ -65,6 +65,7 @@ CONFIG_SIM_FBBPP=8
|
||||||
# CONFIG_DEBUG_VERBOSE - enables verbose debug output
|
# CONFIG_DEBUG_VERBOSE - enables verbose debug output
|
||||||
# CONFIG_DEBUG_SYMBOLS - build without optimization and with
|
# CONFIG_DEBUG_SYMBOLS - build without optimization and with
|
||||||
# debug symbols (needed for use with a debugger).
|
# debug symbols (needed for use with a debugger).
|
||||||
|
# CONFIG_HAVE_CXX - Enable support for C++
|
||||||
# CONFIG_MM_REGIONS - If the architecture includes multiple
|
# CONFIG_MM_REGIONS - If the architecture includes multiple
|
||||||
# regions of memory to allocate from, this specifies the
|
# regions of memory to allocate from, this specifies the
|
||||||
# number of memory regions that the memory manager must
|
# number of memory regions that the memory manager must
|
||||||
|
@ -126,6 +127,7 @@ CONFIG_DEBUG=y
|
||||||
CONFIG_DEBUG_VERBOSE=y
|
CONFIG_DEBUG_VERBOSE=y
|
||||||
CONFIG_DEBUG_SYMBOLS=n
|
CONFIG_DEBUG_SYMBOLS=n
|
||||||
CONFIG_DEBUG_GRAPHICS=y
|
CONFIG_DEBUG_GRAPHICS=y
|
||||||
|
CONFIG_HAVE_CXX=n
|
||||||
CONFIG_MM_REGIONS=1
|
CONFIG_MM_REGIONS=1
|
||||||
CONFIG_ARCH_LOWPUTC=y
|
CONFIG_ARCH_LOWPUTC=y
|
||||||
CONFIG_RR_INTERVAL=0
|
CONFIG_RR_INTERVAL=0
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* graphics/nxmu/nx_releasebkgd.c
|
* graphics/nxmu/nx_releasebkgd.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
|
* 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
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* graphics/nxsu/nx_releasebkgd.c
|
* graphics/nxsu/nx_releasebkgd.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
* 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
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
|
@ -86,11 +86,10 @@
|
||||||
|
|
||||||
int nx_releasebkgd(NXWINDOW hwnd)
|
int nx_releasebkgd(NXWINDOW hwnd)
|
||||||
{
|
{
|
||||||
FAR struct nxfe_state_s *fe = (FAR struct nxfe_state_s *)hwnd;
|
FAR struct nxbe_window_s *bkgd = (FAR struct nxbe_window_s *)hwnd;
|
||||||
FAR struct nxbe_state_s *be = &fe->be;
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
if (!fe)
|
if (!bkgd)
|
||||||
{
|
{
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return ERROR;
|
return ERROR;
|
||||||
|
@ -99,12 +98,12 @@ int nx_releasebkgd(NXWINDOW hwnd)
|
||||||
|
|
||||||
/* Restore the NX background window callbacks */
|
/* Restore the NX background window callbacks */
|
||||||
|
|
||||||
be->bkgd.cb = &g_bkgdcb;
|
bkgd->cb = &g_bkgdcb;
|
||||||
be->bkgd.arg = NULL;
|
bkgd->arg = NULL;
|
||||||
|
|
||||||
/* Redraw the background window */
|
/* Redraw the background window */
|
||||||
|
|
||||||
nxfe_redrawreq(&be->bkgd, &be->bkgd.bounds);
|
nxfe_redrawreq(bkgd, &bkgd->bounds);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
/* This macro creates RGB8 (3:3:2) from 8:8:8 RGB */
|
/* This macro creates RGB8 (3:3:2) from 8:8:8 RGB */
|
||||||
|
|
||||||
#define RGBTO8(r,g,b) \
|
#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 */
|
/* And these macros perform the inverse transformation */
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# tools/incdir.sh
|
# tools/incdir.sh
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
|
# 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
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions
|
# modification, are permitted provided that the following conditions
|
||||||
|
@ -111,27 +111,29 @@ fi
|
||||||
|
|
||||||
os=`uname -o 2>/dev/null || echo "Other"`
|
os=`uname -o 2>/dev/null || echo "Other"`
|
||||||
|
|
||||||
# Let's assume that all GCC compiler paths contain the string gcc and
|
# Let's assume that all GCC compiler paths contain the string gcc or
|
||||||
# no non-GCC compiler pathes include this substring
|
# g++ and no non-GCC compiler pathes include these substrings
|
||||||
|
|
||||||
gcc=`echo $ccpath | grep gcc`
|
gcc=`echo $ccpath | grep gcc`
|
||||||
|
if [ -z "${gcc}" ]; then
|
||||||
|
gcc=`echo $ccpath | grep g++`
|
||||||
|
fi
|
||||||
|
|
||||||
sdcc=`echo $ccpath | grep sdcc`
|
sdcc=`echo $ccpath | grep sdcc`
|
||||||
|
|
||||||
if [ "X$os" = "XCygwin" ]; then
|
if [ "X$os" = "XCygwin" ]; then
|
||||||
# We can treat Cygwin native toolchains just like Linux native
|
# We can treat Cygwin native toolchains just like Linux native
|
||||||
# toolchains in the Linux. Let's assume:
|
# toolchains in the Linux. Let's assume:
|
||||||
# 1. GCC or SDCC are the only possible Cygwin native compilers
|
# 1. GCC or SDCC are the only possible Cygwin native compilers
|
||||||
# 2. If this is a Window native GCC version, then -w provided
|
# 2. If this is a Window native GCC version, then -w must be
|
||||||
# on the command line (wintool=y)
|
# provided on the command line (wintool=y)
|
||||||
|
|
||||||
if [ -z "$gcc" -a -z "$sdcc" ]; then
|
if [ -z "$gcc" -a -z "$sdcc" ]; then
|
||||||
|
|
||||||
# Not GCC or SDCC, must be Windows native
|
# Not GCC or SDCC, must be Windows native
|
||||||
windows=yes
|
windows=yes
|
||||||
compiler=`cygpath -u "$ccpath"`
|
compiler=`cygpath -u "$ccpath"`
|
||||||
else
|
else
|
||||||
if [ "X$wintool" == "Xy" ]; then
|
if [ "X$wintool" == "Xy" ]; then
|
||||||
|
|
||||||
# It is a native GCC or SDCC compiler
|
# It is a native GCC or SDCC compiler
|
||||||
windows=yes
|
windows=yes
|
||||||
compiler=`cygpath -u "$ccpath"`
|
compiler=`cygpath -u "$ccpath"`
|
||||||
|
|
Loading…
Reference in New Issue