@@ -36,17 +36,40 @@ namespace priv
36
36
// //////////////////////////////////////////////////////////
37
37
// Create a "null" sfContextSettings that's returned in case of an error.
38
38
// //////////////////////////////////////////////////////////
39
- sfContextSettings sfContextSettings_null ();
39
+ inline sfContextSettings sfContextSettings_null ()
40
+ {
41
+ sfContextSettings settings = {0 , 0 , 0 , 0 , 0 , 0 , sfFalse};
42
+
43
+ return settings;
44
+ }
40
45
41
46
// //////////////////////////////////////////////////////////
42
47
// Read the data of an sf::ContextSettings into an sfContextSettings
43
48
// //////////////////////////////////////////////////////////
44
- void sfContextSettings_readFromCpp (const sf::ContextSettings& from, sfContextSettings& to);
49
+ inline void sfContextSettings_readFromCpp (const sf::ContextSettings& from, sfContextSettings& to)
50
+ {
51
+ to.depthBits = from.depthBits ;
52
+ to.stencilBits = from.stencilBits ;
53
+ to.antialiasingLevel = from.antialiasingLevel ;
54
+ to.majorVersion = from.majorVersion ;
55
+ to.minorVersion = from.minorVersion ;
56
+ to.attributeFlags = from.attributeFlags ;
57
+ to.sRgbCapable = from.sRgbCapable ? sfTrue : sfFalse;
58
+ }
45
59
46
60
// //////////////////////////////////////////////////////////
47
61
// Write the data of an sfContextSettings into an sf::ContextSettings
48
62
// //////////////////////////////////////////////////////////
49
- void sfContextSettings_writeToCpp (const sfContextSettings& from, sf::ContextSettings& to);
63
+ inline void sfContextSettings_writeToCpp (const sfContextSettings& from, sf::ContextSettings& to)
64
+ {
65
+ to.depthBits = from.depthBits ;
66
+ to.stencilBits = from.stencilBits ;
67
+ to.antialiasingLevel = from.antialiasingLevel ;
68
+ to.majorVersion = from.majorVersion ;
69
+ to.minorVersion = from.minorVersion ;
70
+ to.attributeFlags = from.attributeFlags ;
71
+ to.sRgbCapable = from.sRgbCapable == sfTrue;
72
+ }
50
73
}
51
74
52
75
#endif // SFML_CONTEXTSETTINGSINTERNAL_H
0 commit comments