Skip to content

Commit

Permalink
Merge pull request #117 from crumblingstatue/master
Browse files Browse the repository at this point in the history
Add sRgbCapable field to sfContextSettings
  • Loading branch information
LaurentGomila authored Oct 31, 2016
2 parents 2e47e5d + aed2841 commit 8ec6eb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/SFML/Window/Window.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ typedef struct
unsigned int majorVersion; ///< Major number of the context version to create
unsigned int minorVersion; ///< Minor number of the context version to create
sfUint32 attributeFlags; ///< The attribute flags to create the context with
sfBool sRgbCapable; ///< Whether the context framebuffer is sRGB capable
} sfContextSettings;


Expand Down
4 changes: 3 additions & 1 deletion src/SFML/Window/ContextSettingsInternal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace priv
////////////////////////////////////////////////////////////
sfContextSettings sfContextSettings_null()
{
sfContextSettings settings = {0, 0, 0, 0, 0, 0};
sfContextSettings settings = {0, 0, 0, 0, 0, 0, sfFalse};

return settings;
}
Expand All @@ -48,6 +48,7 @@ void sfContextSettings_readFromCpp(const sf::ContextSettings& from, sfContextSet
to.majorVersion = from.majorVersion;
to.minorVersion = from.minorVersion;
to.attributeFlags = from.attributeFlags;
to.sRgbCapable = from.sRgbCapable ? sfTrue : sfFalse;
}


Expand All @@ -60,6 +61,7 @@ void sfContextSettings_writeToCpp(const sfContextSettings& from, sf::ContextSett
to.majorVersion = from.majorVersion;
to.minorVersion = from.minorVersion;
to.attributeFlags = from.attributeFlags;
to.sRgbCapable = from.sRgbCapable == sfTrue;
}

} // namespace priv

0 comments on commit 8ec6eb0

Please sign in to comment.