Skip to content

Commit 8ec6eb0

Browse files
Merge pull request #117 from crumblingstatue/master
Add sRgbCapable field to sfContextSettings
2 parents 2e47e5d + aed2841 commit 8ec6eb0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

include/SFML/Window/Window.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ typedef struct
7575
unsigned int majorVersion; ///< Major number of the context version to create
7676
unsigned int minorVersion; ///< Minor number of the context version to create
7777
sfUint32 attributeFlags; ///< The attribute flags to create the context with
78+
sfBool sRgbCapable; ///< Whether the context framebuffer is sRGB capable
7879
} sfContextSettings;
7980

8081

src/SFML/Window/ContextSettingsInternal.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace priv
3333
////////////////////////////////////////////////////////////
3434
sfContextSettings sfContextSettings_null()
3535
{
36-
sfContextSettings settings = {0, 0, 0, 0, 0, 0};
36+
sfContextSettings settings = {0, 0, 0, 0, 0, 0, sfFalse};
3737

3838
return settings;
3939
}
@@ -48,6 +48,7 @@ void sfContextSettings_readFromCpp(const sf::ContextSettings& from, sfContextSet
4848
to.majorVersion = from.majorVersion;
4949
to.minorVersion = from.minorVersion;
5050
to.attributeFlags = from.attributeFlags;
51+
to.sRgbCapable = from.sRgbCapable ? sfTrue : sfFalse;
5152
}
5253

5354

@@ -60,6 +61,7 @@ void sfContextSettings_writeToCpp(const sfContextSettings& from, sf::ContextSett
6061
to.majorVersion = from.majorVersion;
6162
to.minorVersion = from.minorVersion;
6263
to.attributeFlags = from.attributeFlags;
64+
to.sRgbCapable = from.sRgbCapable == sfTrue;
6365
}
6466

6567
} // namespace priv

0 commit comments

Comments
 (0)