diff options
| author | Phil Nash | 2015-07-06 06:22:28 +0100 |
|---|---|---|
| committer | Phil Nash | 2015-07-06 06:23:13 +0100 |
| commit | 584032dfa4b66a2610049645480fc7846d735b79 (patch) | |
| tree | f161921836fac761294e017818c5a839cf1b147e | |
| parent | 18acff62d3ae55bb02a4d0c20aabc3f75223977c (diff) | |
| download | catch3-1.2.1-develop.4.tar.gz | |
dev build 4v1.2.1-develop.4
- undisturbed background colour (windows), from PR #456
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | include/internal/catch_version.hpp | 2 | ||||
| -rw-r--r-- | single_include/catch.hpp | 16 |
3 files changed, 11 insertions, 9 deletions
@@ -1,6 +1,6 @@  -*v1.2.1-develop.3* +*v1.2.1-develop.4* Build status (on Travis CI) [](https://travis-ci.org/philsquared/Catch) diff --git a/include/internal/catch_version.hpp b/include/internal/catch_version.hpp index 879b671d..a3cac3f6 100644 --- a/include/internal/catch_version.hpp +++ b/include/internal/catch_version.hpp @@ -37,7 +37,7 @@ namespace Catch { return os; } - Version libraryVersion( 1, 2, 1, "develop", 3 ); + Version libraryVersion( 1, 2, 1, "develop", 4 ); } diff --git a/single_include/catch.hpp b/single_include/catch.hpp index d5811f84..05bf3471 100644 --- a/single_include/catch.hpp +++ b/single_include/catch.hpp @@ -1,6 +1,6 @@ /* - * Catch v1.2.1-develop.3 - * Generated: 2015-07-03 18:29:49.753953 + * Catch v1.2.1-develop.4 + * Generated: 2015-07-06 06:21:18.816844 * ---------------------------------------------------------- * This file has been merged from multiple headers. Please don't edit it directly * Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved. @@ -6333,12 +6333,13 @@ namespace { { CONSOLE_SCREEN_BUFFER_INFO csbiInfo; GetConsoleScreenBufferInfo( stdoutHandle, &csbiInfo ); - originalAttributes = csbiInfo.wAttributes; + originalForegroundAttributes = csbiInfo.wAttributes & ~( BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_BLUE | BACKGROUND_INTENSITY ); + originalBackgroundAttributes = csbiInfo.wAttributes & ~( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY ); } virtual void use( Colour::Code _colourCode ) { switch( _colourCode ) { - case Colour::None: return setTextAttribute( originalAttributes ); + case Colour::None: return setTextAttribute( originalForegroundAttributes ); case Colour::White: return setTextAttribute( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE ); case Colour::Red: return setTextAttribute( FOREGROUND_RED ); case Colour::Green: return setTextAttribute( FOREGROUND_GREEN ); @@ -6358,10 +6359,11 @@ namespace { private: void setTextAttribute( WORD _textAttribute ) { - SetConsoleTextAttribute( stdoutHandle, _textAttribute ); + SetConsoleTextAttribute( stdoutHandle, _textAttribute | originalBackgroundAttributes ); } HANDLE stdoutHandle; - WORD originalAttributes; + WORD originalForegroundAttributes; + WORD originalBackgroundAttributes; }; IColourImpl* platformColourInstance() { @@ -6821,7 +6823,7 @@ namespace Catch { return os; } - Version libraryVersion( 1, 2, 1, "develop", 3 ); + Version libraryVersion( 1, 2, 1, "develop", 4 ); } |