mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Added dependency check for Window module.
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1649 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
bbb8cbb25a
commit
07dd3de1d2
@ -125,9 +125,24 @@ void CreateStyleEnum( void )
|
||||
rb_define_const( globalStyleNamespace, "Default", sf::Style::Default );
|
||||
}
|
||||
|
||||
bool CheckDependencies( void )
|
||||
{
|
||||
if( rb_cvar_defined( globalSFMLNamespace, rb_intern( "SystemLoaded" ) ) == Qtrue )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void Init_window( void )
|
||||
{
|
||||
globalSFMLNamespace = rb_define_module( "SFML" );
|
||||
if( CheckDependencies() == false )
|
||||
{
|
||||
rb_raise( rb_eRuntimeError, "This module depends on sfml-system" );
|
||||
}
|
||||
|
||||
rb_define_const( globalSFMLNamespace, "WindowLoaded", Qtrue );
|
||||
|
||||
CreateKeyEnum();
|
||||
|
Loading…
Reference in New Issue
Block a user